Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Add code & text to confirmation email

Add code & text to confirmation email

kelly93
New Member
7 0 0

Hi there, 

 

I would like to add a dynamic line to our confirmation email from Shopify to customers if they have purchased a specific product. IE - If they have purchased our shipping insurance, the confirmation email directs them to where they can make a claim. 

 

This is the code I have placed in the liquid code of the confirmation email but when I tested it, it didn't work. 

 

{% if product.title == 'protectMY Products Shipping Protection' %}
You purchased protectMY Products Protection, if there is any issues with your package during shipping, please make a claim <a href="https://au.protectmeproducts.co/pages/protectme-claim-page">via this link.</a>
{% endif %}

 

If anyone can help, that would be great. 

 

Thanks

Replies 7 (7)

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Hi @kelly93 

You need to edit your code to this to ensure it works on your email.

{% if line.product.title == 'protectMY Products Shipping Protection' %}
You purchased protectMY Products Protection, if there is any issues with your package during shipping, please make a claim <a href="https://au.protectmeproducts.co/pages/protectme-claim-page">via this link.</a>
{% endif %}

 

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

kelly93
New Member
7 0 0

That still didn't work 😣

Screen Shot 2024-07-03 at 3.01.17 pm.png

 

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Hi @kelly93 

Make sure you add the correct product name instead 'protectMY Products Shipping Protection'. 

Or could you send me that product URL so I can provide another code.

 

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

kelly93
New Member
7 0 0
Hi there,

Sorry for the delay. This is the link: https://au.protectmeproducts.co/products/navidium-shipping-protection
Dan-From-Ryviu
Shopify Partner
12073 2359 2539
{% if line.product.id == 9423258616124 %}
You purchased protectMY Products Protection, if there is any issues with your package during shipping, please make a claim <a href="https://au.protectmeproducts.co/pages/protectme-claim-page">via this link.</a>
{% endif %}

Please try to update the code to this and check again 

 

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

kelly93
New Member
7 0 0

Hey there, still not working 😞 

kelly93
New Member
7 0 0

Hey Dan - This code still wasn't working. Was there another solution?