Add line item properties to Order Confirmation

Solved
LaBruce
New Member
2 0 0

Hi,

Here is the code I added to my product-template to get Name of Attendee and their email. What code can I add to the Order Confirmation email for that info to show? I see it on the Order and Summary page but I would like it to show up in the Order Confirmation email.

<p class="line-item-property__field">
<label for="attendees-name">Attendee's Name</label>
<input required class="required" id="attendees-name" type="text" name="properties[Attendee's Name]">
</p>
<p class="line-item-property__field">
<label for="attendees-email-address">Attendee's Email Address</label>
<textarea required class="required" id="attendees-email-address" name="properties[Attendee's Email Address]"></textarea>
</p>

 

Thanks,

LB

0 Likes

This is an accepted solution.

Hi LB:

This is possible. The code below adds the Attendee's Name and Attendee's Email will appear below the product title and quantity for each line item on the Order Confirmation Email.

Step 1. Open the Order Confirmation template: Settings > Notifcations > Order confirmation

Step 2. Add the following code between the selling plan name and refunded tag

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

<!-- Start Custom Code -->
{%- for prop in line.properties -%}
<div>                     
    <span>{{ prop.first }}: </span>
    <span> {{ prop.last }}  </span>
<div>  
{%- endfor -%}   
<!-- End Custom Code -->

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">Refunded</span>
          {% endif %}

 

 

If my response was helpful please Like and Mark As Solution.
0 Likes
LaBruce
New Member
2 0 0
Thank you! That worked. Much appreciated!

LB
0 Likes