Documentation - Shipping Zones by Drawing

Documentation - Shipping Zones by Drawing

This documentation is describing the latest release of the Shipping Zones by Drawing Premium plugin. The free version can be downloaded from WordPress.org.

Installation

  1. Download the extension from your Arosoft Dashboard
  2. Navigate to Plugins -> Add New
  3. Then click Upload Plugin
  4. Now click Choose File and select the .zip
  5. Click Install Now
  6. Deactivate the free version of Food Online (if activated)
  7. Click Activate Plugin

Update of new version

  • Download the new version from your Arosoft Dashbord
  • Remove your current installation of Food Online Premium from your Plugins tab at the WordPress dashboard.
  • Install the new version as above.

Changelog

Get information on the latest and previous releases from the changelog.

Getting Started

To get started with Shipping Zones by Darwing you will need to a Google Maps API Key.

Be sure to include Maps JavaScript API, Places API, Geocoding API and Directions API as shown in the figure below.

Selection of APIs

It is recommended to restrict access to the key by IP number or HTTP-address. Remember to add an asterix (*) if you don´t adding the exact path. For example https://arosoft.se/*

Restriction of API Key

Insert the API Key at the settings page which can be found as a tab in the WooCommerce Settings as shown below.

Plugin Settings

The plugin settings page can be found as a tab at the WooCommerce settings section.

Show only lowest cost shipping method?

Check this option if you only like to show the "Shipping Zones by Drawing" shipping method with the lowest cost at checkout.

With this option enabled, you can use multiple shippings methods with different zone restrictions and minimum order value restrictions and only show the customer the lowest cost method at checkout.


Hide shipping costs at cart page?

The WooCommerce cart page can calculate shipping costs but due to that the full customer delivery address is not set, that calculation may not be accurate when the customer type in their precise delivery address at checkout. 

Therefore it may be good practise to hide shipping costs at cart page when the shipping costs are depending on an precise delivery address.


Deactivate Post Code restriction

Some countries or areas may have insufficient post code coverage. Therefore, it is possible to deactivate the delivery address restriction regarding a correct post code.

Force shortcode [szbd]?

Check this option to force loading of shortcode scripts. That may be needed if showing the shortcode in popups etc.

De-activate Google Maps API?

If Google Maps is running from other plugins or Theme with conflicts, there may be a solution to de-activate Google Maps running from Shipping Zones by Drawing Plugin.


Debug mode

When debug mode is activated, the response from the Google calls are shown at the checkout page.


Secondary Google Maps API Key

If your main API Key has restrictions by HTTP referrers (web sites) you will need to enter a secondary API Key for the server to server Directions API requests which is used for calculation of dynamic shipping rates. This Key can not be restricted by HTTP referrers (web sites) and only need the Directions API activated.


Set Store Location

The store location will be used as a starting point for transport when calculating dynamic shipping prices and when using transportation distance as a shipping method restriction.

It will also be the midpoint when radius is used as a restriction of a delivery method, and the midpoint of circles displayed with the shortcode [szbd].

By default, the store location will be geolocated from the WooCommerce store address. However, it is recommended to select and save a store location on the map. It will prevent unnecessary Google requests.

Select a store location from the map by clicking on a desired location.


Draw a Shipping Area

To draw your own shipping area that can be used as a zone restriction at a shipping method, go to "Shipping Zones by Drawing" found at the WooCommerce section at the dashboard.

Setup of WooCommerce Shipping Zones

If you are a beginner working with WooCommerce Shipping Zones, it is recommended to first read trough the documentaion.

Be sure that you are aware of the WooCommerce shipping zones functionality, and especially that only shipping methods from the first matched zone are being included at checkout.

Shipping zones match customer address from top to bottom — the first to match the customer address is always used. If no custom zones match, then Locations not covered by your other zones is used.

WooCommerce Shipping Zones Documentation

With this in thought it might be best to add all of your Shipping Zones by Drawing methods in one single zone, for example your country.

Add Shipping Method

When adding a new shipping method to a zone, select "Shipping Zones by Drawing". The options avalible to the method are shown below.

The method options avalible are described below.

Title

Choose the metod title to be shown at checkout

Distance Unit

Choose if to use the metric (km) or the imperial (miles) system. This selection will be used when setting a restriction by transportation distance or when setting a shipping rate by transportation distance.

Shipping Rate

When using a dynamic shipping rate the WooCommerce shop address will be used as origin for the calculation.

  • Flat Rate - enter the flat shipping rate in the option below
  • By Transportation Distance - the shipping rate will calculated ( distance in km/miles x Distance Unit Rate). If this option is used, make sure to  add a secondary Google Maps API Key at the plugin settings section. This key can not be restricted by HTTP. Read more.
  •  By Fixed Rate + Transportation Distance -  the shipping rate will calculated (Fixed Rate + distance in km/miles x Distance Unit Rate). If this option is used, make sure to  add a secondary Google Maps API Key at the plugin settings section. This key can not be restricted by HTTP. Read more.

Tax Status

Select if the shipping rate is taxable or not.

Minimum Order Amount

Choose if to use a minimum order amount. If the amount is not reached, the delivery method will not be shown at checkout.

Transport Mode

Choose if shipping will be by car/truck or by bike. The selection will be of importance when calculating the transportation time.

Restrict the Shipping Method

You can choose to resstrict the shipping method by a zone or by transportation distance or transportation time. If only one restriction is used, it must be fulfilled. If using multiple restriction, you can choose if to make a restricton criticle. A restriction marked as critical must be fulfilled. If your restictions is not marked as critical, at least one restriction must pass.

When using a restriction by radius, transportation distance or transportation time the WooCommerce shop address will be used as origin for the calculation.

  • Restrict by Zone - Choose a drawn shipping zone or use a radius from the shop address in km/miles to define a zone
  • Restrict by Transportation Distance - specify a maximum transportation distance in km/miles from the shop address
  • Restrict by Transportation Time - specify a maximum transportation time from shop address in minutes using your selection of car/truck or bike

Show a Delivery Zone Map

Use shortcode [szbd ids="xx,yy" title="Delivery Zones" color="blue, #c87f93" ] to display a delivery map.

The arguments are:

  • ids – a list of drawn maps by post ids (required)
  • title – the maps title to display above the map (optional)
  • color – a list of colors corresponding to the (ids list) delivery zones polygons (optional)
  • interactive – set to “true” if to enable user map interaction (optional, default is false)

FAQ

Why doesn't dynamic shipping rates work?

  1. Make sure to  add a secondary Google Maps API Key at the plugin settings section. This key can not be restricted by HTTP. Read more
  2.  Then make sure your WooCommerce shop address is valid. At the plugin settings page, you are able to test the geolocation of your shop address.

Why doesn't my drawn shipping methods show up at checkout?

Remember that WooCommerce always chooses the first shipping zone that match an address. So remember to put all your drawn shipping methods per country / region / postcode in the same shipping zone.

Which APIs of Google are needed?

Your Google API key needs the Maps JavaScript API, Places API, Geocoding API, Directions API .

Is there any way to display a delivery map to customers? 

Yes, use shortcode [szbd ids="id1,id2" title="Delivery Zones" color="#c87f93"] to display a delivery map.

The arguments are:

  • ids - a list of drawn maps by post ids (required)
  • title - the maps title to display above the map (optional)
  • color - color of the delivery zones polygons (optional)
  • interactive - set to "true" if to enable user map interaction (optional, default is false)




Get Plugin