-
Notifications
You must be signed in to change notification settings - Fork 0
Solidus Easypost Setup Guide
This goes in your Gemfile:
gem 'solidus_easypost'This goes in your terminal:
rake railties:install:migrations
rake db:migrateThis goes into a new file called config/initializers/easy_post.rb:
EasyPost.api_key = 'YOUR_API_KEY_HERE'To enable DDP, place this in the file config/initializers/easy_post.rb:
Spree::Easypost::Config.ddp_enabled = trueWe also have the below configurations available.
Spree::Easypost::Config.api_enabled = true # default
Spree::Easypost::Config.address_verification_enabled = false # default
Spree::Easypost::Config.verify_strict_enabled = false # default- Set up your Stock Location with a valid address
- Make sure all variants have their weight set. Weight is in ounces. Weight cannot be 0.
- To generate shipping method options, attempt checkout with an address from each country you ship to.
- You will receive an error "We are unable to calculate shipping rates for the selected items." Go to the admin panel for shipping methods. There will be new shipping methods available.
- To make a shipping method available to users, edit the shipping method and apply "Available to Users". Now you can complete checkout.
In the admin panel, when a shipment is ready, click ship and the shipping label will be generated in Easypost.
To enable address verification, set the configuration preference address_verification_enabled to true. The default is false.
Place this in the file config/initializers/easy_post.rb:
Spree::Easypost::Config.address_verification_enabled = trueBefore transitioning to delivery, the address will be verified through Easypost. If the address is invalid, checkout will be refused and an error message will flash with Easypost's API error response message.
The verify strict option is available in the configuration, but if an address is invalid, it raise an exception.
Spree::Easypost::Config.verify_strict_enabled = false # defaultWe have added the ability to handle digital products, or non-shippable products.
- Create a stock location only for digital products: Check
is digitalto true. - Shipping Category “Digital Products” or whatever you would like
- Shipping Method for digital products:
- Set stock location to the is digital enabled stock location
- Set the shipping category to digital products
- Set flat rate of 0
- Assign shipping category to products that are digital products
- Adjust stock on digital products to only have backorderable checked on the digital product stock location. 0 on hand for all.
- Adjust stock on all non digital products to have backorderable set to false.