Solved

How can I show product notes in customer confirmation emails?

voykit
Tourist
6 0 1

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.

Accepted Solution (1)
JasmeetVT14313
Shopify Partner
201 47 54

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!

- Helpful? Please hit Like and mark it as a solution
- VTN Power Wishlist ultimate solution for effortless wishlist management. Free plan available
- Feel free to contact me at jasmeet.kaur@vtnetzwelt.com

View solution in original post

Replies 6 (6)

JasmeetVT14313
Shopify Partner
201 47 54

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!

- Helpful? Please hit Like and mark it as a solution
- VTN Power Wishlist ultimate solution for effortless wishlist management. Free plan available
- Feel free to contact me at jasmeet.kaur@vtnetzwelt.com
voykit
Tourist
6 0 1

But how can I do that?
This line property shows perfectly in admin orders but not in confirmation emails.

JasmeetVT14313
Shopify Partner
201 47 54

@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?

- Helpful? Please hit Like and mark it as a solution
- VTN Power Wishlist ultimate solution for effortless wishlist management. Free plan available
- Feel free to contact me at jasmeet.kaur@vtnetzwelt.com
voykit
Tourist
6 0 1

voykit_0-1714476054070.png

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>
JasmeetVT14313
Shopify Partner
201 47 54

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!

- Helpful? Please hit Like and mark it as a solution
- VTN Power Wishlist ultimate solution for effortless wishlist management. Free plan available
- Feel free to contact me at jasmeet.kaur@vtnetzwelt.com
voykit
Tourist
6 0 1

Thank you @JasmeetVT14313 it worked perfectly!