Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.21 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.21 KB

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