Can I add product type to order confirmation email?

Hi everyone!

Does someone know if I can add the product type of each item to the order confirmation email?
(I’ve already managed to show my customers this in the cart section.)

I’ve used this:

{{ item.product.type }}

It would be much better to show this on the order status page. But I guess I can only modify it with shopify plus correct?

Thank you for your help!

Hi @Kodamo ,

It’s true. Actually, to edit everything in checkout page, you need to upgrade to Shopify plus.

Have a great week!

Thank you. Do you know if it’s possible to add this to the order confirmation email?

Hello @Kodamo ,

Yes, you just need to modify the Order Confirmation Email Template. You can find it in Settings / Notifications / Order Confirmation from your admin panel.

Thank you!
I already know how to modify the notification but I don’t know where I have to add the code.
Can you show me the position?

look for {% for line in subtotal_line_items %}, You will see the code that shows the products of the order.

I am sorry I can’t find it.

Ok. I’ve found the position but the {{ item.product.type }} does not work somehow.
Do I need to add something or do I need a different one?
Thank you so much!

Yes, you need to add {{ line.product.type }}

Can someone help me if I did something wrong?
It is not working.

{% capture email_title %}THANK YOU! {% endcapture %}
{% capture email_body %}Hi {{ customer.first_name }}, thank you so much for your purchase!

This email is to confirm your order.

Once your order has been sent out, you will receive an extra shipping confirmation.

You can find the exact delivery time in every product description.

If your order contains more than one product, the delivery time depends on the item with the longest shipping time. All items in your order will be shipped together.

**Delivery time Germany:** It usually takes between 2 to 12 and in some cases a maximum of 30 business days for your order to be processed and delivered.

**Delivery time International:** It can vary depending on the destination and product. For an approximate delivery time please add the shipping time below to the time that is stated in the product description.

Europe: + 5 - 10 business days

Rest of the world: + 7 - 20 business days




If you require any further information, feel free to contact me.

<small>(Payment information for Bank Transfer is located on the bottom of this email.)</small>

{% endcapture %}

  
  
  
  
  
  

  
    <table>

      
        
          
<table>

  
    
      

        <table>

          
            

              <table>

                <tr>

                  <td>

                    {% if shop.email_logo_url %}
                      
                    {% else %}
                      # 
                        {{ shop.name }}
                      
                    {% endif %}
 

</td>

                    <td>

                      
                        Order {{ order_name }}
                      
                    

</td>

                </tr>

              </table>

            
          
        </table>

      
    
  
</table>

          <table>

  
    
      
        <table>

          
            
              
            ## {{ email_title }}
            

{{ email_body }}

            {% if order_status_url %}
              <table>

  
    
      <table>

        <tr>

          <td>

View your order

</td>

        </tr>

      </table>
      {% if shop.url %}
    <table>

      <tr>

        <td>

or Visit my store

</td>

      </tr>

    </table>
{% endif %}

    
  
</table>

            {% else %}
              {% if shop.url %}
    <table>

      
        
          <table>

            <tr>

              <td>

Visit my store

</td>

            </tr>

          </table>
        
      
    </table>
{% endif %}

            {% endif %}

            
          
        </table>
      
    
  
</table>

          <table>

  
    
      
        <table>

          <tr>

            <td>

              ### Order summary
            

</td>

          </tr>

        </table>
        <table>

          
            
              
            

  {% for line in line_items %}

  {% if item_count == 1 %}
    {% assign columnWrapperClass = 'order-list__item--single' %}
  {% elsif forloop.first == true %}
    {% assign columnWrapperClass = 'order-list__item--first' %}
  {% elsif forloop.last == true %}
    {% assign columnWrapperClass = 'order-list__item--last' %}
  {% else %}
    {% assign columnWrapperClass = '' %}
  {% endif %}
  {% endfor %}
<table>

    
      <table>

        <td>

          {% if line.image %}
            
          {% endif %}
        

</td>

        <td>

          {% if line.product.title %}
            {% assign line_title = line.product.title %}
          {% else %}
            {% assign line_title = line.title %}
          {% endif %}
          {{ line_title }} × {{ line.quantity }}

          {% if line.variant.title != 'Default Title' %}
            {{ line.variant.title }}
          {% endif %}

{{ item.product.type }}

{% for p in line.properties %}
  {% if p.last %}
    {% assign name = p.first %}
    {% assign value = p.last %}
  {% else %}
    {% assign name = p.name %}
    {% assign value = p.value %}
  {% endif %}
  {% unless value == blank %}
    

      {{ name }}:
    {% if p.last contains '//uploadery.s3' %}
      Link to your file
    {% else %}
      {{ value }}
    {% endif %}
    

  {% endunless %}
{% endfor %}
        

</td>

          
            {% if line.original_line_price != line.line_price %}
              <del>{{ line.original_line_price | money }}</del>
            {% endif %}
            

{{ line.line_price | money }}

          
      </table>
    
  </table>

            <table>

  
    <td>

</td>

    
      
        {% if discounts %}
          {% capture discount_title %}Discount {% if discounts.first.code %}({{ discounts.first.code }}){% endif %}{% endcapture %}
          

        {% endif %}

        

        {% for line in tax_lines %}
          

        {% endfor %}
      <table>
<tr>

  <td>

    

      {{ discount_title }}
    

  

</td>

  <td>

    **{{ discounts_savings | money }}**
  

</td>

</tr>
<tr>

  <td>

    

      Subtotal
    

  

</td>

  <td>

    **{{ subtotal_price | money }}**
  

</td>

</tr>

        
<tr>

  <td>

    

      Shipping
    

  

</td>

  <td>

    **{{ shipping_price | money }}**
  

</td>

</tr>
<tr>

  <td>

    

      {{ line.title }}
    

  

</td>

  <td>

    **{{ line.price | money }}**
  

</td>

</tr>
</table>
      <table>

        
<tr>

  <td>

    

      Total
    

  

</td>

  <td>

    **{{ total_price | money_with_currency }}**
  

</td>

</tr>

      </table>

      {% assign transaction_size = 0 %}
      {% for transaction in transactions %}
        {% unless transaction.kind == "capture" or transaction.kind == "void" %}
          {% assign transaction_size = transaction_size | plus: 1 %}
        {% endunless %}
      {% endfor %}

      {% if transaction_size > 1 %}
        

          {% for transaction in transactions %}
            {% if (transaction.status == "success" or transaction.status == "pending") and (transaction.kind == "authorization" or transaction.kind == "sale") %}
              {% if transaction.payment_details.credit_card_company %}
                {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
              {% else %}
                {% capture transaction_name %}{{ transaction.gateway | replace: "_", " " | capitalize }}{% endcapture %}
              {% endif %}

              

            {% endif %}
            {% if transaction.kind == 'refund' %}
              {% if transaction.payment_details.credit_card_company %}
                {% assign refund_method_title = transaction.payment_details.credit_card_company %}
              {% else %}
                {% assign refund_method_title = transaction.gateway %}
              {% endif %}

              

            {% endif %}
          {% endfor %}
        <table>

          <tr>
<td colspan="2">

</td>
</tr>

          <tr>
<td colspan="2">

</td>
</tr>
<tr>

  <td>

    

      {{transaction_name}}
    

  

</td>

  <td>

    **{{ transaction.amount | money }}**
  

</td>

</tr>

  
    

      Refund
        

        <small>{{ refund_method_title | capitalize }}</small>
    

  
  
    **- {{ transaction.amount | money }}**
  
</table>
      {% endif %}
    
  
</table>

            
          
        </table>
      
    
  
</table>

          <table>

  
    
      
        <table>

          <tr>

            <td>

              ### Customer information
            

</td>

          </tr>

        </table>
        <table>

          
            
              
            
                {% if requires_shipping and shipping_address %}
                
                {% endif %}
                {% if billing_address %}
                
                {% endif %}
              <table>

              <tr>
<td>

                  #### Shipping address
                  

  {{ shipping_address.name }}

  {{ shipping_address.address1 }}
  {% if shipping_address.address2 %}
  
{{ shipping_address.address2 }}
  {% endif %}
  
{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}
  
{{ shipping_address.country }}

                

</td>
<td>

                  #### Billing address
                  

  {{ billing_address.name }}

  {{ billing_address.address1 }}
  {% if billing_address.address2 %}
  
{{ billing_address.address2 }}
  {% endif %}
  
{{ billing_address.city }}, {{ billing_address.province }} {{ billing_address.zip }}
  
{{ billing_address.country }}

                

</td>
</tr>

            </table>
            <table>

              <tr>

                <td>

                  #### Shipping method
                  

{{ shipping_method.title }}

                

</td>

                <td>

                  #### Payment method
                  {% for transaction in transactions %}
                    {% if (transaction.status == "success" or transaction.status == "pending") and (transaction.kind == "authorization" or transaction.kind == "sale") %}
                      

                        {% if transaction.payment_details.credit_card_company %}
                          {% capture credit_card_url %}notifications/{{ transaction.payment_details.credit_card_company | downcase }}.png{% endcapture %}
                          
                          Ending in {{ transaction.payment_details.credit_card_last_four_digits }} — **{{ total_price | money }}**
                        {% else %}
                          {{ transaction.gateway | replace: "_", " " | capitalize }} — **{{ transaction.amount | money }}**

   {% endif %}

                    {% endif %}
                  {% endfor %}
                

</td>

              </tr>

            </table>

hi @Kodamo ,

You need to change:

{{ item.product.type }}

to {{ line.item.product.type }}

Hi @Jorge_Mosquera

Thanks! But it still does not work.
Is the place correct?

Or should it look something like this?

{% if product.type != 'Default Title' %}
            {{ line.item.product.type }}
          {% endif %}

Can someone else help me here out?