ipcomp1 Posted July 23, 2013 Share Posted July 23, 2013 Hello how to use SQL Manager to write a script to delete all abandoned carts in prestashop 1.5.2 ? Link to comment Share on other sites More sharing options...
vekia Posted July 23, 2013 Share Posted July 23, 2013 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 1 Link to comment Share on other sites More sharing options...
ipcomp1 Posted July 24, 2013 Author Share Posted July 24, 2013 Hello Thanks for the answer , but i receive this message when try to run it "SELECT doesn't exist" Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 SELECT? it is werid coz there is no SELECT query? Link to comment Share on other sites More sharing options...
Totti Posted July 24, 2013 Share Posted July 24, 2013 you can create a form for these operations ? Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 Totti what you mean? can you explain what you want to achieve? you mean that you want a module ? Link to comment Share on other sites More sharing options...
ipcomp1 Posted July 24, 2013 Author Share Posted July 24, 2013 you can try run the Sql script , you will see it's not working and we dont to buy module for this operation Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 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 More sharing options...
Carolina Custom Designs Posted July 24, 2013 Share Posted July 24, 2013 Keep in mind that you will only be deleting the abandoned carts in a single table. There are several other tables that contain data from an abandoned cart. This method of deletion could potentially put your DB in an unstable condition. You are also not removing all the data left behind by abandoned carts. Marty Shue 2 Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 i totally agree with you Marty, moreover i think that "removing" things from DB is a definitely BAD idea (especially from core-related tables) 1 Link to comment Share on other sites More sharing options...
viktor123 Posted September 30, 2014 Share Posted September 30, 2014 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 More sharing options...
mojweb Posted October 25, 2014 Share Posted October 25, 2014 SELECT? it is werid coz there is no SELECT query? Link to comment Share on other sites More sharing options...
joseantgv Posted July 7, 2015 Share Posted July 7, 2015 You can only execute SELECT queries at PS backoffice. You should execute these queries in a database administrator like phpMyAdmin, Adminer, etc. Link to comment Share on other sites More sharing options...
Recommended Posts