How to add a free shipping bar to Shopify without an app
"You're £12.00 away from free shipping" is one of the simplest ways to nudge order value up, and many store owners pay a monthly app fee for it. In an Online Store 2.0 theme such as Dawn, you can do it with a few lines of Liquid. This guide shows how, and explains the one tricky part.
Why skip the app?
- Cost: similar apps usually charge about $7–30 a month, every month, for a bar and a message.
- Speed: apps often load their own scripts on every page. A theme section is rendered with the page.
- Control: the bar lives in your theme, so you can see and change exactly what it does.
Step 1: Check your shipping threshold
Go to Settings → Shipping and delivery and note the order value where free shipping starts, for example £50. The bar must match this exactly, or it will promise something your checkout doesn't do.
Step 2: Paste the snippet
The quickest way needs no code editor. Open Online Store → Themes → Customize, go to your cart page (or a template you choose), click Add section → Custom Liquid, and paste this:
{%- assign threshold = 5000 -%}{%- comment -%} £50.00, in pence {%- endcomment -%}
{%- assign remaining = threshold | minus: cart.total_price -%}
<div class="free-ship-bar">
<p>
{%- if remaining > 0 -%}
You're {{ remaining | money }} away from free shipping
{%- else -%}
You've unlocked free shipping!
{%- endif -%}
</p>
<progress value="{{ cart.total_price | at_most: threshold }}" max="{{ threshold }}"></progress>
</div>
Change 5000 to your threshold in pence or cents (£50.00 = 5000). cart.total_price is also in pence, and the money filter formats the amount in your store's currency format. Save, then add a product to your cart to check it.
To style it, add a little CSS in the same Custom Liquid box, for example <style>.free-ship-bar{text-align:center;padding:12px} .free-ship-bar progress{width:100%;max-width:480px}</style>.
Step 3: The catch, AJAX carts
Liquid runs on the server, so the snippet is only correct when the page loads. Dawn, Horizon and most modern themes update the cart without reloading the page, using a cart drawer, a pop-up notification or quantity buttons. When that happens, the bar stays stuck on the old amount until the shopper reloads.
To fix that, a script has to notice cart changes, fetch the new total from /cart.js, and re-draw the message and bar. In practice, that means:
- Watching the theme's requests to
/cart/add,/cart/changeand/cart/update. Dawn's are at/cart/addwithout.js, and stores with a language prefix use URLs such as/fr/cart/change.js. - Formatting money in JavaScript in your store's format. Dawn and Horizon don't include Shopify's old
Shopify.formatMoneyhelper. - Converting the threshold for other currencies if you sell through Shopify Markets.
- Making sure re-renders in the theme editor don't stack up duplicate listeners.
It's all doable, but it takes about 100 lines to get right. If a bar that's correct on page load is enough for you, stop here. You're done.
Or use the free section
We packaged a free-shipping bar section that handles all of the above. It updates with AJAX carts, uses your money format, converts for Markets currencies and is accessible (a progress bar with a live message). You set the threshold, messages and colours in the theme editor, without touching code. It's tested on Dawn and Horizon. Other Online Store 2.0 themes may need small style tweaks.
FAQ
Where should the bar go?
Most stores put it at the top of the cart page or in the header area so it shows on every page. In the theme editor you can add a section to the header group as well as to page templates.
Does Shopify have a built-in free shipping bar?
Not in Dawn or Horizon. You set free-shipping rates in Shipping settings, but the themes don't show progress towards them.
Why use pence instead of pounds?
Shopify's Liquid stores prices as whole numbers in the smallest unit (pence or cents). That avoids rounding errors such as 49.99 turning into 49.989999.