To install Abandoned Carts, follow these steps:
- Download & unzip the file and place the
abandonedcartsdirectory into your
- Install plugin in the Craft Control Panel under Settings > Plugins
- The plugin folder should be named
abandonedcartsfor Craft to see it.
Abandoned Carts works on Craft 2.5.x. and higher.
Abandoned Carts Overview #
Work in progress
Configuring Abandoned Carts #
You can configure everything through the plugin settings.
It's also possible to override the settings with a config file. There is an example included in
<?php return [ // Supports // 1 hour later (recommended). // 6 hours later. // 10 hours later (recommended). // 24 hours later. // 36 hours later. // 48 hours later. // 72 hours later. // 96 hours later. 'interval' => 1, // Where to redirect customer when clicking link in e-mail 'restoreRedirectUrl' => '', // When someone unsubscribes, they will be redirected here 'unsubscribeRedirectUrl' => '', // Email settings 'fromName' => '', 'fromEmail' => '', 'subject' => '', // HTML template 'template' => '', // Text template 'templateText' => '', // If you set this, all recovery emails will be sent to that address // 'testEmailAddress' => '', // If you want a coupon to be applied automatically, use this 'couponCode' => '', ];
Using Abandoned Carts #
You need to setup a cron job that either calls the check URL or the console command. Both methods are listed in the settings screen. Recommended interval is 5-10 minutes.
The check will first find any suitable abandoned cart according to the ruleset, and it will then create and run a task. If you have any stalled or long-running tasks in the queue, this might cause problems.
On the plus side, tasks makes it easier to notice if e-mail sending fails.
Qualifying carts #
Abandoned Carts tries it best to qualify if a cart/customer should get an e-mail. The ruleset is modeled on Shopify's research.
The ruleset checks the following:
- If there is an valid email set on the cart
- If a customer has unsubscribed from receiving abandoned cart emails before
- If a order has any items
- If a customer has ordered within the last 24 hours
- If any transactions on the order has failed
- If the total price is above 0
- If at least 1 item in the cart is available for delivery
TODO: Add a more detailed table of the rules, and how they are checked
Email template #
Example HTML and text templates is included in the folder
example-email. The templates is passed
order (Commerce_OrderModel) and
Abandoned Carts Roadmap #
- Better documentation
- Multiple emails
- Add top abandoned products
- Config option for limiting abandoned carts back in time
- Detect multiple abandoned carts for email within the interval, and only send e-mail for latest
- Detect if a order isn't possible to ship to the defined customer
- Add analytics widget
Frequently asked questions
- How many sites can I install the plugin on under 1 license?
It's pretty simple: 1 license covers 1 site / Craft installation.
- I'm having an issue with emails not being delivered
You should use a email service provider like Postmark, Mailgun, Amazon SES, Mailjet or similar. They will ensure deliverability is top notch, and they will give you detailed logging, which should make it easier to track down issues.
- How can I test this locally without sending out emails?
I recommend using MailDev, a really neat utility that will log all outgoing emails in a nice inbox. Contact me if you need help with the right email settings in Craft.
- Fixed: Added missing parameters to log call
- Fixed: Fixed column type for HTML/text email content that caused the email preview result to be trunctated (again)
- Fixed: Fixed PHP error that would be triggered if there was no mailable carts waiting and you triggered the check action
- Fixed: Fixed column type for HTML/text email content that caused the email preview result to be trunctated
- Fixed: Fixed PHP error when cart element records have no email set
- Fixed: Email preview is now using it's own template rendering method to avoid CP JS/CSS being included
- Fixed: Fixed MySQL issue when manually recovering orders
- Improved: Added error logging to email records (for the future).
- Fixed: Remove duplicate text template field
- Fixed: Fixed release feed url
- Improved: Now possible to download update directly from update screen if install has valid license
- Fixed: Migrated to custom license checking. This should fix the problem with "Invalid license" prompts some sites was experiencing.
- Improved: Text templates will not be HTML escaped any more.
- Improved: Added longer check intervals.
- Added: Added text email example
- Improved: Config model now only tries to check for config overrides for if it has a matching attribute
- Added: Added test mode
- Added: Added recovery view
- Added: Test email address setting. If this is set, all emails will be sent to this address.
- Added: Added list of unsubscribes
- Improved: Cleaned up settings a bit
- Fixed: Fixed open tracking when clicking, if no opens has been registered
- Added: Refactored recovery saving and email sending through the console command to run 1 process per order. This should prevent larger stores hitting the memory limit
- Added: Option to use console command when calling the controller with a HTTP call
- Improved: Now qualification result is saved to the recovery record
- Improved: Update recovery if order total is changed, or email is changed AND no recovery email has been sent
- Added: Initial beta release
Currently available for Craft consulting and custom plugin developmentContact me