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 ActiveJob worker is included.
Add this line to your solidus application's Gemfile:
gem 'solidus_abandoned_carts', github: 'jtapia/solidus_abandoned_carts'
And then execute:
$ bundle $ bundle exec rails g solidus_abandoned_carts:install
There are some preferences you can change (defaults are shown here):
SolidusAbandonedCarts::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:
To modify the email, you just have to override
Then just run the following to automatically build a dummy app if necessary and run the tests:
bundle exec rake