Unlock More Sales: Add a Dynamic Free Shipping Bar to Your Shopify Horizon Theme (No Reloads!)
Hey there, fellow store owners! Let's talk about something that can seriously boost your average order value and make your customers happier: a dynamic free shipping progress bar. You know the one – that little bar in the cart drawer that tells shoppers exactly how much more they need to spend to snag free shipping. It's a fantastic psychological nudge!
Recently, a store owner, veluxe1, brought up a common challenge in the Shopify community forum: getting this feature to work with the newer Horizon theme. They'd tried older tutorials, but the theme's structure had changed, making it tricky to find the right spots for the code. This is a super common scenario, and it sparked a great discussion among our community experts.
Why a Free Shipping Bar is a Must-Have
Before we dive into the how-to, let's quickly recap why this feature is so powerful:
- Boosts AOV: It encourages customers to add more items to their cart to reach the free shipping threshold.
- Reduces Cart Abandonment: Transparency about shipping costs and the path to free shipping can reduce last-minute surprises that lead to abandoned carts.
- Enhances User Experience: It's a helpful, interactive element that makes shopping more engaging.
Navigating the Horizon Theme Challenge
veluxe1's main pain point was that older YouTube tutorials just weren't cutting it for Horizon. As websensepro pointed out, Horizon uses a newer theme structure and cart-update approach. This means simply copying and pasting old code might not work, or worse, could break things silently.
The good news? The community rallied with a fantastic, clean custom code solution, and also highlighted some excellent app alternatives.
The Community-Approved Custom Code Solution
The star of the thread was a detailed custom code snippet shared by Ploqo, and then further elaborated upon by LDA2. What makes this solution so brilliant is that it leverages Horizon's native re-rendering of the cart, meaning the progress bar updates instantly without a full page reload or complex JavaScript.
Here’s how to implement it:
Step 1: Create a New Snippet for Your Free Shipping Bar
First, you'll create a new file in your theme code that holds the logic and styling for your progress bar.
- Go to your Shopify Admin > Online Store > Themes.
- Find your current theme (it should be Horizon) and click '...' (Actions) > 'Edit code'.
- Under the 'Snippets' directory, click 'Add a new snippet'.
- Name it
free-shipping-bar(make sure to type it exactly like that). - Paste the following code into the new
free-shipping-bar.liquidfile, then click 'Save'.
Important: Change 100 on the third line (assign threshold = 100) to your desired free shipping amount.
{% comment %} Free shipping progress bar. Change 100 to your free-shipping amount. {% endcomment %}
{% liquid
assign threshold = 100
assign threshold_cents = threshold | times: 100
assign current = cart.total_price
assign remaining = threshold_cents | minus: current
assign percent = 0
if threshold_cents > 0
assign percent = current | times: 100.0 | divided_by: threshold_cents
endif
if percent > 100
assign percent = 100
endif
%}
{%- if cart.item_count > 0 -%}
{%- if remaining > 0 -%}
You're {{ remaining | money }} away from free shipping
{%- else -%}
You've unlocked free shipping!
{%- endif -%}
{%- endif -%}

Step 2: Show It in Your Cart Drawer and Page
Next, you'll tell your theme where to display this new snippet.
- In the same 'Edit code' section, navigate to 'Snippets' >
cart-products.liquid. - Locate the line
{%- else -%}. - Right after that line, add this one line of code:
{% render 'free-shipping-bar' %}

- Click 'Save'.
That's it! This single file, cart-products.liquid, powers both your cart drawer and your full cart page, so the bar will appear in both places automatically.
Here's a look at the result in action:


Important Considerations and Customizations
-
Recalculates Instantly: One of the best parts about this solution is that it recalculates the moment an item is added or removed from the cart, with no page reload needed. Horizon handles this beautifully by re-rendering the
cart-products.liquidsnippet. - Currency: The amount shown will automatically adapt to your store's currency.
-
Recolor the Bar: Want to match your brand? Just change the
--fsb-fill: #1e8e3e;line in theblock within yourfree-shipping-bar.liquidsnippet. -
Subtotal vs. Total Price: This is a crucial decision! The provided code uses
cart.total_price, which means it counts the cart total after discounts. As LDA2 wisely pointed out, if you're running significant discounts, customers might unlock free shipping faster than intended. If you want it to count the subtotal (before discounts), simply changecart.total_pricetocart.items_subtotal_pricein the snippet.
What About Other Themes?
A vital point raised by LDA2 is that the exact snippet name (cart-products.liquid) and the {%- else -%} insertion point are specific to the Horizon theme. If you're on Dawn or a customized/older theme, you'll need to confirm your cart drawer template's actual file name and structure. Pasting this into the wrong file might just silently do nothing, which can be super frustrating! Always check your theme's documentation or consult a developer if you're unsure.
Alternative: Free Shipping Bar Apps
If diving into theme code feels a bit daunting, or if you prefer a more visual, app-driven approach, Ploqo also mentioned that there are plenty of excellent Shopify apps designed for this very purpose. Apps like Hextom Free Shipping Bar, Essential Free Shipping Upsell, or Progressive Bar can achieve the same result without you having to touch a single line of code. They often come with more advanced features and customization options too.
Whether you choose the custom code route or opt for an app, adding a dynamic free shipping progress bar is a smart move for any Shopify store. It's a simple yet effective way to encourage customers, reduce friction, and ultimately, grow your sales. The community's insights here really highlight how powerful leveraging Shopify's native capabilities can be, especially with newer themes like Horizon. Happy selling!