Search by

zerofront / module-zero-free-shipping-bar

pasichnikroman

Zero for Magento Open Source: "Add $12.50 more for free shipping" with a progress bar in the mini-cart, the cart and the checkout summary.

Package info

github.com/zerofrontdev/module-zero-free-shipping-bar

Homepage

Type:magento2-module

pkg:composer/zerofront/module-zero-free-shipping-bar

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.3.3 2026-10-21 14:26 UTC

This package is auto-updated.

Last update: 2026-10-21 14:36:53 UTC


README

"Add $12.50 more for free shipping" with a progress bar in the mini-cart, on the cart page and in the checkout summary; "You've unlocked free shipping!" once the cart gets there. Configured in Stores > Configuration > Zero > Free Shipping Bar.

Install

Requires Magento Open Source 2.4.7–2.4.9 and PHP 8.2–8.4 with the GD extension built with WebP (php -r 'var_dump(function_exists("imagewebp"));' says true; Magento's own PHP requirements cover the rest). Without WebP in GD, Zero skips its WebP image copies and serves the originals.

composer require zerofront/module-zero-free-shipping-bar
bin/magento setup:upgrade
bin/magento setup:di:compile           # production mode
bin/magento setup:static-content:deploy # production mode
bin/magento cache:flush

Composer installs zerofront/module-zero-core, zerofront/module-zero-checkout with it.

Part of zerofront/zero, which installs the Zero theme and every Zero module at once.

What it compares

The same figure the Free Shipping delivery method compares with its "Minimum Order Amount": the cart subtotal after discounts, in the base currency, plus tax when that method is set to include it. The threshold is that method's minimum while the method is enabled (Sales > Delivery Methods > Free Shipping); or an amount of your own, for stores where free shipping comes from a cart rule or another carrier. A cart rule that gives the whole order free shipping counts as reached. Without a threshold, or for a cart with nothing to ship, the bar stays hidden.

Amounts show in the cart's currency.

Where

  • The mini-cart: above the items (Zero_Core's mini-cart content renders a zero.minicart.top child).
  • The cart page: in the summary card, under its title (cart.summary).
  • The checkout: at the top of the order summary; it refetches itself on cart:updated, which Zero Checkout's discount-code request now sends.

Each place can be turned off. The two texts are configurable (%1 is the missing amount). No JavaScript: a <progress> element and HTMX.

Tests

  • Test/Unit/Model/ProgressTest.php: the arithmetic, tax, a cart rule.
  • dev/tests/zero-e2e/tests/free-shipping-bar.spec.ts: a cheap item shows the missing amount in the mini-cart and on the cart page; a bigger quantity unlocks it. Skipped where the bar is off.

License

OSL-3.0 or AFL-3.0, your choice: see NOTICE.md.

Vilmate

Zero is made by Fixstacks in partnership with Vilmate, a software development company. Documentation: https://zerofront.dev/docs. Demo store: https://demo.zerofront.dev.