Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Spree Calculator to compute a flat rate within a range
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app/models/spree/calculator
config/locales
lib
script Scaffolded the gem
spec
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
Versionfile
spree_flat_in_range.gemspec

README.md

SpreeFlatInRange

This spree extension is no longer maintained; it was developed for Spree 1.0.0, but upgrading to 1.x.0 versions is problematic, due to bugs in Spree's "dummy" app building and its rapid changing API

A Spree calculator to calculate fixed adjustments based on ranges.

For example, free shipping above $100, and $4.39 for all orders under $100, would mean a range from 0 to $99.99, that has a fixed shipping rate of $4.39.

Usage

Add to your gemfile in a Spree application:

gem 'spree_flat_in_range', '~> 0.1.x'

Then visit shipping or tax to use the calculation.

TODO

  • Introduce Percent based on range; to allow things like $10 to $30 gives you 10% discount, above $30 gives you 15%.
  • Introduce "infinate" as possible upper boundry; so admins can provide cases like above $100 easier; now they have to simple give a really large number.

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

Copyright (c) 2012 [Bèr Kessels], released under the New BSD License

Something went wrong with that request. Please try again.