Articles on: Products & Inventory

Digital products - How to add a Download Link on the Order Status Page

Note: Orders will need to be marked as paid for the automatic digital download as well as the link below to work.

This article shows how you can add and display a Download link on the order status page for digital goods once sold on your Shopify store. A sample of which is shown below.


Digital download sample link


Steps

Go to Settings followed by Checkout and accounts


Checkout and accounts settings


Scroll down the page to the Order status page section

Order status page


Copy and paste the code below into the Additional scripts box as shown in the image above.

<script>
  {% for line in checkout.line_items %}
  {% assign orderId = checkout.order_id %}
    {% if line.requires_shipping != true %}
    {% assign productId = line.product_id %}
    {% assign variantId = line.variant_id %}
      Shopify.Checkout.OrderStatus.addContentBox(
        '<h2>Your Digital File(s)</h2>',
        '<p><a href="https://app.puppetvendors.com/product/63cb0aba75ba016a0fb105f5/download?orderId={{orderId}}&variantId={{variantId}}&shopifyProductId={{productId}}&source=orderStatus" target="_blank">Click here to download now</a></p>'
      )
    {% endif %}
  {% endfor %}
</script>

Updated on: 21/08/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!