Skip to content

stm9x9/spree_limit_backorders

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spree / Limit Backorders

When a product/variant is marked as backorderable, spree allows an unlimited number of backorders.

This extenstion allows you set a cap for backorders in the admin.

Usage

To set the limit:

  • Go to Admin -> Products -> Edit -> Stock Locations
  • Check off the "Backorderable" option
  • Enter a max value (a max zero allows infinite backorders)
  • Click "save"

Installation

Add spree_limit_backorders to your Gemfile:

gem 'spree_limit_backorders', github: 'joshnuss/spree_limit_backorders'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_limit_backorders:install

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_limit_backorders/factories'

Copyright (c) 2015 [email protected], released under the New BSD License

About

Spree extension for restricting the number of backorders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 90.1%
  • HTML 6.3%
  • CoffeeScript 2.8%
  • JavaScript 0.8%