Skip to content

Instantly share code, notes, and snippets.

@shopifypartners
Last active January 19, 2023 15:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shopifypartners/33baf05e1a923d6fe040e49b74d9948a to your computer and use it in GitHub Desktop.
Save shopifypartners/33baf05e1a923d6fe040e49b74d9948a to your computer and use it in GitHub Desktop.
Script to load specific content for a particular product, on the order status page - https://www.shopify.com/partners/blog/order-status-page
<script>
{% for line in checkout.line_items %}
<!-- DEBUG looking at {{ line.title }} -->
{% if line.title == 'Red Sports Tee' %}
Shopify.Checkout.OrderStatus.addContentBox(
'<h2>Thanks for your order</h2>',
'<p>Have a 10% discount on us! Use AWESOME18 with your next purchase</p>'
)
{% endif %}
{% endfor %}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment