Zolo Digital
Book a call
Back to Blog

December 2, 2026

How to add a free shipping bar to your Shopify cart

How to add a free shipping bar to your Shopify cart

To add a free shipping bar to a Shopify cart, add a theme setting for your free-shipping minimum, subtract cart.total_price from it in a small Liquid snippet, and show what's left with the money filter. Render the snippet inside the part of the cart your theme refreshes after each change, and make the minimum match your free rate in Settings → Shipping and delivery.

Most carts I open keep free shipping a secret. The customer adds one candle, the cart says "Subtotal", checkout adds shipping, and they leave to think about it. They are not thinking about it. A line that says how close they are turns the second candle into a decision instead of an accident.

What does the bar need to know?

Two numbers: the cart total and your free-shipping minimum. Shopify gives you the first in Liquid (cart.total_price, in cents, after cart discounts). The second you add yourself as a theme setting, so you can change it from the theme editor instead of editing code.

Add this group to config/settings_schema.json, inside the top-level array:

{ "name": "Free shipping bar", "settings": [ { "type": "number", "id": "free_shipping_min", "label": "Free shipping minimum (store currency)", "info": "Must match your free rate in Settings → Shipping and delivery. Leave empty to hide the bar." } ] }

How do you build it in Liquid?

Create snippets/free-shipping-bar.liquid:

{%- liquid assign min = settings.free_shipping_min | times: 100 assign left = min | minus: cart.total_price assign pct = 0 if min > 0 assign pct = cart.total_price | times: 100 | divided_by: min endif if pct > 100 assign pct = 100 endif -%} {%- if min > 0 and cart.item_count > 0 and cart.currency.iso_code == shop.currency -%} <div class="free-shipping-bar"> {%- if left > 0 -%} <p>Add {{ left | money }} more for free shipping</p> {%- else -%} <p>Free shipping is yours</p> {%- endif -%} <div class="free-shipping-bar__track"> <span style="width: {{ pct }}%"></span> </div> </div> {%- endif -%}

The setting holds a whole amount ("5000"), and Liquid money is in cents, hence times: 100. divided_by with two whole numbers rounds down, which is fine for a progress bar. The bar hides when the cart is empty or the setting is blank, so an empty cart doesn't nag anyone, and the if min > 0 guard stops a blank setting from dividing by zero.

Style the track however your theme looks: a light background on .free-shipping-bar__track, a solid colour on the span, a little height and a transition on width.

Where do you put it so it updates?

This is where most bars break. Modern themes update the cart without a page reload, by re-rendering only certain parts of the cart section. Put the bar outside those parts and it shows the old number until the customer refreshes.

In Dawn, render it inside .drawer__inner in snippets/cart-drawer.liquid for the drawer, and inside the .js-contents block of the cart footer section for the cart page:

{% render 'free-shipping-bar' %}

Other themes name things differently. The test is the same everywhere: add an item, change a quantity, remove one, and watch the number move each time without a reload.

Does it match your shipping settings?

The bar is a promise. Your shipping rates are the contract. If the bar says free shipping starts at 5,000 and the free rate in Settings → Shipping and delivery starts at 6,000, checkout calls your bluff in front of the customer.

Open each shipping zone you sell to and check the free rate's order price condition. If different zones have different minimums, either use the one they share, or show the bar only for the zone it's true for.

What about stores that sell in several currencies?

cart.total_price is in the customer's currency; your setting is in your store's. Compare them directly and the maths is wrong for everyone shopping in another currency. That's why the snippet checks cart.currency.iso_code == shop.currency and hides the bar otherwise. Converting the minimum properly is possible, but hiding it is better than promising the wrong amount.

The short version

One setting, one snippet, one render in the right place, and a five-minute check of your shipping rates. Your cart stops keeping secrets.

Want someone to look at the rest of the cart while they're in there? I do fixed-price Shopify store audits.

Instagram

Latest on Instagram

Follow @zolodigital