Spree extension to hide taxons from menus
Last updated on: March 06 at 07:58 PM
source code bug trackerThis extension adds a hidden
field to Spree::Taxon
and hides taxons with hidden == true
from the default menus. It also shows an additional Hidden
checkbox in the admin panel.
This is a reimplementation of the great work done by @markalinn updated for Spree 3.1+
Add this extension to your Gemfile with this line:
ruby
gem 'spree_hideable_taxons', github: 'theam/spree_hideable_taxons', branch: 'X-Y-stable'
(Replace X-Y-stable
with the version of Spree you're using)
Install the gem using Bundler:
ruby
bundle install
Copy & run migrations
ruby
bundle exec rails g spree_hideable_taxons:install
Restart your server
If your server was running, restart it so that it can find the assets properly.
hidden
fieldSpree::FrontendHelper
module, which is not the best for extensibility. I think that helper should be transformed in a partial in Spree so it can be extended via Deface
.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_hideable_taxons/factories'
Follow the classical Thanks for being awesome methodology
: Fork, improve and send your pull requests!
Copyright (c) 2017 The Agile Monkeys, released under the New BSD License
tags | spree versions |
---|---|
master | >= 3.1.0, < 4.0 |