Code Monkey home page Code Monkey logo

spree_simple_weight_calculator's Introduction

forked from freego/spree_simple_weight_calculator

Change log

  • use spree_core ~> 3.0.0
  • change spec test to pass

Spree Simple Weight Calculator

Includes some shipping costs calculator for Spree Commerce.

SimpleWeight

It's based on the total weight of the package. You simply specify a weight/price table in the textarea like this:

5:10
10.5:15
100:50.5

This means:

  • up to 5kg cost is 10
  • up to 10.5kg cost is 15
  • up to 100kg cost is 50.5
  • over 100kg this shipping method doesn't apply

An optional handling fee can also be added.

ItemWeight

Similar to SimpleWeight, but shipping cost is calculated on each single item of the package, and them summed up. Useful if each item is shipped in different pack.

Usage

Add to your Gemfile

gem 'spree_simple_weight_calculator', github: 'freego/spree_simple_weight_calculator',
                                      branch: '2-2-stable'

Create a shipping method from the admin interface and choose the right calculator.

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

Credits

Inspired by https://github.com/dancinglightning/spree-postal-service .

Copyright (c) 2014 Alessandro Lepore http://freegoweb.it - Released under the MIT License

spree_simple_weight_calculator's People

Contributors

alepore avatar shoji-k avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

reelman cookieshq

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.