Can't Get Custom Line Item Properties to Display on Order Confirmation Email

Highlighted
New Member
2 0 0

Hi, I have been working hard on my site and am hoping someone can give me some advice.

I am selling custom products and used the information from the customization Shopify tutorial to enable my customers to add their personalization details to the products.

 

 

Shopping cart with customization dataShopping cart with customization data

It all is working beautifully, (see screenshot above) until I realized that I need to include those custom line item properties to the order confirmation emails that Shopify sends out. I have looked at just about every bit of information on this that I could find and still cannot get it working.

 

Here is the code snippet that I have used in the email confirmation template:

          <span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ line.variant.title }} <br/>SKU:  {{ line.variant.sku }}</span><br/>
<span style="background:#eeeeee;">
{% for p in line.properties %}{% unless p.last == blank %} - {{ p.first }}: {{ p.last }}{% endunless %}{% endfor %}
</span>
          {% endif %}

The part I added to display the SKU works just fine, its the part below (I underlined) where it should print the line properties for that order that isn't working. 

Is anyone able to tell me what I am doing wrong? I have also placed test orders and the email that is sent out is the same as the preview window..... It doesn't work.

 

Untitled-1.jpg

 

0 Likes
Highlighted
New Member
2 0 0

Please, does no one have any advice :(   ??

0 Likes
Highlighted