Configure the Shipping Costs Based on Distance extension

This is an article from the Shipping Costs Based on Distance extension for Magento 2. We've tried our best in the preparation of this help article. If you do not find the answer you were looking for, you can always send us a message through this form.

General: API and Location Details

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.

Shipping Method: Name and Position

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.

Shipping Method: Calculation and Pricing

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

Shipping Method: Adress not Found

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.

Limit Rules

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.

Debug & Logging

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.

Direct Help

At Magmodules, our support team is here to help you every step of the way. If you can't find a solution in our Knowledgebase, simply fill in the form below. We are in the Central European Timezone, and all your details are securely sent to us.
The more information you provide, the better we can assist you. Trust us to guide you through any challenge and ensure a seamless experience with our products and services.
Support by e-mail contact@magmodules.eu
star star star star star
star star star star star
Hugo de Groot
Uitstekende support! Wij gebruiken o.a. de Rich Snippets Suite extensie voor onze Magento 2 webshop (Hyvä) en hadden een specifieke vraag over structured data op PLP-pagina’s. Binnen no-time kregen we een inhoudelijk en duidelijk antwoord. Zeer prettig contact en goed onderbouwde uitleg. Absoluut een betrouwbare partner voor Magento-extensies!
Google This week
star star star star star
star star star star star
Rick Manders
Dit is nog eens een modulemaker! Stopt niet tot het werkt, blijft enthousiast. Grote dank!
Google Last week
star star star star star
star star star star star
L vd B
Topservice van Magmodules dat maak je niet vaak meer mee! Toen we tegen vervelende problemen aanliepen met onze Mollie betalingen, klopten we in eerste instantie aan bij Mollie zelf. Helaas bleef een reactie lang uit en de hulp die wij kregen was niet echt constructief. Gelukkig bracht Frank van Magmodules daar meteen verandering in. Hij pakte het probleem direct op, dacht actief met ons mee en nam echt de tijd om alles helder uit te leggen. Niet alleen werd het probleem snel opgepakt, maar we leerden onderweg ook nog wat bij over de technische achtergrond. Kortom: Magmodules levert niet alleen een goed Magento product, maar staat er ook echt als het nodig is. Zo’n service zie je tegenwoordig niet vaak meer! Dankjewel Frank.
Google 13 May 2025
star star star star star
star star star star star
Jeroen Custers
Zeer professionele Magento plugin developer met hele goede ondersteuning.
Google 30 Apr 2025
star star star star star
star star star star star
Rick Manders
De snelheid van reageren en het niveau van meedenken zijn bewonderingswaardig! Uniek bij een modulebouwer! Een kleine vijf jaar ervaring met Magmodules en telkens staan ze voor je klaar bij inhoudelijke vragen. Goed bezig.
Google 28 Apr 2025
star star star star star
star star star star star
Richard van Beckhoven
Excellent service yet again from the Magmodules team that provide super support, quickly understand the issues and deliver solutions that are stable and work. Greatly appreciate your help.
Google 24 Apr 2025
star star star star star
star star star star star
Ernests Roberts Verins
the support responded very quickly
Google 13 Mar 2025
star star star star star
star star star star star
Jesse Williams
I've been using their google reviews software for a year now, without issues. I had a question recently and emailed them, and was responded to within a fee hours. Fantastic service. Truly great.
Google 06 Mar 2025
star star star star star
star star star star star
Smart Ink
Al lange tijd klant. Gebruik diverse software. Indien je iets niet weet wordt je altijd netjes en snel geholpen!
Google 06 Mar 2025
star star star star star
star star star star star
Paul Leenheer
Support op Mollie module voor Magento 1 gekregen waar deze toch al een tijdje end of life is! Dat zijn partners waar je wat aan hebt. Goed voor je merk (Mollie), goed voor je eigen dienstverlening en goed voor henzelf. TOP!
Google 19 Feb 2025