How to add a dynamic free shipping progress bar in Shopify using Liquid and market metafields

A Shopify free shipping progress bar is one of the easiest ways to increase your store's average order value. By showing customers exactly how much more they need to spend to qualify for free shipping, you create a powerful incentive to add another product before checking out. In this tutorial, we'll look at how this Liquid component works, why it's effective, and how merchants can implement a solution that works seamlessly with Shopify markets. The Highstreet theme supports this feature natively, out of the box, without relying on third party apps.

July 2026 Shopify tutorial

Why every Shopify store should use a free shipping progress bar

Free shipping is one of the biggest purchasing incentives in ecommerce. However, simply offering free shipping isn't always enough. Customers need to know how close they are to qualifying for it. A progress bar keeps this goal visible throughout the shopping journey, encouraging larger basket sizes while creating a more engaging cart experience.

Unlike popup offers or discount codes, a free shipping progress bar feels helpful rather than promotional. It provides useful information at exactly the right moment, when shoppers are deciding whether to complete their purchase or continue browsing.

Step 1: Create a free shipping threshold metafield

This component uses Shopify markets to define different free shipping thresholds for different regions. Instead of hardcoding a single value into your theme, each market stores its own shipping threshold inside a metafield. This makes it easy to offer different shipping promotions in different countries without modifying your theme code every time.

Create a market metafield using the following settings:

• Namespace: custom
• Key: free_shipping_threshold
• Type: Decimal

Once configured, each Shopify Market can have its own free shipping target, allowing your storefront to display the correct amount automatically.

Step 2: Read the market metafield with Shopify liquid

The component begins by retrieving the free shipping threshold from the current Shopify Market. This ensures every visitor sees the correct value for their location instead of a single global shipping threshold.

It then compares the customer's cart total against this value, calculates the remaining amount needed for free shipping, and converts that amount into the store's active currency using Shopify's built-in money filter.

Because the calculation happens entirely within Shopify Liquid, there's no need for external apps or JavaScript calculations to determine the remaining amount.

Step 3: Calculate progress toward free shipping

Next, the component calculates the customer's progress as a percentage of the free shipping threshold. This percentage is used to update the HTML progress element, creating a visual indicator that fills as more products are added to the cart.

To prevent the progress bar from exceeding its maximum value, the percentage is capped at 100%. This ensures the progress bar always displays correctly, even when customers spend well beyond the qualifying amount.

Step 4: Display dynamic messaging

One of the strengths of this component is its dynamic messaging. Instead of displaying a static notice, it adapts based on the customer's cart.

If the cart is empty, customers see the full amount required to qualify for free shipping. As products are added, the message updates to show exactly how much remains. Once the threshold has been reached, the message changes to confirm that the order now qualifies for free shipping.

This real-time feedback creates a much more engaging shopping experience than a simple promotional banner.

Step 5: Style the component

The component uses CSS custom properties for colors, spacing, borders, and layout, making it easy to match your store's branding. Since everything is contained within the snippet, developers can quickly customize the appearance without affecting other parts of the storefront.

The native HTML progress element also keeps the component lightweight while providing excellent browser support and accessibility.

Why this approach is better than using an app

Many Shopify merchants install apps simply to display a free shipping progress bar. While apps can work well, they often introduce additional JavaScript, monthly subscription costs, and unnecessary complexity.

This Liquid-based approach is lightweight, easy to maintain, and fully integrated with Shopify markets. Because it relies entirely on Shopify's native features, it loads quickly and can be customized to fit virtually any storefront.

Build better Shopify experiences with the Highstreet theme

Components like this are part of what makes Highstreet an excellent choice for merchants who want more than just an attractive storefront. Highstreet focuses on practical, conversion-driven features built using modern Shopify development practices, helping developers build faster while giving merchants tools that genuinely improve sales.

If you're looking for a fast, flexible Shopify theme that includes production-ready components, clean Liquid architecture, and features designed to improve conversion rates, explore the Highstreet theme. It's designed to help Shopify stores grow while remaining easy to customize and maintain.

highstreet-theme-free-shipping-component.liquid {%- comment -%} Description: - Renders a metafield based free shipping component calculated by the cart's total price, for the current market. Requirements: - A market metafield setup as below: - Type: [decimal] - Namespace: [custom] - Key: [free_shipping_threshold] Usage: The snippet can be rendered anywhere on the site, particulary in the cart. - {%- render 'highstreet-theme-free-shipping-component' -%} {%- endcomment -%} {%- liquid assign free_shipping_threshold_metafield = localization.market.metafields.custom.free_shipping_threshold assign free_shipping_threshold = free_shipping_threshold_metafield.value | times: 100 assign amount_required = free_shipping_threshold | minus: cart.total_price assign amount_required_money = free_shipping_threshold | minus: cart.total_price | money assign progress_percentage = cart.total_price | times: 100 | divided_by: free_shipping_threshold if progress_percentage > 100 assign progress_percentage = 100 endif -%} {%- if free_shipping_threshold_metafield != blank and free_shipping_threshold != blank -%} {%- style -%} :root { --highstreet-theme-free-shipping-component--color--foreground: #212121; --highstreet-theme-free-shipping-component--color--background: #ffffff; --highstreet-theme-free-shipping-component--color--border: #eeeeee; --highstreet-theme-free-shipping-component--spacing--extra-small: 5px; --highstreet-theme-free-shipping-component--spacing--small: 10px; --highstreet-theme-free-shipping-component--spacing--medium: 20px; --highstreet-theme-free-shipping-component--spacing--large: 40px; --highstreet-theme-free-shipping-component--spacing--extra-large: 60px; } .highstreet-theme-free-shipping-component { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--highstreet-theme-free-shipping-component--spacing--small); color: var(--highstreet-theme-free-shipping-component--color--foreground); background: var(--highstreet-theme-free-shipping-component--color--border); margin: var(--highstreet-theme-free-shipping-component--spacing--small) auto; padding: var(--highstreet-theme-free-shipping-component--spacing--medium); text-align: center; box-sizing: border-box; } .highstreet-theme-free-shipping-component > * { margin: 0 auto; } .highstreet-theme-free-shipping-component progress { width: 100%; height: var(--highstreet-theme-free-shipping-component--spacing--extra-small); } .highstreet-theme-free-shipping-component progress::-webkit-progress-bar { background: var(--highstreet-theme-free-shipping-component--color--background); } .highstreet-theme-free-shipping-component progress::-webkit-progress-value { background: var(--highstreet-theme-free-shipping-component--color--foreground); } {%- endstyle -%} <div class='highstreet-theme-free-shipping-component'> {%- if cart.total_price > 0 -%} {%- if amount_required > 0 -%} <p>Spend another {{ amount_required_money }} for free shipping.</p> <progress max='100' value='{{- progress_percentage -}}' ></progress> {%- else -%} <p>Your order is eligible for free shipping.</p> {%- endif -%} {%- else -%} <p>Spend {{ amount_required_money }} for free shipping.</p> {%- endif -%} </div> {%- endif -%}

Boost your Shopify sales. Try Highstreet today.

Designed for ambitious Shopify merchants, Highstreet delivers exceptional performance, intuitive navigation, and premium visual storytelling out of the box.

A modern theme to help brands sell more online.