Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamwooding/a18063588a09df86d5f53ca5b0e419da to your computer and use it in GitHub Desktop.
Save adamwooding/a18063588a09df86d5f53ca5b0e419da to your computer and use it in GitHub Desktop.
Shopify - Additional Scripts for Product Downloads
<script>
Shopify.Checkout.OrderStatus.addContentBox(
'<h2>File Download</h2>',
'<p>Please find your file downloads below. You will also recieve these links in your order confirmation email.</p>',
{% for line in checkout.line_items %}
{% for tag in line.product.tags %}
{% if tag == 'tag1' %}
'<p>Access Image 1 here: <a href="https://DownloadLinkFromAWS.png">Image 1</a></p>',
{% elsif tag == 'tag2' %}
'<p>Access Image 2 here: <a href="https://DownloadLinkFromAWS.png">Image 2</a></p>',
{% elsif tag == 'tag3' %}
'<p>Access Image 3 here: <a href="https://DownloadLinkFromAWS.png">Image 3</a></p>',
{% elsif tag == 'tag4' %}
'<p>Access Image 4 here: <a href="https://DownloadLinkFromAWS.png">Image 4</a></p>',
{% elsif tag == 'tag5' %}
'<p>Access Image 5 here: <a href="https://DownloadLinkFromAWS.png">Image 5</a></p>'
{% endif %}
{% endfor %}
{% endfor %}
)
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment