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 what's possible with customizing Shopify Checkout beyond what's available out of...
By Shopify Feb 19, 20252m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025