Emptying the User carts

The User carts data will be removed automatically once a month by cs-cart.



However if you want to remove the data that has been left behind by visitors yourself you can do that to. This is what the help desk told me.


[quote]In order to remove it manually you should click on the “Upgrade center” link on the “DB Backup/Restore” page and enter the following query into the text area of the “Update database” section:[/quote]


DELETE FROM `cscart_user_session_products` WHERE `cscart_user_session_products`.`type` = 'C' AND `cscart_user_session_products`.`user_type` = 'U';


[quote]and click on the “Submit” button at the bottom.[/quote]



This only works for those visitors that are not registrerd. If you want to delete that data as well this is what you need to do:


[quote]Click on the “Upgrade center” link on the “DB Backup/Restore” page and enter the following query into the text area of the “Update database” section:[/quote]


DELETE FROM `cscart_user_session_products` WHERE `cscart_user_session_products`.`type` = 'C' AND `cscart_user_session_products`.`user_type` = 'R';


[quote]and click on the “Submit” button at the bottom.[/quote]



Regards,



Martin

What’s the difference? Those are the exact same queries.

It looks like they haven’t copied everrything support had written

Sorry folks I indeed missed a part of the string:rolleyes: .



I have updated my original post.



Martin

Hi Martin,



The second one works for me but the first ones doesn’t and it’s the one I would really like to use as I have three pages of these.



Can yo check the code again.



Thanks

Hello utilityempire,



I have updated the code and now it should work. The only restriction as far as I can tell is it won’t remove the wishlist info from the user cart:-( .



But please give it a try and let me know will yah:-).



Martin

I got



ERROR

No queries are sent or queries contain errors



in 134sp3



On the first one.

Hmmm maybe that is due to the fact that you are using version 1.3.4 and I am using 1.3.5?



I have no idea how to solve that I am sorry to say.



Regards,



Martin

Hi



I get same error on first one - I`m using 1.3.5 sp3

Works well for me (135 SP3)

Worked like a charm here.