Need code for a free shipping bar in cart- "you are *$$$ away from free Shipping" Atelier theme

Topic summary

A user requested code to add a dynamic free shipping progress bar to their Shopify store’s cart page using the Atelier theme. The bar should display how much more a customer needs to spend to qualify for free shipping.

Solutions Provided:

Multiple developers offered similar approaches:

  • Create a snippet (e.g., free-shipping-bar.liquid) containing Liquid code that calculates the remaining amount needed
  • Set a threshold in cents (e.g., 50000 = $500) and compare against cart.total_price
  • Display conditional messages: either “You’ve qualified for free shipping” or “You are $X away from free shipping”
  • Include the snippet in the cart template (cart.liquid, main-cart.liquid, or cart-drawer.liquid) using {% render 'free-shipping-bar' %}

Troubleshooting:

The user initially had difficulty getting the bar to display in cart.drawer. After some back-and-forth about store URLs and collaborator access, one solution successfully worked.

Resolution:

The issue was resolved—the user confirmed the free shipping bar is now functioning correctly.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Hello,

I need code for a free shipping bar in cart- “you are *$$$ away from free Shipping” Atelier theme please.

Can anyone help me?

I have made a new snippit, but need the code to add in. Then instructions to add to my cart liquid please :slightly_smiling_face:

Thank you so much!!

2 Likes

Hello @Tessahighrack
Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.

Hi @Tessahighrack

You can try to do that by following the instructions below.

  • In your Shopify admin, go to Online Store > Themes > Actions > Edit Code.

  • Find the main-cart.liquid file (the file name depends on your theme’s structure).

  • Add the following code where you want the free shipping bar to appear on your cart page:


  {% assign free_shipping_threshold = 100.00 %} 
  {% assign cart_total = cart.total_price | divided_by: 100.0 %}

  {% if cart_total >= free_shipping_threshold %}
    

      ? Congratulations! You've qualified for free shipping!
    

  {% else %}
    {% assign remaining_amount = free_shipping_threshold | minus: cart_total %}
    

      You are **${{ remaining_amount | round: 2 }}** away from free shipping.
    

  {% endif %}

​

1. Create a New Snippet
You said you’ve already made a new snippet (great!). If not:

Go to Online Store > Themes > … > Edit code

Under Snippets, click Add a new snippet → Name it: free-shipping-bar.liquid

2. Paste This Code into free-shipping-bar.liquid

{% assign threshold = 50000 %}
{% assign total = cart.total_price %}
{% assign remaining = threshold | minus: total %}

  {% if total >= threshold %}
    

? You’ve qualified for FREE shipping!

  {% else %}
    

      ? You are {{ remaining | money_without_trailing_zeros }} away from FREE shipping!
    

    
      

    

  {% endif %}

You can adjust the $500.00 value by changing free_shipping_threshold.

3. Include the Snippet in Your Cart Page
Find your cart template:

Go to Sections or Templates → Look for cart.liquid, main-cart.liquid, or cart-drawer.liquid depending on your theme version.

Find a good place above the cart total or below the cart items.

Add this line where you want the bar to appear:

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

4. Save and Preview
Save all files

Go to your cart page and test by adding/removing items

Try going just below and above the threshold to see the message change

Result:

Hope this helps! If yes then Please don’t forget hit Like and Mark it as solution!
If you will unable to implement the same then I’m happy to do this for you, let me know.

Not sure what i am doing wrong, but when i enter this into cart.drawer it doesnt show up!

Hello, thank you. I am not sure what i am doing wrong, but i made the snippet, added the second copy to cart.drawer… but when i preview nothing shows up!

Can you please send me your collaborator code? I will check it for you.

The theme is not published

The theme is not published does this matter? i have been checking on the preview. 9520

It doesn’t matter. And your store link.

https://admin.shopify.com/store/shophighrack

Hi, @Tessahighrack

It’s not your store admin url, it’s the store website url.

Hello! @Tessahighrack

Here’s a simple free shipping bar script you can add to the Atelier Shopify theme, which is written in Liquid, HTML, and JavaScript. This bar will dynamically show how much more a customer needs to spend to qualify for free shipping, updating as items are added to the cart.

Step 1: Set Your Free Shipping Threshold

Let’s assume free shipping starts at $100. You can change this in the script.

Loading...

Step 2: Add Code to cart.liquid

  • Go to your Shopify Admin > Online Store > Themes

  • Click “Actions” next to Atelier, then “Edit code”

  • Open sections/cart.liquid (or templates/cart.liquid depending on your theme structure)

  • Paste the code above the cart table or at the top of the section for visibility.

Example placement:

{% section ‘cart-items’ %}

...

Optional Styling Tips

Add custom styling in assets/base.css or within tags in the same file:

#free-shipping-bar {
background: #e0f7e9;
color: #1a7f37;
border: 1px solid #b2dfdb;
margin-bottom: 15px;
border-radius: 8px;
}

If this reply was useful to you, we would really appreciate it if you gave us a LIKE and mark the issue as SOLVED!

1 Like

It worked! Thank you so much :slightly_smiling_face:

1 Like