📤 Restore show_zero_stock_products functionality in Spree 2.0+
MIT License
Restore the show_zero_stock_products
preference & related functionality in Spree 2.0+
The preference defaults to true, which is the out-of-the-box behavior in Spree 2.0+
Set it to false
to avoid showing products with zero stock on any product listing/taxon pages.
This documentation is for the master branch. You probably want 2-0-stable, 2-1-stable, or 2-2-stable, or 2-3-stable, or 2-4-stable instead
gem 'spree_zero_stock_products', github: 'swrobel/spree_zero_stock_products'
bundle
config/initializers/spree.rb
:Spree.config do |config|
config.show_zero_stock_products = false # Default is true
end
Versions files the pattern MAJOR.MINOR.PATCH SemVer-style. MAJOR.MINOR version will always match the Spree version that gem is compatible with. PATCH version is incremented as new bugfix releases of this gem come out, indepently of new Spree PATCH versions.
For example, version 2.1.0 is compatible with the Spree 2.1.x series, while version 2.0.4 is compatible with the Spree 2.0.x series.
You should not need to worry about this, as the gemspec has the appropriate constraints. But hey, the more you know.
This extension is tested against the following rubies:
As well as the following databases:
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
Copyright (c) 2013 Stefan Wrobel, released under the MIT License