Jump to content

How i empty my cart


Recommended Posts

Well, I have never tried to empty a cart, but all i know is, prestashop does not just use cookie to hold the products that are in cart, there is also database involved. Have a look at ps_cart table and others, you can see in these tables all the products being added to your cart. So, if you want to get rid of products, you also need to delete the corresponding lines in the ps_cart and ps_cart_product table. Hope this helps

Link to comment
Share on other sites

A very good question and I did think you would have this problem at some point. Well, all I know is about this is, whenever a customer is logged in and he/she creates a cart, the id_customer in ps_cart is set to id of the customer. And, when the user is not logged in, id_guest is used to uniquely identify the guest. So, now it's up to you to find out the id of the guest being set when some anonymous user creates the cart, and you want to empty the cart for this user.

Link to comment
Share on other sites

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