GithubHelp home page GithubHelp logo

stevenbarragan / spree-subscriptions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nebulab/spree-subscriptions

0.0 3.0 0.0 490 KB

Spree extension to handle subscriptions

License: BSD 3-Clause "New" or "Revised" License

Ruby 99.07% JavaScript 0.34% CSS 0.59%

spree-subscriptions's Introduction

SpreeSubscriptions

Build Status Coverage Status Code Climate This extension allows Spree to handle subscribable products with number-based subscriptions. This means that you can subscribe to N issues for a subscribable product (e.g., magazine). Once a new issue is created and shipped, every subscription decreases its remaining issues number. When this number decreases to 1, the associated user is notified via email that he has to renew his subscription. When it decreases to 0, the subscription becomes 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 the 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 only one issue remains 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

spree-subscriptions's People

Contributors

kennyadsl avatar mtylty avatar stevenbarragan avatar assembled avatar radar avatar brchristian avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.