Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Spree extension to handle subscriptions
Branch: master
Pull request Compare This branch is 149 commits behind nebulab:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db/migrate
lib
script
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
Versionfile
spree_subscriptions.gemspec

README.md

SpreeSubscriptions

Build Status Code Climate

This extension allows to handle subscribable products with numbers based subscription. This means that you can subscribe to N issues for a subscribable products (eg. magazine). Once a new issue is created and shipped, every subscriptions decrease his remaining issues number. When this number decrease to 1, associated user is notified via email that he has to renew his subscription. When it decrease to 0 subscription become inactive.

Features

  • Admin can mark products as subscribable
  • Admin can set the number of issues that compose a subscription for each product and variant (default => 12)
  • Admin can create issues in each subscribable item (with ability to associate issue with existing products, useful to link issue with backlog products of the same magazine)
  • Admin can view, print and mark as shipped the list of subscribed users (which have to receive new issue)
  • Keep track of shipped issues for each subscription
  • Send mail notification when it remains an issue only to be shipped
  • Send mail notification when subscription expires (no remaining issues)

Installation

Add the gem to your Gemfile:

gem 'spree_subscriptions', :git => 'git://github.com/nebulab/spree-subscriptions.git'

Run bundle:

bundle

Run the generate and database migration:

rails g spree_subscriptions:install
rake db:migrate

Configure default issues number for subscriptions

For each subscribable product (and his variants) you can choose the number of issues a user can subscribe to. Default value is 12. To change this default value you can run from the rails console:

Spree::Subscriptions::Config.set(:default_issues_number, 24)

Use delayed job for email notifications

To use delyed_job to send notification mail just add delayed_job to your store Gemfile and run from rails console:

Spree::Subscriptions::Config.set(:use_delayed_job, true)

Testing

Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.

$ bundle
$ bundle exec rake test_app
$ bundle exec rspec spec

Copyright (c) 2012 NebuLab, released under the New BSD License

Something went wrong with that request. Please try again.