acreilly / spree-subscribe

A Spree extension for managing opt-in reorders to a product(s).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Code Climate

This extension is ready for beta testing.

SpreeSubscribe

A Spree extension for allowing customer to subscribe to a product(s), have it periodically sent to him/her, and manage that subscription.

Installation

Add this to your Gemfile

gem "spree_subscribe", github: "onedanshow/spree-subscribe", branch: '2-0-beta'

Install the database migrations

rake spree_subscribe:install:migrations

Setup a cron job to run this rake task every night

rake spree_subscribe:reorders:create

Future To-Do

  • Update Product#show javascript to show subscription price when subscription interval is selected
  • Create Spree::SubscriptionsController and views for edit and update actions for the customer
  • Email customers when a re-order is shipped?
  • Extend Spree API to handle subscriptions?
  • Move Intervalable#time_title to a helper so can use time_unit_symbol to pull from localization
  • Extend Spree::Admin::SubscriptionsController to include filtering and sorting
  • For a reorder, if a shipping method is no longer available, select the cheapest.

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) 2013 Daniel Dixon, released under the New BSD License

About

A Spree extension for managing opt-in reorders to a product(s).

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


Languages

Language:Ruby 63.1%Language:HTML 29.8%Language:CoffeeScript 4.1%Language:JavaScript 2.4%Language:CSS 0.7%