Distance based Delivery costs (Magento 2) – Google-Powered Logistics

Compatible with Magento latest version community edition
Magento 2.4.x
SKU: module-distance-delivery
Edition
  • Community
$399.00
  • 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
  • Seamless integration with Store Locator, Store Pickup, and Fulfillment PWAs
!

The Problem

  • Flat-rate shipping does not reflect real delivery distance or costs
  • Manual delivery zone management becomes difficult as orders grow
  • Stores lose money on long-distance deliveries or overcharge nearby customers
  • Customers expect accurate delivery fees and service availability at checkout

The Solution

Toweringmedia Distance Delivery uses Google-powered distance calculations to charge accurate delivery fees, validate service areas, and automate smarter Magento 2 logistics.

How It works

1
Configure Delivery Rules
Set your store origin, Google Maps API, pricing rules, minimum charges, and supported delivery zones in Magento admin.
2
Calculate Distance
At checkout, the extension measures the customer delivery distance using Google-powered maps and route data.
3
Charge Accurately
Apply real-time delivery fees, validate service availability, and streamline order fulfillment with confidence.

See It In Action

Enterprise Distance-Based Delivery Engine for Magento 2.4
Turn Your Magento Store into a Logistics Control Tower
Toweringmedia Distance Delivery calculates real-time shipping rates from each store location using Google’s mapping APIs, enforces precise delivery windows, and feeds our driver/kitchen PWAs with geo-rich tasks. It’s the missing piece for merchants running their own local delivery fleet or premium courier programs.

Rate Calculation Engine

Google Directions + Haversine Fallback
  • Primary routing via Google Directions API (driving distance/time) with Haversine fallback when APIs are rate-limited.
  • Supports negotiated rates, handling fees, and dynamic surcharges by distance band or geo-zone.
  • Session-based caching and quota safeties prevent overages on high-traffic checkouts.
Origin Intelligence
  • 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 (used by admin modal + kitchen PWA).

Driver & Fulfillment Integration

Geo Logging + Run Grouping
  • Logs lat/lng, distance, duration, and raw API payloads into toweringmedia_delivery_quote_log.
  • The Run Grouping service clusters orders by proximity/time so drivers see curated “runs” in the PWA.
  • Supports auto-cancellation sync (order canceled → driver tasks removed) and proof-of-delivery uploads.
Kitchen + Delivery Boards
  • Delivery tasks appear alongside pickup tasks on the Fulfillment Board with local window labels and solo-delivery badges.
  • Kitchen PWA can reschedule windows on the fly, and driver PWA consumes the same API for run routing.

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

  • Magento 2.4.x, PHP 8.2+, requires toweringmedia/base and toweringmedia/module-store-locator
  • Composer package: toweringmedia/module-distance-delivery
  • Declarative schema introduces toweringmedia_delivery_quote_log
  • Includes observers (order-place, cancellation), plugins (ShippingInformation), and DI-configured services for DistanceCalculator, DeliveryScheduleManagement, RunGroupingService
  • Ships with REST endpoints consumed by PWAs (/driverportal/fulfillment/*/runs/*)

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
  • 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
  • Seamless integration with Store Locator, Store Pickup, and Fulfillment PWAs

📘 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

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.

  • Magento Version: Compatible with Magento 2.4.x (Open Source & Adobe Commerce)
  • PHP Version: PHP 7.4, 8.1, 8.2, 8.3 compatible
  • Framework: Built using Magento 2 native architecture (no core overrides)
  • Installation Type: Composer / Manual installation supported
  • Module Dependency: Google Maps API key required
  • Delivery Calculation: Distance-based shipping charges
  • Distance Source: Google Maps route and distance services
  • Pricing Rules: Per km / mile, slabs, minimum fee, custom logic
  • 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

Ready to Optimize Distance-Based Delivery?

Charge accurate delivery fees, validate service areas, and streamline local logistics with Google-powered Magento 2 shipping automation
$399.00

My Cart

Loading...

Customer Login

Checkout as a new customer

Creating an account has many benefits:

  • See order and shipping status
  • Track order history
  • Check out faster