Solved

Order Printer template - removing "Tip" as a line item

Cubic_Zirconia
Excursionist
12 1 20

The Shopify app "Order Printer" needs to have a template available that shows the order line items only including the products ordered, not including the "Tip" which comes after the subtotal.  The liquid variables says "subtotal_line_items excludes tip line items" but when I use that code instead of "line_items" it doesn't show any products at all in the printed pdf. 

Here is my template:

<div style="float: left; margin: 0 0 1.5em 0;" >
<strong style="font-size: 2em;">CubicZirconia.com packing slip for order {{ order_name }}</strong><br /><br />

</div>

<hr />

<h3 style="margin: 0 0 1em 0;">Item Details</h3>

<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Quantity</th>
<th>Item</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td>{{ line_item.quantity }} x</td>
<td><b>{{ line_item.title }}</b></td>
{% endfor %}
</tr>
</tbody>
</table>

{% if shipping_address %}
<h3 style="margin: 0 0 1em 0;">Shipping Details</h3>

<div style="margin: 0 0 1em 0; padding: 1em; border: 1px solid black;">
<strong>{{ shipping_address.name }}</strong><br/>
{% if shipping_address.company %}
{{ shipping_address.company }}<br/>
{% endif %}
{{ shipping_address.street }}<br/>
{{ shipping_address.city }}
{{ shipping_address.province_code }}
{{ shipping_address.zip | upcase }}<br/>
{{ shipping_address.country }}
</div>
{% endif %}

 

Here's the section needing the edit:
<tbody>
{% for line_item in line_items %}
<tr>
<td>{{ line_item.quantity }} x</td>
<td><b>{{ line_item.title }}</b></td>
{% endfor %}
</tr>
</tbody>

How do I make it show the product line items and not include "Tip" as a line item?

The Clear Choice for Cubic Zirconia ™
Accepted Solution (1)

Cubic_Zirconia
Excursionist
12 1 20

This is an accepted solution.

Well I'll go ahead and update this myself.  I made the following change to the template html and now it's showing correctly without the tip:

 

  <tbody>

    {% for line_item in line_items %} {% unless line_item.title contains  'Tip' %}

      <tr>

        <td>{{ line_item.quantity }} x</td>

        <td><b>{{ line_item.title }}</b></td>

 {%endunless%} {% endfor %}

      </tr>

  </tbody>

 

I hope this helps somebody else!

Shopify support told me that we had to make a theme code modification in order to get this template to print correctly *eye roll*. 

The Clear Choice for Cubic Zirconia ™

View solution in original post

Reply 1 (1)

Cubic_Zirconia
Excursionist
12 1 20

This is an accepted solution.

Well I'll go ahead and update this myself.  I made the following change to the template html and now it's showing correctly without the tip:

 

  <tbody>

    {% for line_item in line_items %} {% unless line_item.title contains  'Tip' %}

      <tr>

        <td>{{ line_item.quantity }} x</td>

        <td><b>{{ line_item.title }}</b></td>

 {%endunless%} {% endfor %}

      </tr>

  </tbody>

 

I hope this helps somebody else!

Shopify support told me that we had to make a theme code modification in order to get this template to print correctly *eye roll*. 

The Clear Choice for Cubic Zirconia ™