User Tools

Site Tools


magento2:extensions:toweringmedia-module-shipping-guard

Magento 2 Shipping Guard Extension

Extension context

This is a Toweringmedia Magento 2 extension guide in the Shipping category. Use this page for API-protection settings and shipping quote reliability.

  • Module name: `Toweringmedia_ShippingGuard`
  • Composer package: `toweringmedia/module-shipping-guard`

Overview

Shipping Guard is a backend-only shipping quote protection layer that reduces unnecessary carrier API calls from incomplete or repetitive checkout requests.

Key capabilities:

  • Address gating before carrier calls.
  • Positive cache for successful quote responses.
  • Retry throttling for invalid/incomplete inputs.
  • Optional token-bucket rate limiting.
  • Works across Luma, Hyva, and custom/headless checkouts.

Installation

cd /path/to/magento
composer require toweringmedia/module-shipping-guard:<VERSION>
php -d memory_limit=-1 bin/magento setup:upgrade
php -d memory_limit=-1 bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Versioning notes

  • Pick the version you are licensed for.
  • To see available versions for your credentials:
    • `composer show -a toweringmedia/module-shipping-guard`

Configuration

Go to: Stores > Configuration > Shipping > Shipping Guard

Recommended baseline settings:

  • Enable Shipping Guard = Yes
  • Positive cache TTL = 15 minutes
  • Invalid input throttle = 60 seconds
  • Diagnostics logging = Errors

Optional controls:

  • Include region/city and weight/subtotal in cache key
  • Enable token bucket limiter and set per-hour budget

Validation checklist

  • Incomplete addresses are gated before carrier API calls.
  • Repeated complete quote requests produce cache hits.
  • Rate limit behavior follows configured threshold when enabled.
  • Checkout remains stable (no hard blocking exceptions) during gated conditions.

Troubleshooting

  • No rates after valid address: verify carrier config and temporarily lower gating strictness for diagnostics.
  • Too many API calls: increase cache TTL and confirm dedupe/rate limiter settings are enabled.
  • Unexpected throttling: review invalid input throttle window and checkout address payload quality.
  • Need deeper logs: temporarily switch diagnostics to verbose and inspect `[ShippingGuard]` log entries.
magento2/extensions/toweringmedia-module-shipping-guard.txt · Last modified: by 127.0.0.1