No release in over 3 years
Low commit activity in last 3 years
Take some action for abandoned carts
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

SolidusAbandonedCarts

Build Status

Take some action for abandoned (incompleted) carts.

Override Spree::Order#abandoned_cart_actions with your logic. By default an email is sent, see AbandonedCartMailer.

You have to trigger the method in some way, an example recurring ActiveJob worker is included.

Installation

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

Usage

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:

Spree::AbandonedCartJob.perform

To modify the email, you just have to override Spree.t(:abandoned_cart_subject) and app/views/spree/abandoned_cart_mailer/abandoned_cart_email.html.erb.

Testing

Then just run the following to automatically build a dummy app if necessary and run the tests:

bundle exec rake