CartThrob Expired Cart Notifications Version 1.03
CartThrob Expired/Abandoned Cart Notifications addon enables your CartThrob enabled website to send email notifications when your customer has abandoned their cart. Studies have proven that follow up emails for abandoned carts is a highly effective method of completing a sale, as well as increasing the per-sale transaction amount by sending special offers with these notifications. This addon makes it simple to create a multie-tiered notification system for customers that have abandoned their carts.
CartThrob Expired Cart Notifications is an addon for CartThrob. Like other CartThrob addons, it must be uploaded and installed on your website, and CartThrob must be active for it to run. To use this addon you will need to create notification templates. The content of these templates will be emailed to customers if their cart has been abandoned.
Features
- Create tiered notifications, with emails sent from a few minutes up to weeks after the customer's cart has been abandoned.
- Specify multiple email templates for early notifications, and additional generic emails for ongoing reminders of an abandoned cart
- Uses standard EE templates system to store notification templates.
- Set limit on how many additional follow-up emails the customer should get.
Requirements
- ExpressionEngine 2.5+
- CartThrob 2.3+
- PHP 5.3+
Installation
- Upload the
/system/expressionengine/third_party/cartthrob_expired_cart_notifications/folder to/system/expressionengine/third_party/ - Make sure Extensions are enabled on your system
- Install the CartThrob Expired Cart Notifications module and extension (through EE's add-ons/modules panel)
- Create notification templates using EE's template system
- Go to the addons » modules » CartThrob Expired Cart Notifications settings and configure one or more notifications
Upgrading
- Upload the
/system/expressionengine/third_party/cartthrob_expired_cart_notifications/folder to/system/expressionengine/third_party/Overwriting existing files. - Go to EE settings » addons » and click "Run Module Updates"
Settings
These settings are primarily notifications settings, which are covered in more detail below
One particular setting to pay attention to is the "Notification Debug" setting
If this is set to "yes" abandoned carts will not be marked as checked, so you can continue testing over and over on the same abandoned carts. In any case, you will need to allow some time to pass between when carts are created for testing and when you begin testing the notifications sent from this module. Enabling this setting just means that the same cart data can be used over and over during testing. It's also important to note that CartThrob itself deletes carts over time if they've been abandoned. If these carts are not deleted, you will end up with quite a bit of needless entries in your database. Generally speaking it's best to set up your abandoned notifications to be active within the first 24 hours. Beyond that time frame, you'll find customers getting annoyed with your follow ups.
CartThrob Expired Cart Notifications Settings 
CRON
This addon requires that your system be told to periodically check for expired carts. To this end, there is a CRON url listed in the CartThrob Expired Cart Notifications settings. You can either manually visit this URL check for expired carts or ideally you should automate the process by using CRON. CRON is a time based scheduling application already available on most hosting platforms. CRON can be configured to call a URL on your website that checks for expired carts. Setup of CRON is fairly simple. Most hosts provide an administrative interface for CRON, or you can generally provide our CRON command to the host's support and they will add it for you. Once cron is set up once, you need take no further action with it in the future.
The following are sample scripts you can use with CRON. Generally, you will need to either contact your hosting company to add those commands, or using your hosting control panel, you will need to set up a CRON job using those commands. Essentially, once you've figured out where you can add CRON jobs, you just need to copy the command from the subscriptions settings page, paste it, and save the CRON job.
NOTE: Our CRON methods make use of a file called extload.php in themes/third_party/cartthrob/lib. If you have changed the location of your system folder, you will need to update extload.php with the location of your system folder.
There are several methods available on most systems to run CRON.
If you can execute shell scripts on your server:
/your/server/path/to/themes/third_party/cartthrob_expired_cart_notifications/lib/cron.sh /server/path/themes/third_party/cartthrob/lib/extload.phpIf you can run perl scripts on your server:
/your/server/path/to/themes/third_party/cartthrob_expired_cart_notifications/lib/cron.pl /server/path/themes/third_party/cartthrob/lib/extload.phpIf your server allows the use of PHP's "passthru" function:
/your/server/path/to/themes/third_party/cartthrob/lib/extload.php cartthrob_expired_cart_notifications get_expired_cartsYou can also manually call your rebill URL manually. (the URL is listed in your settings page)
Or it can be called via CURL
curl --silent "your url" 2>&1 /dev/null
It may be easiest, if you are unfamiliar with CRON to contact your hosting company and ask them the best way to set up CRON, or request that they set it up for you. Using the provided scripts, it should be fairly straightforward to add.
CartThrob Multi Location Manager Settings 
Notifications
Unlike many CartThrob addons, this one has its own notifications manager where you can create and edit notifications. Like other CartThrob addons, it also uses ExpressionEngine's template system to store template data. You create notifications using EE's standard template system, and then select these templates in CartThrob Expired Cart Notification templates. You can set multiple different templates that will be sent at different times after the cart has been abandoned. A common usage would be:
- to set one template 2 hours after abandonment
- one day after abandonment
- two days after abandonment
- one week after abandonment
- additional follow up emails weekly or monthly
There are two types of notifications
- Initial notifications
- Additional regular notifications
Initial notifications are intended to be immediate follow ups for abandoned carts. These should be unique notifications, often including a special offer for returning customers
Additional regular notifications are intended to be more long-term follow ups, and really only intended for sites that require membership to purchase items. This is ideal for private carts set up for vendors or distributors, or other private shopping systems where additional regular notifications will be welcomed by the receiver rather than treated as aggressive spam by annoyed customers.
If you are going to send very many abandoned cart notifications, or use the Additional Regular Notifications, it's best to require that your customers are always logged in before they're allowed to add their email address to the cart. CartThrob tracks carts to specific members, and if they log in the last cart they were working with will be relaunched. For guests however, it may not be possible to track a specific cart ID to their purchase if they return to the site, in which case it's best to only send one follow up email. Whenever any specific cart is part of a completed transaction, no additional notifications will be sent for the owner of that cart.
The additional regular notifications includes settings for the number of times a customer should be recontacted, and how often.
Variables
You can use the following variables in your templates.
{first_name}
{last_name}
{address}
{address2}
{city}
{state}
{zip}
{country_code}
{company}
{language}
{currency_code}
{email_address}
{phone}
{shipping_address}
{shipping_address2}
{shipping_city}
{shipping_country_code}
{shipping_first_name}
{shipping_last_name}
{shipping_state}
{shipping_zip}
{shipping_company}
{shipping_option}
{total}
{discount}
{taxable_discount}
{tax}
{subtotal}
{taxable_subtotal}
{shipping}
{shippable_subtotal}