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
8566 1690 1700

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 and Accept solution!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- 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
8566 1690 1700

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 and Accept solution!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- 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
8566 1690 1700
{% 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 and Accept solution!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- 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?