Coder Social home page Coder Social logo

leggers / spree_easypost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dynamomtl/spree_easypost

0.0 2.0 1.0 280 KB

Gem to connect a Spree app to EasyPost

Home Page: shop.bombsheller.com

License: BSD 3-Clause "New" or "Revised" License

Ruby 95.26% JavaScript 4.74%

spree_easypost's Introduction

Spree + EasyPost

This is an extension to integrate Easy Post into Spree. Due to how it works, you will not be able to use any other extension than this for shipping methods. Your own shipping methods will not work, either. But the good thing is that you won't have to worry about that, because Easy Post handles it all for you.

You will need to sign up for an account to use this extension.

Installation

This goes in your Gemfile:

gem 'spree_easypost', github: 'radar/spree_easypost', branch: '2-0-stable'

This goes in your terminal:

rake railties:install:migrations rake db:migrate

This goes into a new file called config/initializers/easy_post.rb:

EasyPost.api_key = 'YOUR_API_KEY_HERE'

Usage

This extension hijacks Spree::Stock::Estimator#shipping_rates to calculate shipping rates for your orders. This call happens during the checkout process, once the order's address information has been provided.

The extension also adds a callback to the "ship" event on the Shipment model, telling EasyPost which rate was selected and "buying" that rate.

Issues

Please let me know if you find any issues in the usual places, with the usual information.

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.