Spree extension which supports sales weight based pricing.
Add spree_weight_rates to your Gemfile:
Bundle your dependencies and run the installation generator:
bundle bundle exec rails g spree_weight_rates:install
The new WeightRates calculator available it's based on the total weight of the package.
All configurations are described below:
|costs_string||Text||Cost matrix by weight ranges||1:5\n2:7\n5:10\n10:15\n100:50|
|default_weight||Float||Default weight for product without an preset value||1 (1kg)|
|upcharge||Float||Extra cost per kilo of weight exceeds the maximum value set in
|only_integers||Boolan||if set to true, the decimal figures are rounded to the upper integer||true|
You simply specify a table with
price splitted by
: in the textarea, like this:
5.0:10 10.5:15 100.0:50.5
Each new row define a new range of values.
100kg cost is
100kg use upcharge amount to calculate a price for each extra kg.
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) 2014 Acid Labs, all rigths reserved.