Thie extension adds wholesaler role and wholesale attribute to products.
Install extension than edit any product. Mark proudct as for wholesaler. Edit or create user and add wholesaler role.
If user has roles 'user' and 'wholesaler' can see wholesale and non wholesale products. If user has 'wholesale' role only, can see only wholesale products. If user has role 'user' role only, can see only non wholesale products.
Add spree_wholesaler_products to your Gemfile:
gem 'spree_wholesaler_products', git: 'https://github.com/netguru/spree_wholesaler_products.git', branch: '2-1-stable'
Bundle your dependencies and run the installation generator:
bundle bundle exec rails g spree_wholesaler_products:install
Currently supported Spree version: 2.1.X
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 spec
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
Copyright (c) 2014 Netguru, released under the New BSD License