A space to discuss online store customization, theme development, and Liquid templating.
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
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
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.
That still didn't work 😣
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.
{% 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.
Hey there, still not working 😞
Hey Dan - This code still wasn't working. Was there another solution?