> For the complete documentation index, see [llms.txt](https://helpdesk.ldtsoft.work/ldt-digital-downloads/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdesk.ldtsoft.work/ldt-digital-downloads/settings-and-customization/how-to-add-download-buttons-to-shopify-emails.md).

# How to add download buttons to your Shopify emails

Put a download button in Shopify's own order emails with the bridge URL, so buyers reach their files straight from the email.

Add an "Access digital content" button to Shopify's order emails: copy the bridge URL from LDT Digital Downloads and paste one line of HTML into the email template.

### 1. Open the integration settings

Go to **LDT Digital Downloads → Settings → Integration**.

![Shopify admin sidebar with Settings in the LDT Digital Downloads group, and the Integration row in the app settings list](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2FgaCdRs6kq254zsilW4T6%2Fsettings-nav-integration.png?alt=media)

The page has two parts: the code you paste into Shopify's email template (**Example code**), and the **Bridge URL** the button points at.

### 2. Copy the bridge URL

Scroll to **Bridge URL** and click **Copy**. This is the address of your download portal; the button in the email sends the buyer there with their order already identified.

### 3. Open the Shopify email template

Click **Customize Shopify email template** — it opens Shopify's own guide for editing notification templates.

![Integration settings with the Customize Shopify email template button](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-6bf5728f5c7259b25e628856a46905c20dc70e15%2Fsettings-integration-shopify-email.png?alt=media) In your Shopify admin go to **Settings → Notifications** and open the order confirmation email (or any other email you want the button in).

### 4. Paste the button code

Copy the block under **Example code → Add button for any order** and paste it where you want the button in the email. The link inside it carries three search parameters:

* `order_number` — the order the email is about.
* `order_email` — the address the email went to.
* `auto` — lets the portal open the customer's downloads without another sign-in step.

Keep the `{{ … }}` parts exactly as they are: Shopify fills them in for each email it sends.

If you only want the button on orders that contain digital products, copy the code under **Add button for only digital order** instead.

![Integration settings with the email template card and the button code to paste](https://1863660695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iG7j4lDhziM0FqdCCU8%2Fuploads%2Fgit-blob-6bf5728f5c7259b25e628856a46905c20dc70e15%2Fsettings-integration-shopify-email.png?alt=media)

### 5. Pick the URL style

Under **Setup** you can choose between:

* **Option 1: Using our bridge URL** — the default; the button points at the app's own portal address.
* **Option 2: Using your Shopify URL directly** — the button points at a page on your own domain instead.

### 6. Only if you use H4G

The **H4G Integration** card is for stores that deliver through H4G. Fill in the **Secret key** there and turn on **Send update email if license keys changed** if a changed license key should email the customer automatically.

### Result

Buyers get a button in the order email that opens their downloads with the order already filled in, and they never have to copy an order number by hand.

### Troubleshooting

* **The button leads to an empty page.** One of the three parameters is missing — `order_number`, `order_email` and `auto` all have to be in the link.
* **The button shows for orders with no digital products.** Use the block under **Add button for only digital order**.
* **The button appears as plain text.** The `<a>` tag was pasted inside a text block that escaped it; paste it as HTML in the template, not into a paragraph field.

### Related

* **How to customize the download portal** — in Settings & customization (add the link after merging)
