We have the order confirmation HTML taken from Klayvio.
I have mutule products where only on those specific products I need to add an additional line of text as they are made to measure products.
I want to simply create something like
{% if line_title contains ‘Item 1 or Item 2 or Item 3’ %}
You have purchased an item that is custom made. We want to make sure you have everything right so we’ll be contacting you shortly.
{% endif %}
Ready-to-paste snippet you can drop inside your order confirmation email template. It loops through each product in the order and adds your custom message if the product matches your condition:
{% for line in line_items %}
<p>
{{ line.title }}
</p>
{% if line.title contains 'Item 1'
or line.title contains 'Item 2'
or line.title contains 'Item 3' %}
<p style="color:#d9534f; font-weight:bold;">
You have purchased an item that is custom made. We want to make sure you have everything right, so we’ll be contacting you shortly.
</p>
{% endif %}
{% endfor %}
This will:
Print each product name (line.title)
Show your custom message only for the items that match “Item 1”, “Item 2”, or “Item 3”.
Style the message a little (red and bold) so it stands out in the email — you can remove the style="" part if you want plain text.
If you’d rather manage it by tagging products instead of hardcoding names (recommended, especially as your catalog grows), here’s the version using tags:
{% for line in line_items %}
<p>
{{ line.title }}
</p>
{% if 'custom-made' in line.product.tags %}
<p style="color:#d9534f; font-weight:bold;">
You have purchased an item that is custom made. We want to make sure you have everything right, so we’ll be contacting you shortly.
</p>
{% endif %}
{% endfor %}
Then, just add the tag custom-made to any product in Shopify that needs this note.
I’m glad you got the Liquid message working. Made-to-measure orders are exactly the kind of purchase that led us to build our two-app suite, because the customer usually needs more than one extra sentence after checkout. Digital Unboxing & COA Kit can give selected orders a branded confirmation with a personal note, care information and a merchant-issued certificate, then In the Making continues in the same customer home as the piece moves through production. It keeps the whole experience specific to the item they bought without turning the main confirmation template into a collection of conditions. I’m the founder, and both have free plans: Digital Unboxing & COA Kit and In the Making.