All guides › Free shipping bar in other currencies
Free shipping bar shows the wrong amount in other currencies (Shopify Markets fix)
Disclosure: I build No-App Sections; this guide was written with AI assistance. The code on this page was written for this guide. It passes Shopify's Theme Check inside Dawn 16.0.0 and automated tests in headless Chrome, run against Dawn's own cart and variant events with mocked store data. It hasn't been run on a live store yet, so try it on a duplicate theme first.
A shopper in Ireland sees "Spend €30.00 more for free shipping", adds €30, and pays for shipping anyway. The bar wasn't lying about the arithmetic. It compared a euro cart with a threshold written in pounds. This page explains where the numbers come from in Shopify Markets and gives you a message that uses the right minimum for each currency.
Why the amount is wrong
Most free shipping bars (including the snippet in our basic guide) do this:
assign remaining = 5000 | minus: cart.total_price
5000 is meant as £50.00 in your store currency. But when a shopper browses in euros, cart.total_price is in euros, the shopper's presentment currency. So the bar subtracts cents from pence. The result is wrong whenever the currencies differ.
Where your real minimum comes from
Shopify works out the free shipping minimum for a foreign currency in one of two ways. Which one applies to you decides the fix:
| How the rate is set up | What the minimum is in that currency | What the message should do |
|---|---|---|
| A normal rate in your store currency (the default) | Your store-currency minimum converted at Shopify's exchange rate | Convert the threshold the same way |
| A local-currency rate: a fixed rate in a zone that uses one currency, with Shopify Payments | Exactly the number you typed in that currency, e.g. €60.00 | Use that number, no conversion |
To see which you have, open Settings → Shipping and delivery, open your shipping profile and look at the zone's rates. A rate shown in euros (with its price condition in euros) is a local-currency rate. Shopify only allows local-currency rates for fixed rates in zones where every country uses the same currency, and only with Shopify Payments.
The code: a header message that handles both
Map every currency where you set a local-currency rate in the case block, using the exact minimum from that rate. Anything not listed falls back to converting your store-currency threshold.
{%- comment -%}
Free shipping message that respects Shopify Markets currencies ("Custom Liquid" section in the header).
base_threshold: your free shipping minimum in your store currency, in cents (5000 = 50.00).
Add a "when" line for every currency where you set a LOCAL-currency free shipping rate,
using the exact minimum from that rate (in cents). Other currencies are converted in the browser.
{%- endcomment -%}
{%- liquid
assign base_threshold = 5000
assign local_threshold = ''
case cart.currency.iso_code
when shop.currency
assign local_threshold = base_threshold
when 'EUR'
assign local_threshold = 6000
when 'USD'
assign local_threshold = 6500
endcase
-%}
<div
class="mcfs"
id="mcfs-{{ section.id }}"
data-base-threshold="{{ base_threshold }}"
data-local-threshold="{{ local_threshold }}"
data-currency="{{ cart.currency.iso_code }}"
data-cart-total="{{ cart.total_price }}"
role="status"
>
{%- if local_threshold != '' -%}
{%- assign remaining = local_threshold | minus: cart.total_price -%}
{%- if remaining > 0 -%}
Spend {{ remaining | money }} more for free shipping
{%- else -%}
Your order qualifies for free shipping
{%- endif -%}
{%- endif -%}
</div>
<style>
.mcfs { padding: 0.8rem 1.5rem; text-align: center; font-size: 1.3rem; }
.mcfs:empty { display: none; }
</style>
<script>
(function () {
var el = document.getElementById('mcfs-{{ section.id }}');
if (!el) return;
var local = el.dataset.localThreshold;
var currency = el.dataset.currency;
var threshold, approx = false;
if (local !== '') {
threshold = parseInt(local, 10);
} else {
/* Not a local-currency rate: Shopify converts your store-currency minimum. */
/* Shopify.currency.rate is the rate the storefront is using right now. Round UP to a whole unit */
/* so the message never promises free shipping just below the real converted minimum. */
var rate = parseFloat((window.Shopify && Shopify.currency && Shopify.currency.rate) || '1');
threshold = Math.ceil((parseInt(el.dataset.baseThreshold, 10) * rate) / 100) * 100;
approx = rate !== 1;
}
var fmt = new Intl.NumberFormat(document.documentElement.lang || undefined, { style: 'currency', currency: currency });
function render(total) {
var remaining = threshold - total;
if (remaining <= 0) el.textContent = 'Your order qualifies for free shipping';
else el.textContent = 'Spend ' + (approx ? 'about ' : '') + fmt.format(remaining / 100) + ' more for free shipping';
}
render(parseInt(el.dataset.cartTotal, 10));
function init() {
if (typeof subscribe !== 'function' || typeof PUB_SUB_EVENTS === 'undefined') return;
if (window.mcfsUnsubscribe) window.mcfsUnsubscribe();
window.mcfsUnsubscribe = subscribe(PUB_SUB_EVENTS.cartUpdate, function () {
fetch(window.routes.cart_url + '.js', { headers: { Accept: 'application/json' } })
.then(function (r) { return r.json(); })
.then(function (cart) { if (cart.currency === currency) render(cart.total_price); })
.catch(function () {});
});
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init);
else init();
})();
</script>
How the conversion works
For an unmapped currency, the browser multiplies your threshold by Shopify.currency.rate, the rate the storefront is using right now, and rounds up to a whole unit. Rounding up matters. A message that promises free shipping a few cents below the real converted minimum is worse than one that asks for a few cents more. Because it's an approximation, the message says "about": "Spend about CA$72.00 more for free shipping".
For mapped currencies, Liquid writes the message into the page, so it's there even without JavaScript. The script then writes every amount with Intl.NumberFormat in the page language (Dawn puts it on <html lang>), so "€12.00" and "CA$72.00" look consistent whichever path produced them.
For converted currencies, the div starts empty, and the .mcfs:empty rule hides it, so there's no blank strip. The script fills it in as soon as it runs.
Install it in the header
- Check your rates. Write down your store-currency minimum, and the minimum of every local-currency free rate, from Settings → Shipping and delivery.
- Open the theme editor on a copy. In Online Store → Themes, duplicate your theme and click Customize on the copy.
- Add a Custom Liquid section to the header. In the left sidebar, under Header, click Add section → Custom Liquid. Drag it next to the announcement bar.
- Paste and map currencies. Paste the code, set
base_threshold, and edit thewhenlines so they match your local-currency rates. Delete the example lines you don't use. Click Save.
Test every currency you sell in
Turn on the country/region selector (Dawn has the setting in both the Header and Footer sections), then switch country on your theme preview:
- Store currency (e.g. United Kingdom): the message uses your base threshold.
- Each mapped currency: the message matches your local-currency rate exactly, with no "about".
- An unmapped currency: "about" appears. Then add enough to cross the converted amount, go to checkout and check the free rate appears. If it appears a little earlier than the message says, that's the round-up doing its job.
- Add to cart from a product page: the message updates without a reload.
Other themes and gotchas
- The Liquid and the conversion work in any Online Store 2.0 theme that has a Custom Liquid section. The live update after add to cart uses Dawn's
subscribehelper. Without it, the message updates on the next page load. - If you change your shipping rates, update the
caseblock too. The code can't read shipping settings, because Liquid has no access to them. - The script ignores a cart response in a different currency from the page. That can happen briefly if a shopper switches country in another tab.
Prefer a progress bar you set up in the theme editor?
The free No-App Sections free-shipping bar converts your store-currency threshold with Shopify's rate, like the fallback above (tested with mocked data; not yet on a live multi-currency store). It doesn't have per-currency thresholds, so if you use local-currency rates, the code on this page is the better fit. The section is tested on Dawn and Horizon. Other Online Store 2.0 themes may need small style tweaks. You get it by entering your email on a short form.
FAQ
Can Liquid read my shipping rates so I don't have to type the thresholds?
No. Storefront Liquid has no access to shipping settings or rates, which is why every free shipping bar asks you for the number.
What is Shopify.currency.rate?
A value Shopify puts on every storefront page: the conversion rate from your store currency to the currency the shopper is browsing in. It's 1.0 in your own currency.
Why "about" for converted currencies?
Shopify's converted minimum follows exchange rates that change over time, and the message rounds up to a whole unit. "About" keeps the promise honest.
Does cart.total_price change currency when the shopper switches country?
Yes. The cart is re-priced in the new currency, which is exactly why a fixed threshold breaks.
I only sell in one currency. Do I need this?
No. The product page message or the basic bar is enough.