Configure the Shipping Costs Based on Distance extension
Enable
To enable and use this extension, a valid Google Maps API Key for the following parts are needed;
- Maps JavaScript API
- Distance Matrix API
API and Location Details
A Google Maps API Key is required to calculate distances and can be obtained from the Google Cloud Platform. The Google Cloud platform is free to use with a limit on the requests, more information can be found here. In case of dysfunction, enable the debugging option to write the Google API calls to the debug log file and check the permissions and results of the API calls.
API Key
Paste your Google maps API key.
Store Address
Paste in the exact address of the store/pickup point.
Configure the title, method name, and sort order to make sure this Shipping Method is communicated with the right details in the front-end.
Enabled
Set if you want to enable or disable the shipping method for the website.
Title
Set a Title for this shipping method.
Method Name
Set a Method name for this shipping method.
Sort Order
Select the sort order where you want to show the shipping method.
Configure the metric, way of rounding the distance and price together with the final price calculation table. The Shipping Price can be calculated per type.
Fixed
This price will be a fixed price for the distance range that is configured.
Per/metric
Can be an addition on the Fixed price. The configured price will be multiplied per metric (Kilometer or miles).
Metric
Set to kilometers or mail
Round Distance
Set to 2 decimal, 1 decimal, 0 decimal (normal), 0 decimal - ceil / up or 0 decimal - floor / down.
Round Total Price
Set to 2 decimal, 1 decimal, 0 decimal (normal), 0 decimal - ceil / up or 0 decimal - floor / down.
Shipping Price
Set the Shipping price with a from and to value for a specific price.
Please note that you can combine the types, so, for example, start with a fixed price of € 25,- between the 0 and 50 km and add a metric price of €0,31 per kilometer to this €25,- so for 10km, the price would be; € 25,- + (10*0,31) € 3,10 = € 28,10
Configure the result if the filled-in address of the client is not found by Google.
If address not found
Select if you want to show a message or hide the method
Message
Set a message if chosen, a default message could be ; The order can't be delivered on this location as the address cannot be found.
Free Shipping
If you want to offer free shipping, enable this option and configure the minimum order amount when free shipping needs to enabled.
Enable Free Shipping
Select if you want to enable or disable Free shipping
Minimal Order Amount
Set the minimum order amount for free shipping
Minimal and maximum shipping price
If you want to set a minimal and maximum price for this shipping method, enable and configure this option.
Use Minimum and Maximum
Select if you want to enable or disable a Minimum and Maximum shipping price
Minimal Price
Set the minimum shipping price
Maximum Price
Set the maximum shipping price
Limit by Country
If you want to offer this shipping method only for specific countries, enable and configure this option.
Ship to Applicable Countries
All Allowed Countries
Limit by Order Amount
If you want to offer this shipping method only for specific order amounts, enable and configure this option.
Enable Minimum Order Amount
Select if you want to enable or disable a Minimum order amount when the shipping method is active.
Minimum Order Amount
Set the minimum order amount.
Below the Minimum Order Amount
Select if you want to hide the method or show a message, a message could be; The order can't be delivered on this location as it's below the minimum order amount.
Limit by Distance
If you want to offer this shipping method only for a maximum distance, enable and configure this option.
Enable Maximum Distance
Select if you want to enable or disable a maximum distance when the shipping can be used.
Maximum Distance
Set the maximum distance.
Above Maximum Distance
Select if you want to hide the method or show a message, a message could be; The order can't be delivered on this location as it's above our maximum distance.
Enable this function to write debug records and log events, API calls, and other debugging-related information into a debug.log file.
Errors are always logged and written into the error.log file.
Use the Check last 100 debug log records link to open a modal to directly get insight into the debug log records.
Use the Check last 100 error log records link to open a modal to directly get insight into the error log records.