If you want to show your customers a message to let them know they have qualified for free delivery, or to encourage them to spend a little more to get free delivery, you can use the code below in your cart layout.
Free delivery threshold
Just change the free_delivery_threshold
variable to the right amount (i.e. when your free delivery kicks in) and change the text to be whatever message you want to display for each.
This could be HTML or an image, anything between the blocks of Jinja.
{% set free_delivery_threshold = 60 %}
{% if cart.cv < free_delivery_threshold %}
Spend {{ (free_delivery_threshold - cart.cv)|format_currency(cart.curr) }} more to qualify for free delivery!
{% else %}
You qualify for free delivery!
{% endif %}
Minimum spend threshold
If you'd like to only display this message if a minimum spend amount is reached, you could use this example:
{% set free_delivery_threshold = 60 %}
{% set minimum_spend = 40 %}
{% if cart.cv > minimum_spend and cart.cv < free_delivery_threshold %}
Spend {{ (free_delivery_threshold - cart.cv)|format_currency(cart.curr, 2) }} more to qualify for free delivery!
{% elif cart.cv > minimum_spend and cart.cv > free_delivery_threshold %}
You qualify for free delivery!
{% endif %}
Multiple threshold levels
And here's an example for multiple delivery threshold levels:
{% set delivery_threshold_1 = 25 %}
{% set delivery_threshold_2 = 100 %}
{% if cart.cv < delivery_threshold_1 %}
Text to show if the total is below the first threshold
{% elif cart.cv > delivery_threshold_1 and cart.cv < delivery_threshold_2 %}
Text to show if the total is between the two thresholds
{% elif cart.cv > delivery_threshold_2 %}
Text to show if the total is over the second threshold
{% endif %}
To use, simply change the values of each threshold and update the text to appear (put in the message/HTML/text you want to show).