All things Shopify and commerce
I am using Dawn theme and have added the following code to card-product.liquid.
My aim was to allow the customer to add a note for each item they add to cart.
<div class="customDescription line-item-property__field"> <label for="custom_description">Special Notes</label> <textarea id="custom_description" name="properties[Notes]"></textarea> </div>
How can I display the inputs of this field in customer confirmation emails?
Given that it shows perfectly in the orders in the admin.
Solved! Go to the solution
This is an accepted solution.
@voykit
Try checking for the below code in the confirmation email
1> if it exists then remove the first and last line and save and test
2> if it does not exist then remove the first and last line from below code and paste it in the line items (product) loop
{% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
{% for property in line.properties %}
{% assign property_first_char = property.first | slice: 0 %}
{% if property.last != blank and property_first_char != '_' %}
<div class="order-list__item-property">
<dt>{{ property.first }}:</dt>
<dd>
{% if property.last contains '/uploads/' %}
<a href="{{ property.last }}" class="link" target="_blank">
{{ property.last | split: '/' | last }}
</a>
{% else %}
{{ property.last }}
{% endif %}
</dd>
</div>
{% endif %}
{% endfor %}
{% endif %}
If this information was helpful to you, please give it a Like. If it resolved your issue, kindly hit Like and mark it as the Solution! Thank you!
Hi @voykit
If you want to add line item property to all the products, then you can provide an option to do son on the Product page itself.
This will then automatically appear in confirmation emails and admin orders
If this information was helpful to you, please give it a Like. If it resolved your issue, kindly hit Like and mark it as the Solution! Thank you!
But how can I do that?
This line property shows perfectly in admin orders but not in confirmation emails.
@voykit Can you please share screenshot of that orders part. If it inconvenient to share here you can DM or email
Also, have you changed the code in order confirmation emails?
Above is the order page, this is how notes appear.
And yes, I have edited the code in confirmation email but nothing worked so far. Here's the code I tried to use:
<p>Special Notes: {{ line_item.properties[Notes] }}</p>
This is an accepted solution.
@voykit
Try checking for the below code in the confirmation email
1> if it exists then remove the first and last line and save and test
2> if it does not exist then remove the first and last line from below code and paste it in the line items (product) loop
{% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
{% for property in line.properties %}
{% assign property_first_char = property.first | slice: 0 %}
{% if property.last != blank and property_first_char != '_' %}
<div class="order-list__item-property">
<dt>{{ property.first }}:</dt>
<dd>
{% if property.last contains '/uploads/' %}
<a href="{{ property.last }}" class="link" target="_blank">
{{ property.last | split: '/' | last }}
</a>
{% else %}
{{ property.last }}
{% endif %}
</dd>
</div>
{% endif %}
{% endfor %}
{% endif %}
If this information was helpful to you, please give it a Like. If it resolved your issue, kindly hit Like and mark it as the Solution! Thank you!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024