Distance based Delivery costs (Magento 2) – Google-Powered Logistics
Accurate local delivery fees at checkout
- Google Distance Matrix API with Haversine fallback
- Flexible Pricing Per km, tiers, or flat rate
- Service Area Block out-of-range addresses
- Delivery Windows Slots from location hours
Accurate local delivery fees
Flat-rate shipping ignores real distance, so stores undercharge long runs or overcharge nearby customers. Distance Delivery quotes fees from Google Distance Matrix with Haversine fallback, service-area checks, and delivery windows.
- Google Distance Matrix driving distance and time
- Haversine fallback when Google calls fail
- Per-km, tier table, or flat delivery pricing
- Blocks addresses outside your max delivery radius
- Schedule and slots from Store Locator hours
Built for your store
Add-on for Magento 2.4.x that requires Store Locator and exposes Distance Based Delivery as a checkout carrier.
- Works with Magento 2.4.x Open Source & Adobe Commerce
- Requires Toweringmedia Store Locator and Toweringmedia Base
- Pricing under Toweringmedia Distance Delivery config
- Nearest store origin within max distance
- Quote logging for distance, fee, and provider payload
How It works
See It In Action
Rate Calculation Engine
- Primary routing via Google Directions API (driving distance/time) with Haversine fallback when APIs are rate-limited.
- Supports per-km, tier-table, and flat-rate pricing modes by distance.
- Session-based caching and quota safeties prevent overages on high-traffic checkouts.
- Picks the optimal fulfillment location per order using Store Locator data and optional geographic restrictions.
- Handles “single delivery only” items, multi-stop routes, and store-specific blackout windows.
Delivery Slot & Schedule Management
- Generates one-hour delivery windows based on each location’s delivery hours and blackout dates.
- Enforces lead-time automatically (e.g., 1-day vs. 2-day products) by reading tm_lead_time_days.
- Provides REST endpoints for fetching available slots and for rescheduling .
Delivery Quote Logging
- Logs lat/lng, distance, duration, and raw API payloads into toweringmedia_delivery_quote_log.
- Delivery tasks appear alongside pickup tasks on the Fulfillment Board with local window labels and solo-delivery badges.
Security & Observability
- Secure Google API key storage with sandbox/live toggles (shared with Store Locator).
- Event observers attach quote logs to orders, ensuring full audit trail.
- Built-in logging for API retries, quota warnings, and distance anomalies.
Technical Specs
- Composer package: toweringmedia/module-distance-delivery
- Declarative schema introduces toweringmedia_delivery_quote_log
Ideal For
- Retailers running their own local courier fleet with strict delivery windows
- Bakeries/caterers scheduling premium same-day deliveries
- Enterprises replacing third-party shipping calculators with a branded experience
Key Features
Distance-based Magento shipping rates from your Store Locator locations, with Google routing and checkout service-area checks.
- Google Distance Matrix Driving distance and time from store origin to the delivery address.
- Haversine fallback Great-circle distance when Google quotas or API calls fail.
- Three pricing modes Per-kilometer, distance tier table, or a flat delivery fee.
- Nearest store origin Picks the best Store Locator location within max distance.
- Out-of-range blocking Rejects addresses outside your configured delivery radius.
- Schedule and slots REST schedule and availability from location hours and blackouts.
- Quote logging Stores distance, fee, and provider payload for order audit.
- Checkout shipping method Adds Distance Based Delivery as a Magento carrier option.
Demo
Docs & Support
📘 Documentation
Get started quickly with our detailed user guide. The documentation covers everything from installation to advanced distance-based delivery configuration and Google Maps integration.
- Step-by-step installation instructions
- Configure Google Maps API and store origin address
- Set distance pricing rules and delivery zones
- Manage checkout validation and service availability
- Best practices for accurate delivery logistics
💬 Support
Need help? Our Magento experts are here to assist you with setup, configuration, and troubleshooting.
- Quick and reliable email support
- Help with installation and delivery rule setup
- Troubleshooting Google Maps and distance issues
- Guidance for pricing logic and checkout integration
- Regular updates and Magento compatibility support
Frequently Asked Questions
The extension calculates delivery charges based on the real travel distance between your store and the customer address, helping you apply accurate Magento 2 delivery pricing.
Yes, the module uses Google-powered mapping services to calculate travel distance and route data for more reliable delivery fee calculations.
Yes, you can configure delivery areas, minimum charges, distance ranges, pricing logic, and availability rules directly from the Magento admin panel.
Yes, the extension can validate customer addresses and restrict checkout when an address falls outside your configured delivery service range.
Do I need Store Locator to use Distance Delivery?
Yes. Distance Delivery is a separately sold add-on that requires Toweringmedia Store Locator for store locations, delivery hours, blackout dates, and the Google Maps API key. Store Pickup is optional and sold separately.
Where do I configure delivery pricing and the shipping method?
Go to Stores → Configuration → Toweringmedia → Distance Delivery for enablement, max distance, prep time, and pricing mode (per km, tier table, or flat rate). Enable the carrier under Stores → Configuration → Sales → Delivery Methods → Distance Based Delivery.
What happens when a customer is outside my delivery area?
The module validates the address against your maximum delivery distance. Out-of-range addresses do not get a local delivery rate; when Show Method if Not Applicable is Yes, checkout can show a clear out-of-area shipping error instead of silently omitting the method.
Do you offer support?
Yes. Email support@toweringmedia.com or call (773) 466-2454. Updates and support continue while your subscription is active.
Can I try a demo?
Yes. Use the View Demo button on this page. For a guided walkthrough, email support@toweringmedia.com.
What happens when I don’t renew?
Uncheck auto-renew at purchase, or cancel later. You keep access until the end of the paid period. After that, updates and support stop.
Technical Specifications
- Magento Version: Compatible with Magento 2.4.x (Open Source & Adobe Commerce)
- PHP Version: PHP 8.2+ compatible
- Framework: Built using Magento 2 native architecture (no core overrides)
- Installation Type: Composer / Manual installation supported
- Module Dependency: Requires toweringmedia/module-base, toweringmedia/module-store-locator, and a Google Maps API key
- Delivery Calculation: Distance-based shipping charges
- Distance Source: Google Maps route and distance services
- Pricing Rules: Per-km, tier table, or flat rate
- Address Validation: Supported at checkout
- Service Area Control: Limit delivery by distance or zone
- Multi-Store Support: Yes
- Store Scope Configuration: Website / Store View level
- Checkout Compatibility: Works with Magento checkout workflows
- Cron Support: Fully compatible with Magento cron jobs
- Order Fulfillment: Improves local delivery logistics
- Admin Configuration Path: Stores → Configuration → Toweringmedia Extensions → Distance Delivery
- Security: Uses Magento native ACL and secure API configuration
- Performance Impact: Minimal and optimized implementation
- Use Cases: Restaurants, grocery, flower, pharmacy, local delivery stores
Compatible with your Magento 2 store
Compatible with Magento 2.4.x (Open Source and Adobe Commerce) and PHP 8.1, 8.2, and 8.3. Requires toweringmedia/module-store-locator and toweringmedia/module-base. Google Maps API key is configured in Store Locator; delivery pricing lives under Stores → Configuration → Toweringmedia → Distance Delivery.
-
Magento 2.4.x
Open Source & Adobe Commerce
Updates & supportKeep your store running smoothly