Magento Tips: How To Clean Shopping Carts In Magento

Magento Tips: How To Clean Shopping Carts In Magento

From time to time it is necessary to clear users’ unused shopping carts, especially for guest users. This feature has already been added with the last versions of Mаgentо. But for old versions, you can use a cron which would clear users’ shopping carts at the specified time. To do this, you should create a model and set up time to call methods for cleaning shopping carts.

So, let’s create a module with “clearing” methods:

And register a cron job.

To refine module methods you should set up cron for website.

Cart Clean

Download Cart Clean from GitHub



1 comment

  1. I have read your code for shopping cart which is really nice but I am confused from Clear the Guest function which you have written last in the program. Could you please clear my doubts about ClearGuest() ? Thanks in advance.

Post a new comment

top
BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *