Personalized checkout and custom promotions with Shopify Scripts
Hi! I have the following script on my checkout page but nothing is showing up. Could anyone help me troubleshoot please?
<script>
{% case localization.language.iso_code %}
{% when 'en' %}
<div class="content-box">
<div class="content-box__row"><h2>COMMERCIAL INVOICE AVAILABLE</h2></div>
<div class="content-box__row"><p><a target='_blank' href='https://www.dansmaclasseboutique.com/apps/download-pdf/orders/7f3237ebac5317fa909e/{{ order.id | times: 8002 }}/{{ order.name | handleize }}.pdf'>Download my PDF invoice</a></p></div></div>
{% else %}
<div class="content-box">
<div class="content-box__row"><h2>FACTURE FISCALE DISPONIBLE</h2></div>
<div class="content-box__row"><p><a target='_blank' href='https://www.dansmaclasseboutique.com/apps/download-pdf/orders/7f3237ebac5317fa909e/{{ order.id | times: 8002 }}/{{ order.name | handleize }}.pdf'>Télécharger ma facture fiscale</a></p></div></div>
{% endcase %}
{% endif %}
</script>
Hey @DMCB ,
The code you entered above is liquid (+ HTML) code, it should not be inside <script> and </script> tags which is for JavaScript code.
Thanks
Yash Garg
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025