Approved liquid in additional scripts

Excursionist
38 1 2

I have som liquid code calculating home delivery based on day and time of day. I would like to display it on the "order thank you" page. I've tried including snippet and adding the liquid in additional scripts and it doesn't work.

 

Where can i find approved liquid for the additional scripts? Is there some tweak to make it work?

 

Example code:

 

{% capture day %}{{ 'now' | date: '%A' }}{% endcapture %}
{% case day %}
  {% when 'Monday' %}
{% capture current_time %}{{ "now" | date: "%H%M" }}{% endcapture %}
{% if '1200' < current_time %}
    {% assign days = 1 | times: 86400 %}
    {{ "now" | date: "%s" | plus: days | date: "%A den %-d %B" }} mellan kl 18:00 - 22:00.
{% else %}
  {{ "now" | date: "Tonight %A den %-d %B" }} mellan kl 18:00 - 22:00.
{% endif %}
{% endcase %}
0 Likes
Highlighted
Shopify Partner
46 9 14

Hello @Djurmamman 

 

Unfortunately additional scripts section will not execute your liquid code :(

 

Best Regards

Parth Bhut   

0 Likes