tzak902 Posted November 13, 2022 Share Posted November 13, 2022 Hi, I'm running PS 1.7.2 I wanted to delete all my orders and start from order 1. I run the following into mysql: TRUNCATE TABLE `ps_orders`; TRUNCATE TABLE `ps_order_detail`; TRUNCATE TABLE `ps_order_history`; ALTER TABLE `ps_orders` AUTO_INCREMENT = 0; ALTER TABLE `ps_order_detail` AUTO_INCREMENT = 0; ALTER TABLE `ps_order_history` AUTO_INCREMENT = 0; Whenever I execute these lines when I try to make the first test order I get the following error from the screenshots. If I restore the db everything works fine again. What could be the issue please Link to comment Share on other sites More sharing options...
Kriter.io Posted November 13, 2022 Share Posted November 13, 2022 I do not suggest you to "play" with mysql in prestashop since everything is related to other things. To delete test orders and have a completely "clean" backoffice is not that easy, but you can find some very trusted modules, even free, to do it. The one is suggeste is made by @vekia and you can find it on mypresta(.)eu There is a free version and a pro version based on your needs. I hope to have helped you to find a support to your request. regards Fabrizio Link to comment Share on other sites More sharing options...
endriu107 Posted November 13, 2022 Share Posted November 13, 2022 Probably there is more related table so you need clear them all like ps_cart and maybe some tables from external modules. Link to comment Share on other sites More sharing options...
tzak902 Posted November 16, 2022 Author Share Posted November 16, 2022 I fixed the issue, it was indeed an issue with a relation with another table in a different module. Link to comment Share on other sites More sharing options...
Kriter.io Posted November 16, 2022 Share Posted November 16, 2022 great. Just sign the topic as "SOLVED". Thanks Fabrizio Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now