Get Free Audit

Magento Tips: How To Clean Shopping Carts In Magento

Jun 24, 2013

627 Aleksander Tretjak

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:

Vlad Yunusov
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad


And register a cron job.


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

Cart Clean

Download Cart Clean from GitHub

Vlad Yunusov
Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad

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

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