Jump to content

Cart table is growing with unknown reason


ivanoman

Recommended Posts

Hi all, 
I'm using PS 9.1 and I noticed that the cart table is growing without having a real visitors choosing the product. 
Is there any way to avoid this? 
In the mean time I wrote a script that remove the table if not connected to anything. 

 

Quote

DELETE c, cp
FROM xxxx_cart c
LEFT JOIN xxx_orders o ON o.id_cart = c.id_cart
LEFT JOIN xxx_cart_product cp ON cp.id_cart = c.id_cart
WHERE o.id_cart IS NULL
  AND c.date_add < NOW() - INTERVAL 30 DAY;

What do you think ? 
 

Merry Chrustmas !! 
IM

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...