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.
{% 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 %}
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.