Take some action for abandoned (incompleted) carts.
Spree::Order#abandoned_cart_actions with your logic.
By default an email is sent, see
You have to trigger the method in some way, an example recurring Sidekiq worker
Add spree_abandoned_carts to your Gemfile:
gem 'spree_abandoned_carts', github: 'freego/spree_abandoned_carts', branch: 'X-X-stable'
Bundle your dependencies and run the installation generator:
bundle bundle exec rails g spree_abandoned_carts:install
There are some preferences you can change (defaults are shown here):
SpreeAbandonedCarts::Config.tap do |config| # when an order can be marked as abandoned config.abandoned_after_minutes = 1440 # 24 hours # how often the sidekiq worker should run config.worker_frequency_minutes = 30 end
You can perform the processing of the abandoned carts at any time:
or use the auto processing solution (based on Sidekiq):
To modify the email, you just have to override
First bundle your dependencies, then run
rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using
bundle bundle exec rake
When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper:
Copyright (c) 2015-2017 Alessandro Lepore, released under the New BSD License