Magento 2 Distance Delivery User Guide
Local and regional merchants need delivery prices that match real road distance—not a single flat fee. This guide covers Towering Media Distance Delivery ($399): Google Distance Matrix quoting, Haversine fallback, delivery windows, and checkout shipping control.
For deep install screenshots and edge-case config, see the detailed wiki documentation. Product details and add-to-cart live on the Distance based Delivery costs (Magento 2) – Google-Powered Logistics page.
Table of Contents
Why Flat Delivery Fees Break Local Ops
Flat or zone-only delivery fees create margin leaks and checkout friction for kitchen, grocery, and local logistics stores:
- Guesswork pricing — far deliveries undercharged; nearby customers overcharged
- No slot discipline — customers pick impossible delivery times without cutoffs or capacity rules
- Weak routing data — drivers lack geo context for run grouping and proof-of-delivery analytics
- Disconnected tools — locator, pickup, and delivery modules do not share hours or blackout calendars
What This Extension Solves
The Distance Delivery extension quotes delivery using Google Distance Matrix with Haversine fallback, then ties pricing to location-aware slots and windows.
- Google Distance Matrix–driven delivery quoting with fallback Haversine routing
- One-hour delivery windows, slot management, and location-aware pricing
- Geo-logging for driver run grouping, proof-of-delivery, and analytics
- Works with Store Locator / Store Pickup / Fulfillment Suite workflows
Key Features
- Per-location origins and service-area aware delivery fees
- Delivery windows with lead time and cutoff controls
- Admin-friendly configuration under Towering Media shipping settings
- Hyvä-friendly shipping method integration (no fragile frontend hacks)
- Magento 2.4.x Open Source & Adobe Commerce
System Requirements
- Magento: 2.4.4 – 2.4.7+ (Open Source & Adobe Commerce)
- PHP: 8.1–8.3
- Google Maps / Distance Matrix API credentials (recommended for production accuracy)
- Related location modules recommended for full local-ops stack (Locator / Pickup / Fulfillment)
General Composer install steps for Towering Media modules: Installation guide.
Installation Overview
Step 1: Authenticate Composer
Add your Towering Media credentials to auth.json in the Magento root (same pattern as other Towering Media extensions).
Step 2: Require the package
composer require toweringmedia/module-distance-delivery
Step 3: Enable and upgrade
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
Enable the module(s) listed in the package module.xml / wiki if your package uses explicit module:enable. Production stores should follow your normal deploy process. Need help? Contact Towering Media or browse Magento 2 Extensions.
Configure in Admin

- Open Magento Admin → Stores → Configuration (Towering Media / Distance Delivery section).
- Enable the method and set Google API key + units (miles/km).
- Configure origin locations / store coordinates used for quoting.
- Define delivery windows, lead times, cutoffs, and fee formulas.
- Save config, flush cache, then quote a cart at multiple distances.
Validation Checklist
- Near address returns a lower fee than a far address (when configured that way).
- Unavailable slots/blackouts do not appear at checkout.
- Order places with the selected delivery window and fee intact.
- Admin order / fulfillment views show the expected delivery metadata.
Troubleshooting
- No rates: verify module enablement, method active, and API key scope.
- Wrong fee: check origin coordinates and unit settings (mi vs km).
- Slots missing: review hours, blackouts, lead time, and capacity with Store Locator/Pickup.
Frequently Asked Questions
Does this replace carrier UPS/FedEx rates?
No. It is for distance/local delivery logistics. Pair carrier modules for parcel shipping.
Do I need Google Maps billing?
Production Distance Matrix usage typically requires a billed Google Cloud project. Keep Haversine fallback enabled.
Does it work with Fulfillment Suite?
Yes—Distance Delivery tasks commonly feed the kitchen/driver board when the suite is installed.
Related Extensions & Resources
Also useful: Installation · All Magento 2 extensions · Contact support.
Want our Magento team to handle it?
Towering Media installs, configures, and customizes Distance Delivery for Magento 2 stores — along with API integrations, accounting and CRM sync, and carrier or fulfillment connections.
Ready for accurate local delivery fees?
Install Distance Delivery, connect Google quoting, and stop guessing at checkout.