Product description: if today you will receive within current date =now' | date: '%A'

Topic summary

Goal: Display a dynamic delivery message in a Shopify product description based on the current weekday using Liquid (Shopify’s templating language).

What was tried: A Liquid snippet using ‘now’ | date: ‘%A’ and a case/when block to output different messages for each day. The code appears as literal text in the live view, not as rendered output.

Key points from responses:

  • Liquid-rendered time is not reliable for per-visit freshness due to Shopify’s server-side caching; a page may serve the same pre-rendered content for days.
  • Achieving truly current, per-user day/time logic should be done client-side with JavaScript, though that introduces complexity (e.g., handling visitors’ local time zones).
  • A simpler, static message (e.g., “Free 2 business days delivery”) may be more practical.

Notes: The Liquid code snippet is central to the issue. No JavaScript implementation was provided.

Status: Unresolved; recommended approach is to use JavaScript or simplify the message.

Summarized with AI on December 25. AI used: gpt-5.

I want my products description to say.

{% assign current_day = 'now' | date: '%A' %}

{% case current_day %}
{% when ‘Friday’ %}
Free delivery! Monday or Tuesday from Gqeberha. Excluding Tax!
{% when ‘Saturday’ %}
Free delivery! Monday or Tuesday from Gqeberha. Excluding Tax!
{% when ‘Sunday’ %}
Free delivery! Monday or Tuesday from Gqeberha. Excluding Tax!
{% when ‘Thursday’ %}
Free delivery! Friday or Monday from Gqeberha. Excluding Tax!
{% when ‘Monday’ %}
Free delivery! Tuesday or Wednesday from Gqeberha. Excluding Tax!
{% when ‘Tuesday’ %}
Free delivery! Wednesday or Thursday from Gqeberha. Excluding Tax!
{% when ‘Wednesday’ %}
Free delivery! Thursday or Friday from Gqeberha. Excluding Tax!
{% endcase %}

But keep on getting the same text of the code in the live view it’s embarrassing.

Does anyone know how to get it to work.

Please help!

Time in Liquid is not precise.
Shopify uses server-side caching to ensure your pages load fast. So it may serve the same cached page for days after it was first rendered.

Thing like the one you want should be done with Javascript, but then it’s not straight forward too, because JS code would need to account the time difference between you and your visitors…

Frankly, wouldn’t simple “Free 2 business days delivery” be good enough?