spree_limit_backorders

Spree extension for restricting the number of backorders

Last updated on: May 29 at 06:37 AM

source code bug tracker
Opensource
0 0 2
owner:  gemento

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 joshnuss@gmail.com, released under the New BSD License

compatible spree versions
tags spree versions
master ~> 2.4.6
authors
Joshua Nussbaum