Jump to content

Sql script to delete all abandoned carts in prestashop 1.5.2


Recommended Posts

two queries:

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

 

DELETE FROM ps_cart WHERE ps_cart.id_customer = 0

 

remember about database backup!

 

this queries remove carts for not logged customers

  • Like 1
Link to comment
Share on other sites

for me it works, i deleted abandoned carts with these queries.

 

please clarify what you mean by

"SELECT doesn't exist"

 

it's weirdy besause in the code that i attached there is no SELECT query

 

please say something more about how you use this query and where

Link to comment
Share on other sites

  • 1 year later...

i totally agree with you Marty, moreover i think that "removing" things from DB is a definitely BAD idea (especially from core-related tables)

Hi, there was a way to insert a ckeckbox in back office listing to select all items in the list. I did it before, but now I cant find the code to show it to you. It was something like ''mass select checkbox', or ''delete all checkbox'', ...

Once you have it in your backoffice, go to carts, sort them e.x 2012 january-december, show 300 results on a page, and then ''select all checkbox'' and Delete All button.

Link to comment
Share on other sites

  • 4 weeks later...
  • 8 months later...
×
×
  • Create New...