cart-drawer.liquid How to show Free delivery sum minus cart total?

Solved

cart-drawer.liquid How to show Free delivery sum minus cart total?

hdmidef
Visitor
1 0 0

I'm using a default free theme Dawn. I would like my customers to see how much they should spend to get free delivery. For example, free delivery from $100, cart total is $49.10, so there would be a message "You are $50.90 away from free delivery". This should be done within snippets > cart-drawer.liquid 

 

So I need something like:

 

-if cart total < 100, then:

--You are ${{ 100 | minus: cart.total_price | money_without_currency }} away from free delivery.

- else You are eligible for a free delivery.

Accepted Solution (1)

LitExtension
Shopify Partner
4914 1005 1182

This is an accepted solution.

Hi @hdmidef,

Please add code:

{% if cart.total_price < 10000 %}
          You are ${{ 10000 | minus: cart.total_price | money_without_currency }} away from free delivery.
{% else %}
          You are eligible for a free delivery.
{% endif %}

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com

View solution in original post

Replies 3 (3)

Savior
Shopify Partner
537 108 161

Hello @hdmidef 

 

This can be custom coded by Script changes So you need to approach a dev. Also if you want you can use any free shipping bar app.

banned

LitExtension
Shopify Partner
4914 1005 1182

This is an accepted solution.

Hi @hdmidef,

Please add code:

{% if cart.total_price < 10000 %}
          You are ${{ 10000 | minus: cart.total_price | money_without_currency }} away from free delivery.
{% else %}
          You are eligible for a free delivery.
{% endif %}

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com
Sri28
Shopify Partner
3 0 0

Hi,

I have added the below code (highlighted lines) as suggested for a different use case where I want to prevent user from checkout if order value is less than 150. But its not working. Checkout buttons are still showing, as per the code only if the cart.total_price is more than 150, it should show checkout button, if not should show the message in else condition.

 

can you please assit.

I am using fastor theme.

Sri28_0-1692950202883.png