Skip to content
Additional calculators for spree
Ruby JavaScript Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LICENSE Added "rake db:migrate" to installation instructions Jul 4, 2011

Additional Spree Calculators

This gem contains additional calculators for Spree Commerce

Currently there is only a single calculator implemented but the infrastructure allows to easily add more.

  • "Weight And Quantity" calculator determines the shipping and handling cost based on total item weigh and number or items in the order.


Add the following line to your Rails 3 application:

gem 'spree_additional_calculators'

And then run:

$ bundle
$ rake spree_additional_calculators:install
$ rake db:migrate

Then go to Configuration and choose Shipping Methods And you will be able to select a new calculator - Weight and Quantity Create the calculator and define the Default item weight. That value will be used if you do not have defined the weight for your products.

After that you can go to Configuration and choose Additional Calculator Rates Click Edit and you will be able to add new or edit/remove existing weight and quantity ranges.

This page is using Javascript to add and remove items in the browser. The changes are made only when you press the Update button.


In order to add a new calculator or fix a bug in existing one you will need both the spree source and the extension source locally on your computer.

$ git clone spree_additional_calculators
$ git clone

You can test the extension by executing following commands:

$ cd spree_additional_calculators
$ rake test_app SPREE_PATH='../spree'
$ rake


There are some screenshots in the wiki.


  • Possibly add some cucumber scenarios
  • Possibly use unobtrusive javascript

Copyright (c) 2011 Jurgis Jurksta, released under the New BSD License

Something went wrong with that request. Please try again.