Jack Posted September 13, 2009 Share Posted September 13, 2009 I have a lot customers add items in the cart and then left the cart. Now I have over 1000 of this kind of junk in my database. How can I clean it up that completely remove them from my database? Thanks. Link to comment Share on other sites More sharing options...
Drew Posted October 28, 2009 Share Posted October 28, 2009 i have the same issue if any one has a fix that would be fantastic Link to comment Share on other sites More sharing options...
rocky Posted October 29, 2009 Share Posted October 29, 2009 The only way I can see to do this is to execute the following SQL query (remember to backup the ps_cart and ps_cart_product tables first in case something goes wrong): DELETE ps_cart_product FROM ps_cart_product JOIN ps_cart ON ps_cart.id_cart = ps_cart_product.id_cart WHERE ps_cart.id_customer = 0 AND ps_cart.id_guest = 0; DELETE FROM ps_cart WHERE ps_cart.id_customer = 0 AND ps_cart.id_guest = 0; This will remove all carts that were abandoned when customers were logged in. To remove all guest carts as well, you could remove the AND ps_cart.id_guest = 0 parts of the query above. Link to comment Share on other sites More sharing options...
Zenith Posted October 29, 2009 Share Posted October 29, 2009 You can add a delete option to AdminCarts very easily, which will allow you to delete carts from the BO rather than using SQL queries....Open admin/tabs/AdminCarts.phpFind: $this->delete = false; Change to: $this->delete = true; Link to comment Share on other sites More sharing options...
Jack Posted October 29, 2009 Author Share Posted October 29, 2009 Thank you for the reply. Both ways work perfectly. Link to comment Share on other sites More sharing options...
Drew Posted October 29, 2009 Share Posted October 29, 2009 thank you both i will wait till the boss gets in and ask him which he would like done thanks again Link to comment Share on other sites More sharing options...
Yankee Store Posted May 8, 2013 Share Posted May 8, 2013 Can You tell me if this can also be applied for Prestashop 1.5.4 Thank you Link to comment Share on other sites More sharing options...
vekia Posted May 8, 2013 Share Posted May 8, 2013 Can You tell me if this can also be applied for Prestashop 1.5.4 Thank you hello for carts this method works: Find: $this->delete = false; Change to: $this->delete = true; but you have to edit other file: controllers/admin/adminCartsController.php Link to comment Share on other sites More sharing options...
Grindelf Posted November 23, 2013 Share Posted November 23, 2013 hello for carts this method works: but you have to edit other file: controllers/admin/adminCartsController.php dont find this line on controllers/admin/adminCartsController.php Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 what ps version you use? im asking, because in latest release delete button is there by default (customers > shopping carts) Link to comment Share on other sites More sharing options...
Grindelf Posted November 24, 2013 Share Posted November 24, 2013 Already fixed. I Im using the last version, 1.5.6, and copied the line $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); on line 38, just below the code $this->addRowAction('delete'); and above the code $this->allow_export = true; I follow the instructions of this topic: http://www.prestashop.com/forums/topic/230355-abandoned-carts/?view=findpost&p=1234987 Everything works. Verify on sql database and really works. Ty all Rafael Link to comment Share on other sites More sharing options...
Recommended Posts