spree_wholesaler_products

A Spree extension that adds wholesaler role and wholesale attribute to products.

Last updated on: February 25 at 09:52 AM

source code bug tracker
Opensource
2 2 0
owner:  netguru

SpreeWholesalerProducts

Build Status Code Climate Test Coverage

Thie extension adds wholesaler role and wholesale attribute to products.

How it works?

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.

Installation

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

Additional info

Currently supported Spree version: 2.1.X

Testing

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:

require 'spree_products_qa/factories'

Copyright (c) 2014 Netguru, released under the New BSD License

compatible spree versions
tags spree versions
master ~> 2.1.4
authors
Netguru