Workarea Shipping Estimation

A Workarea Commerce plugin that adds shipping estimation functionality to the storefront cart page.

Getting Started

Add the gem to your application's Gemfile:

# ...
gem 'workarea-shipping_estimation'
# ...

Update your application's bundle.

cd path/to/application
bundle

Configuration

This plugin utilizes the Geocoder gem for gathering address information required to estimate shipping from a postal code. Depending on the services you decide to use, it may require configuring Geocoder.

Workarea recommends using Google for geolocation services. However, Google is not free and requires the use of an API key.

To configure a pay-as-you-go Google API key with Geocoder:

Geocoder.configure(
  lookup: :google,
  api_key: Rails.application.secrets.google_maps_api_key
)

Testing

When writing tests for/around this gem, make sure to wrap your submissions of the shipping estimate with VCR:

VCR.use_cassette(:geocoding) do
  within '#estimate_shipping_form' do
    select 'Ground - $7.00', from: 'shipping_service'
    click_button 'estimate_shipping'
  end
end

Workarea Commerce Documentation

See https://developer.workarea.com for Workarea Commerce documentation.

License

Workarea Shipping Estimation is released under the Business Software License