Jump to content

How to clean up my customers old add to cart items from my database?


Recommended Posts

  • 1 month later...

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

  • 3 years later...

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

  • 6 months later...

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

×
×
  • Create New...