Last active
January 12, 2021 00:16
-
-
Save adamwooding/a18063588a09df86d5f53ca5b0e419da to your computer and use it in GitHub Desktop.
Shopify - Additional Scripts for Product Downloads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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