danielsk Posted July 19, 2013 Share Posted July 19, 2013 Hello, I have some problems with one shop (when somebody creates an order, he see also another products in cart, which he did not insert). I would like to delete all orders, carts and history (except customers, products, categories, pictures, carriers and other settings). How can I do it? Which database tables I should empty? Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted July 19, 2013 Share Posted July 19, 2013 there are several free modules to do this you can either google it ' prestashop module delete orders' here is one for example: http://www.prestashop.com/forums/topic/191037-free-delete-orders-module/ Link to comment Share on other sites More sharing options...
Kane_Kowalski Posted July 19, 2013 Share Posted July 19, 2013 Go to phpmyadmin and truncate tables like all "order" tables, "cart" table ^^ But honestly it really sounds you have had a cart table reset and your new cart ids start increment from scratch. So any order has been made will find a new cart and vice versa. So my suggestion is to set cart increment level higher on whatever is set on last cart id in an order. Link to comment Share on other sites More sharing options...
danielsk Posted July 20, 2013 Author Share Posted July 20, 2013 Hello, to El Patron: thank you for tip, it is interesting module. to Kane_Kowalski: I also think, there is some error. May be somebody from our team deleted orders in wrong way, but we used only standard ways for deletion (either Admin in backoffice, or Store Manager for PrestaShop). Can I realy without any hesitation truncate these tables? - ps_cart - ps_cart_discount (this table is already empty) - ps_cart_product - ps_orders - ps_order_detail - ps_order_discount (this table is already empty) - ps_order_history I mean, if truncation will not affect some other data or functions in PrestaShop. Or should I truncate some other tables? Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted July 20, 2013 Share Posted July 20, 2013 here is a little trick to add the trash can to your back office orders admin(folder)-->tabs-->AdminOrders.php simply add: $this->delete = true; for example class AdminOrders extends AdminTab { public function __construct() { global $cookie; $this->table = 'order'; $this->className = 'Order'; $this->view = true; $this->colorOnBackground = true; $this->delete = true; 1 Link to comment Share on other sites More sharing options...
danielsk Posted July 20, 2013 Author Share Posted July 20, 2013 Thank you for the trick. My colleague told me, that when he deletes orders (via Store Manager), the carts are not deleted. Thats why I would like to know, how I can make the shop empty, and start from beginning (without to delete customers and other settings). May be the fastest way is to delete data from data tables, but in this case we have to exactly know, which tables we can truncate. We will lose the history of orders, but this is not a big problem in our situation. We would like to have our shop working again without any problems with current orders. Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted July 20, 2013 Share Posted July 20, 2013 IMHO deleting the orders etc. would not fix your problem. You may want to consider opening a new post on your specific problem. Make sure to include your URL. This problem has been reported in the past. You should also consider opening a 'bug' report on the forge. Link to comment Share on other sites More sharing options...
danielsk Posted July 20, 2013 Author Share Posted July 20, 2013 I was afraid, that this could be a more serious problem, and you confirmed me it. Thank you again, we have to think about next steps. Link to comment Share on other sites More sharing options...
El Patron Posted July 20, 2013 Share Posted July 20, 2013 why not post your url and let the community test. I know I've seen this problem posted before and have been doing some searches but no luck so far. It may be as simple as your template moudle/cart is bad. Have you tried switching from an ajax cart to non-ajax cart or vice versa? You are able to create this problem at will yes? if so then this sort of problem is much more easily resolved than the occasional bug. Link to comment Share on other sites More sharing options...
danielsk Posted July 20, 2013 Author Share Posted July 20, 2013 The problem appears not always, and we noticed it in few past days. Two of our customers reported the problem with cart. In this moment we are not able to simulate the problem, thats why is for us not easy to find solution. We are looking for fast solution, which will help us to continue without problems, and we thought, that deletion of old carts will solve it. Link to comment Share on other sites More sharing options...
Recommended Posts