What you’ll need

  • The theme editor (to add a Custom Liquid block; no code editing)

    How to get this: The theme editor
    1. Online Store › Themes › Edit theme (on a copy of your theme if you want to test first).
    2. Add section or Add block › Custom Liquid, paste the code, then Save.

    Step-by-step guide (opens in a new tab)

  • Your settings for the feature (for example your free shipping amount or countdown end date)

1Free shipping progress bar

Shows how much more a shopper needs to spend for free shipping, and updates as the cart changes.

Use the same amount as your free shipping rate in Settings > Shipping and delivery.

One per line, like EUR = 60. Without a line, the amount is converted at Shopify’s rate for that market.

Leave empty to hide the bar until something is in the cart.

2Preview

Sample product and cart, not your store. Your theme’s fonts and colors apply once it’s on your store.

3Copy the code and add it to your theme

Paste into a Custom Liquid section
{%- comment -%}
  Free shipping progress bar by Easy Store Tools (v2026.11). Tested on Dawn 16.2.0 and Horizon 4.5.0.
  Where: Header area > Add section > Custom Liquid (shows on every page), or any page section.
  To remove it, delete the Custom Liquid block. Change settings: https://easystoretools.com/liquid-snippets/?s=free-shipping-bar
{%- endcomment -%}
<est-free-shipping class="est-fsb" data-config='{"threshold":5000,"overrides":{},"below":"You’re {amount} away from free shipping","reached":"You’ve unlocked free shipping!","empty":"Free shipping on orders over {threshold}"}' data-total="{{ cart.total_price }}" data-count="{{ cart.item_count }}" data-currency="{{ cart.currency.iso_code }}" data-shop-currency="{{ shop.currency }}">
  <p class="est-fsb__msg" aria-live="polite"></p>
  <div class="est-fsb__track" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to free shipping"><span class="est-fsb__fill"></span></div>
</est-free-shipping>
<style>
  .est-fsb { display: block; max-width: 640px; margin: 0 auto; padding: 8px 0; text-align: center; }
  .est-fsb[hidden] { display: none; }
  .est-fsb__msg { margin: 0 0 6px; font-size: 0.95em; line-height: 1.4; }
  .est-fsb__track { height: 8px; border-radius: 999px; background: rgba(127, 127, 127, 0.22); overflow: hidden; }
  .est-fsb__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #4F46E5; transition: width 0.4s ease; }
  .est-fsb--done .est-fsb__track { display: none; }
  @media (prefers-reduced-motion: reduce) { .est-fsb__fill { transition: none; } }
</style>
<script>
(function () {
  if (!window.__estCartWatch) {
    window.__estCartWatch = true;
    var root = (window.Shopify && window.Shopify.routes && window.Shopify.routes.root) || '/';
    var origFetch = window.fetch.bind(window);
    var timer;
    var refresh = function () {
      clearTimeout(timer);
      timer = setTimeout(function () {
        origFetch(root + 'cart.js', { headers: { Accept: 'application/json' }, credentials: 'same-origin' })
          .then(function (r) { return r.json(); })
          .then(function (cart) { document.dispatchEvent(new CustomEvent('est:cart', { detail: cart })); })
          .catch(function () {});
      }, 120);
    };
    var isCartUrl = function (u) { return /\/cart\/(add|change|update|clear)/.test(String(u || '')); };
    window.fetch = function (input, init) {
      var p = origFetch(input, init);
      if (isCartUrl(typeof input === 'string' ? input : input && input.url)) p.then(refresh, function () {});
      return p;
    };
    var xo = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.open = function (m, u) {
      if (isCartUrl(u)) this.addEventListener('loadend', refresh);
      return xo.apply(this, arguments);
    };
    ['cart:update', 'cart:refresh', 'cart-drawer:open'].forEach(function (n) { document.addEventListener(n, refresh); });
    window.addEventListener('pageshow', function (e) { if (e.persisted) refresh(); });
  }
  var estMoney = function (cents, currency) {
    try { return new Intl.NumberFormat(document.documentElement.lang || undefined, { style: 'currency', currency: currency }).format(cents / 100); }
    catch (e) { return (cents / 100).toFixed(2) + ' ' + currency; }
  };
  class EstFreeShipping extends HTMLElement {
    connectedCallback() {
      this.cfg = JSON.parse(this.dataset.config || '{}');
      this.onCart = (e) => this.render(e.detail);
      document.addEventListener('est:cart', this.onCart);
      this.render({ total_price: +this.dataset.total, item_count: +this.dataset.count, currency: this.dataset.currency });
    }
    disconnectedCallback() { document.removeEventListener('est:cart', this.onCart); }
    goal(currency) {
      var c = this.cfg;
      if (c.overrides && c.overrides[currency] != null) return c.overrides[currency];
      if (currency === this.dataset.shopCurrency) return c.threshold;
      var rate = Number(window.Shopify && window.Shopify.currency && window.Shopify.currency.rate) || 1;
      return Math.round(c.threshold * rate);
    }
    render(cart) {
      var currency = cart.currency || this.dataset.currency;
      var goal = this.goal(currency);
      var total = Number(cart.total_price) || 0;
      var msg = this.querySelector('.est-fsb__msg');
      var fill = this.querySelector('.est-fsb__fill');
      var track = this.querySelector('.est-fsb__track');
      var left = Math.max(goal - total, 0);
      var pct = goal > 0 ? Math.min(100, Math.round((total / goal) * 100)) : 100;
      this.hidden = false;
      this.classList.toggle('est-fsb--done', left === 0 && cart.item_count > 0);
      if (!cart.item_count) {
        if (!this.cfg.empty) { this.hidden = true; return; }
        msg.textContent = this.cfg.empty.replace('{threshold}', estMoney(goal, currency));
        pct = 0;
      } else if (left > 0) {
        msg.textContent = this.cfg.below.replace('{amount}', estMoney(left, currency)).replace('{threshold}', estMoney(goal, currency));
      } else {
        msg.textContent = this.cfg.reached;
      }
      fill.style.width = pct + '%';
      track.setAttribute('aria-valuenow', String(pct));
    }
  }
  if (!customElements.get('est-free-shipping')) customElements.define('est-free-shipping', EstFreeShipping);
})();
</script>

5.2 KB of Shopify’s 50 KB Custom Liquid limit.

Dawn and other free themes

  1. Online Store > Themes > Customize.
  2. In the Header area of the left panel, click Add section > Custom Liquid.
  3. Paste the code, drag the section above or below the header, then Save. It now shows on every page.

Added to the Header area, it shows on every page and updates when the cart drawer changes. On the cart page it updates when quantities change.

Horizon

  1. Online Store > Themes > Customize.
  2. In the Header area, click Add section > Custom Liquid.
  3. Paste the code, place it above or below the header, then Save.

Works the same in Horizon’s Header area. Horizon sends a cart:update event that the bar also listens to.

How it works

  1. Pick a snippet from the list.
  2. Change the settings. The preview runs the real code against a sample product and cart.
  3. Copy the code. It shows how much of Shopify’s 50 KB Custom Liquid limit it uses.
  4. In the theme editor, add a Custom Liquid block (product page) or section (header area or any page), paste, and save.
  5. To change it later, open this page from the link in the code’s first lines, adjust, and paste again.

Guides

Questions

Do I need to edit theme code?

No. Every snippet goes in a Custom Liquid block or section in the theme editor. No theme files change, theme updates keep it, and deleting the block removes it.

Which themes does it work with?

Each snippet is installed and tested on Dawn 16.2.0 and Horizon 4.5.0. They use plain HTML and JavaScript and find the product form the standard way, so most Online Store 2.0 themes work too. Check the preview before saving.

Will it slow down my store?

Each snippet is 3 to 8 KB of code with no libraries and no requests to other servers. Snippets that watch the cart reuse one shared listener.

Is it really free?

Yes. No app, no subscription, no sign-up. The code is yours to keep and change.

Does the free shipping bar work with other currencies?

Yes. It converts your amount with Shopify’s exchange rate for the shopper’s market, or uses a set amount per currency if you add one.

What if Shopify says the Liquid is invalid when I save?

Make sure you copied the whole code, from {%- comment -%} at the top to the last closing script tag. Shopify checks Liquid when you save and refuses anything cut off.

Based on Shopify’s theme limits (50 KB per Liquid setting), the cart object and the variant object.