All things Shopify and commerce
How do I customize order confirmation emails per product? For example, after someone orders a product, we need to send them a link to a webpage to provide additional information.
Thanks!
Customize order confirmation emails per product in Shopify, you'll need to use Shopify's Liquid code within the email templates.
Follow these steps
Thanks
That's helpful, thank you! I'm not great at coding so I used ChatGPT... does this look correct to you?
The title of the product is "Estate Preparation Package" Thanks!
<!-- Add the section for the estate preparation package -->
{% assign estate_preparation_package = false %}
{% for line_item in line_items %}
{% if line_item.title contains 'Estate Preparation Package' %}
{% assign estate_preparation_package = true %}
{% endif %}
{% endfor %}
{% if estate_preparation_package %}
<p>Thank you for purchasing the Estate Preparation Package. To allow us to customize your Estate Preparation Package to your unique circumstance, please complete your onboarding form by visiting the following link: <a href="https://buriedinwork.com/eppintakeform">Complete Onboarding Form</a></p>
{% endif %}
Hi @BuriedInWork
I believe you can use the simpler code provided below to check if any of the array items contain the string 'Estate Preparation Package'.
{% assign has_estate_package = line_items | map: 'title' | contains: 'Estate Preparation Package' %}
If you prefer to use the code you provided earlier, you should consider adding at least one additional line of code below.
{% break %}
Thanks
Quick question:
So, @aaser018 , you meant the case when the customer ordered several products?
In my case, I'm trying to hide the single price for line items in a bundle, while showing it when the product is not part of a bundle.
{% assign has_estate_package = line_items | map: 'title' | contains: 'Estate Preparation Package' %}
Using that "simpler" way above did not work for my use case. Instead, I referred back to the first answer and that ended up working.
{% assign dont_show_bundle_price = false %}
{% if line.title contains 'BUNDLE' %}
{% assign dont_show_bundle_price = true %}
{% endif %}
{% if line.product.title contains 'BUNDLE' %}
{% assign dont_show_bundle_price = true %}
{% endif %}
{% if line.variant.title contains 'BUNDLE' %}
{% assign dont_show_bundle_price = true %}
{% endif %}
{% if dont_show_bundle_price %}
<!-- dont show bundle price -->
{% else %}
<!-- show the price for individual products -->
{% endif %}
Just wanted to share in case someone runs into this issue 🙂
Instead of using "title contains 'BUNDLE'" you can probably use "tag" or "type."
This looks good, I'd like to try it- is there a specific place in the email this code needs to go into?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025