If you want to inform your customers that they have qualified for free delivery or encourage them to spend a little more to get free delivery, you can adjust the code responsible for free delivery, minimum spend, or multiple thresholds of your cart layout.
Set free delivery threshold
To inform your customers that they have qualified for free delivery:
set the
free_delivery_threshold
variable to the amount that qualifies for free delivery.customize the text to display the message you want for each scenario.
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 %}
Set minimum spend threshold
If you want only to display this message if a minimum spend amount is reached, use the following 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 %}
Add multiple threshold levels
This example shows 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, change the values of each threshold and update the text to appear. Put in the message/HTML/text you want to show.