This gem is just an extraction of a functionality from a old, custom Spree store and overrides lots of core Spree methods. It's NOT complete, tested or production-ready.
I suggest using Solidus 1.3+.
PriceSelector should facilitate the
implementation of the "price lists" concepts.
Multiple price lists support for Spree.
You can have multiple price lists for each Variant, and assign a different one to each session via some logic.
Add spree_price_lists to your Gemfile:
gem 'spree_price_lists', github: 'freego/spree_price_lists', branch: 'X-X-stable'
Bundle your dependencies and run the installation generator:
bundle bundle exec rails g spree_price_lists:install
This will create a default price list.
This extension is pretty generic and needs some manual intervention to be useful. You must, at least:
- add a custom logic for price list (see below)
- updater all cache keys with
Price List Logic
By default, the default (or first) price list is used. This should not break existing behaviour. You can add your own logic like this:
module Spree BaseController.class_eval do private def get_price_list # your logic here, will use default price list if nil end end end
For example, your logic may be country-based or user-based.
First bundle your dependencies, then run
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
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:
Copyright (c) 2015 Alessandro Lepore, released under the New BSD License