On the majority of our products, there is a custom name field where buyers can write any text they wish to display on the item. So I’m wondering if it’s possible to display the TEXT that the customer entered into the order confirmation email. Product Options & Customizer is the custom app I use. Thanks in advance for all the help
It is possible. Without seeing the storefront/copy of the current email its hard to say exactly how to do it though. Also not sure how it would work when using an app.
But you need to render the line item property (which passes the inputted text to you) in the email message. I have not fully read this, but it appears to be exactly what you would need to do:
https://ol-wiki.myshopify.com/blogs/general/display-line-item-properties-in-email-notification
Good luck!
Thank you so much for your information. Here is the original confirmation email
And I would like to add more inputted information like this. We will try to follow the blog. Thank you!
You can try adding this maybe it will work:
{%line_items%}
For more info: https://help.shopify.com/en/manual/orders/notifications/email-variables#line-item
Hey @DuyenTruong
You may try
-
From your Shopify admin, go to “Settings”- “Notifications”.
-
Click on the “Order confirmation” under the “Email templates” section.
-
In the Email Body (HTML) section, you’ll see where you can edit the template of the email. You can add something like the following where you want the custom text to appear:
{% for line in line_items %}
{% for p in line.properties %}
{% if p.first == 'custom_text' %}
Custom Text: {{ p.last }}
{% endif %}
{% endfor %}
{% endfor %}
This code loops through each line item in the order, then loops through each property of the line item. If it finds a property with the name ‘custom_text’, it will display "Custom Text: " followed by whatever the customer entered.
Please replace ‘custom_text’ with the actual name of your custom field if it’s different.
Hi @DuyenTruong ,
Another option to add your text fields or more custom options like checkboxes, file uploads, dropdowns, etc., is by using the Easify Product Options app, free plan available .
Moreover, if you need assistance or want to include option information in your order confirmation email, you just need to reach out to Easify team via live chat.
Hi Azamgill!
Would it be possible to use this code to also hide propertys of a specific name? In case so, what would the code be for a property namned “custom” for an example.
Thanks in advance!
This is the fix I’ve been looking for!!
You legend, well done. I’ve been playing around with test orders and moving the code and it’s working how I want it to, thanks.