Configure Distance Shipping in Magento 2
Looking for Magento 2 distance-based shipping extension? View the full Magento 2 distance-based shipping extension page to explore features, configuration options, and pricing.
Complete configuration reference for the Shipping Costs Based on Distance extension. Configure your Google Maps API connection, pricing rules, and delivery limits all from one place.
Location: Magmodules → Shipping Costs Based on Distance
General
Basic module and API settings.
| Setting | Description |
|---|---|
| Enabled | Master switch for the extension. |
| Add Shipping Estimation to Product Page | Show estimated shipping cost on product pages. Requires customer to enter postcode. |
API and Location Details
| Setting | Description |
|---|---|
| API Key | Your Google Maps API key. Required for distance calculations. |
| Store Address | Full address of your store/warehouse. This is the origin point for all distance calculations. Include street, city, postal code, and country. |
| Test Credentials | Button to verify your API key and store address work correctly. |
Shipping Method
Configure how the shipping method appears and calculates prices.
Name and Position
| Setting | Description |
|---|---|
| Enabled | Enable this shipping method in checkout. |
| Title | Carrier title shown in checkout (e.g., "Local Delivery"). |
| Method Name | Specific method name (e.g., "Distance-based shipping"). |
| Sort Order | Display order among other shipping methods. Lower = higher position. |
Calculation and Pricing
| Setting | Description |
|---|---|
| Metric | Distance unit: Kilometers or Miles. |
| Round Distance | How to round calculated distance: No rounding, Round up, Round down, or Round to nearest. |
| Round Total Price | How to round final shipping price: No rounding, Round up, Round down, or Round to nearest. |
| Shipping Price | Dynamic pricing table. See Pricing Setup guide for details. |
Address Not Found
Configure behavior when Google can't find the customer's address.
| Setting | Description |
|---|---|
| If address not found | Hide shipping method or Show with message. |
| Message | Error message shown to customer when address not found. |
| Use default country on first load | Use store's default country before customer enters address. |
Limit Rules
Control when the shipping method is available.
Free Shipping
| Setting | Description |
|---|---|
| Enable Free Shipping | Offer free shipping above a threshold. |
| Minimal Order Amount | Order subtotal required for free shipping. |
Minimal and Maximum Shipping Price
| Setting | Description |
|---|---|
| Use Minimum and Maximum | Enable price caps. |
| Minimal Price | Shipping cost will never be lower than this. |
| Maximum Price | Shipping cost will never exceed this. |
Limit by Country
| Setting | Description |
|---|---|
| Ship to Applicable Countries | All Allowed Countries or Specific Countries. |
| Ship to Specific Countries | Select which countries this method is available for. |
Limit by Order Amount
| Setting | Description |
|---|---|
| Enable Minimum Order Amount | Require minimum order value to show this method. |
| Minimum Order Amount | Minimum cart subtotal required. |
| Below the Minimum Order Amount | Hide method or Show with message. |
| Message | Message shown when order is below minimum. |
Limit by Distance
| Setting | Description |
|---|---|
| Enable Maximum Distance | Set a delivery radius limit. |
| Maximum Distance | Maximum distance from store (in configured metric). |
| Above Maximum Distance | Hide method or Show with message. |
| Message | Message shown when customer is too far. |
Conditions
Advanced product eligibility rules.
| Setting | Description |
|---|---|
| Enabled | Enable product-based conditions. |
| Show Distance Shipping only for eligible products | Only show method if all cart items are eligible. |
| Allow Distance Shipping for mixed carts | Allow method when cart has both eligible and ineligible products. |
| Hide other shipping methods when Distance Shipping is available | Make this the only shipping option when available. |
Debug & Logging
Troubleshooting tools.
| Setting | Description |
|---|---|
| Debug Mode | Enable detailed logging of API calls and calculations. Logs are written to var/log/. |
| Selftest | Run diagnostic checks on configuration. |
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team
For a complete overview of features and configuration options, see Magento 2 distance-based shipping extension.