Line items in customer confirmation emails not showing

Tourist
8 0 0

I'm having trouble getting the custom line items to show up in the emails sent to the customers.

This is the code I've used...

 

{{ line.title }}{% for p in line.properties %}{% unless p.last == blank %} - {{ p.first }}: {{ p.last }}{% endunless %}{% endfor %}

taken from here https://help.shopify.com/en/themes/customization/products/features/get-customization-information-for...

 

I've also tried this...

{% unless line_item.properties == empty %}
<ul>
  {% for property in line_item.properties %}
  <li>{{ property.first }}: {{ property.last }}</li>
  {% endfor %}
</ul>
{% endunless %}

taken from here https://help.shopify.com/en/themes/liquid/objects/line_item#line_item-properties

 

Neither one works for me in the order confirmation or new order emails.

Any help would be appreciated. Thanks

0 Likes
Highlighted

Hello 

What you get in output after running refered code.

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes
Tourist
8 0 0

I get no output, that's what is so strange.  I did get the {{ line.title }} to appear on a email preview but thats it.  I'm using shopify's free narrative theme if that helps at all.  Thanks for any help you can provide.

0 Likes
Tourist
8 0 0

Hi

 

 

0 Likes
New Member
24 0 0

I would be also interested as I'm facing the same issue (cf my topic here https://community.shopify.com/c/Shopify-Design/Product-customization-texte-image-upload-can-t-retrie...)

0 Likes
Shopify Partner
15 2 2

Hi @BVPark,

You can add this code to hopefully solve.

{%- assign property_size = item.properties | size -%}
                {% if property_size > 0 %}
                  <div class="cart__meta-text">
                    {% for p in item.properties %}
                      {% unless p.last == blank %}
                        {{ p.first }}:

                        {% comment %}
                          Check if there was an uploaded file associated
                        {% endcomment %}
                        {% if p.last contains '/uploads/' %}
                          <a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
                        {% else %}
                          {{ p.last }}
                        {% endif %}
                      {% endunless %}
                    {% endfor %}
                  </div>
                {% endif %}

Thank you

KoderWeb
Want to modify or custom changes on store hire us.
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

Email: mdraselhossain69@gmail.com
Shopify Expert | Shopify Designer | Shopify Developer
0 Likes