Liquid, JavaScript, themes, sales channels
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.
Solved! Go to the solution
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!
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.
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!
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.
User | RANK |
---|---|
38 | |
28 | |
13 | |
11 | |
8 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023