racemaniac Posted April 12, 2012 Share Posted April 12, 2012 Hi, is there an option to clean the order database ? I've tested my webshop with some orders but I want to delete them from the database. Can anyone give me a solution / hint ?? Thnx for replying Link to comment Share on other sites More sharing options...
Bru Posted April 12, 2012 Share Posted April 12, 2012 Hi, probably this will help you. (ps1.4.6.2) (I found this suggestion somewhere on this forum and it works for me fine) To be able to delete Orders and Carts from Backoffice modify AdminOrders.php add: $this->delete = true; i.e. in ...\admin\tabs\AdminOrders.php class AdminOrders extends AdminTab { public function __construct() { global $cookie; $this->table = 'order'; $this->className = 'Order'; $this->view = true; $this->colorOnBackground = true; /* add this line */ $this->delete = true; then when go to your orders, you will see the trashcan - now can be deleted when you delete order(s) you will see trashcan in matching cart(s) (Back Office > Customers > Shopping Carts) then you can delete carts Deleting order cleans all the data from database structure which were connected with deleted order. (tables: order, order_detail, order_history, order_discount, order_return_detail, order_return, order_slip_detail, order_slip, cart, cart_discount, cart_product) bru 1 Link to comment Share on other sites More sharing options...
ltempest Posted April 19, 2012 Share Posted April 19, 2012 Thanks so much, surely this should be a setting in the preferences, I had created loads of test orders during the build of the site and needed to clean them out before going live. Hopefully the PrestaShop Dev team will see this post and look at including a preference in a future release. Thanks again. Lee Link to comment Share on other sites More sharing options...
racemaniac Posted May 2, 2012 Author Share Posted May 2, 2012 Tnx. I made the changes and it worked. Could delete the "test-orders" and start with a clean order-history. Hi, probably this will help you. (ps1.4.6.2) (I found this suggestion somewhere on this forum and it works for me fine) To be able to delete Orders and Carts from Backoffice modify AdminOrders.php add: $this->delete = true; i.e. in ...\admin\tabs\AdminOrders.php class AdminOrders extends AdminTab { public function __construct() { global $cookie; $this->table = 'order'; $this->className = 'Order'; $this->view = true; $this->colorOnBackground = true; /* add this line */ $this->delete = true; then when go to your orders, you will see the trashcan - now can be deleted when you delete order(s) you will see trashcan in matching cart(s) (Back Office > Customers > Shopping Carts) then you can delete carts Deleting order cleans all the data from database structure which were connected with deleted order. (tables: order, order_detail, order_history, order_discount, order_return_detail, order_return, order_slip_detail, order_slip, cart, cart_discount, cart_product) bru Link to comment Share on other sites More sharing options...
racemaniac Posted January 14, 2013 Author Share Posted January 14, 2013 With (new install) PS 1.5.3.1 I have same issue, Added the $this->delete = true; within AdminOrdersController.php but is seems it does not work Please advise 8-) Link to comment Share on other sites More sharing options...
vekia Posted January 14, 2013 Share Posted January 14, 2013 this solution doesnt work in newest prestashop version (1.5.x) you can try free solution DELETE ORDERS which is available here: http://www.prestasho...-orders-module/ Link to comment Share on other sites More sharing options...
Tomasci Posted March 1, 2014 Share Posted March 1, 2014 Tnx. I made the changes and it worked. Could delete the "test-orders" and start with a clean order-history. You say it worked for you in PS 1.5.6.2 ? I can't find the AdminOrders.php in admin/tabs/ So how did you manage to do this? Link to comment Share on other sites More sharing options...
racemaniac Posted March 1, 2014 Author Share Posted March 1, 2014 Tomzie see Vekia's reply. Does not work on 1.5.x It worked on 1.4.6.2 this solution doesnt work in newest prestashop version (1.5.x)you can try free solution DELETE ORDERS which is available here: http://www.prestasho...-orders-module/ Link to comment Share on other sites More sharing options...
Tomasci Posted March 1, 2014 Share Posted March 1, 2014 Thanks, the delete orders module worked just perfect. Link to comment Share on other sites More sharing options...
racemaniac Posted March 1, 2014 Author Share Posted March 1, 2014 YWC Link to comment Share on other sites More sharing options...
Recommended Posts