Distance based Delivery costs (Magento 2) – Google-Powered Logistics
calcActive())">
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
- SKU
- module-distance-delivery
$399.00
Description / Distance based Delivery costs (Magento 2) – Google-Powered Logistics
Rate Calculation Engine
- 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.
- 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
- 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.
- 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
More Information
| Edition | Community |
|---|