Allows adding of configuirable reminder notifications to your SilverCommerce store for users who have added something to their cart, but not progressed through to payment.
Install this module via composer:
composer require silvercommerce/abandoned-cart-notification
Once installed run dev/build
to add additional database tables
This module relies heavily on the i-lateral/silverstripe-notifications
module, but automatically registers it's own configuration.
Reminder emails are currently sent via AbandonedCartNotificationTask
. You can add this to a cron
job, with something like:
0 9 * * * root /usr/bin/php /path/to/project/vendor/silverstripe/framework/cli-script.php dev/tasks/AbandonedCartNotificationTask flush=1
The above will run the task at 9am every morning.
If you do not want to use a cron job, the best solution would be to add some custom middleware that calls AbandonedCartNotificationTask
. See the following docs
for more:
https://docs.silverstripe.org/en/4/developer_guides/controllers/middlewares/
- Go to
SiteConfig > Notifications
. - Add an
Abandoned Cart Notification
. - Set "Object to monitor" as "Shopping Cart" and save.
- Add a new
Time Passed Rule
, choose field and time period. - Add an
Abandoned Cart Email
type and set relevent fields.
Currently This module is currently pretty dumb, it will send notifications to ALL cart's that match the required timeframe.
Also, the process of sendeing notifications relies on looping through a list and sending notifications one at a time. It might make sense to look into adding integration with some form of external message queue.