Testing ebizmarts Magento Abandoned Cart Module

The abandoned cart module is designed so that the minimum amount of time between a cart being abandoned, and an email going out is 1 hour. Which makes testing a bit tricky having to wait so long before the email gets sent out.

I created a page that would reset the abandoned basket in the database, forcing the email to go out within a min…

Within /app/code/community/Ebizmarts/AbandonedCart/etc/config.xml

Update the value for cron_expr so that it reads “*/1 * * * *” (ie checks once a minute, rather than once per hour)

Update your magento cron job so that it also runs once per minute, on a linux server it might be something like:
*/1 * * * * /bin/sh /srv/www/htdocs/magento_root/cron.sh

I then created a page that updated the sales_flat_quote table for a certain customer email address, and reset the ebizmarts fields:


  UPDATE
    sales_flat_quote
  SET
    ebizmarts_abandonedcart_counter = 0,
    ebizmarts_abandonedcart_flag = 0,
    ebizmarts_abandonedcart_token = NULL,
    created_at = DATE_SUB(NOW(), INTERVAL 3 HOUR),
    updated_at = DATE_SUB(NOW(), INTERVAL 2 HOUR)
  WHERE
    customer_email = 'my email address here'

Whenever the page is visited the quote is updated, and a new email gets sent out.