Cant get SKU to show in packing slip

Highlighted
Tourist
6 0 1

I have added SKU to all my products are the variations.

I have a table like so

<p style="float: right; text-align: right; margin: 0;">
{{ "now" | date: "%m/%d/%y" }}<br />
Invoice for {{ order_name }}
</p>

<div style="float: left; margin: 0 0 1.5em 0;" >
<strong style="font-size: 2em;">{{ shop_name }}</strong><br /><br />
{{ shop.address }}<br/>
{{ shop.city }} {{ shop.province_code }} {{ shop.zip | upcase }}<br/>
{{ shop.country }}
</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>Product ID</th>
<th>Quantity</th>
<th>Item</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td>{{ line_item.sku }}</td>
<td>{{ line_item.quantity }} x</td>
<td><b>{{ line_item.title }}</b></td>

</tr>
{% endfor %}
</tbody>
</table>

{% if transactions.size > 1 %}
<h3 style="margin: 0 0 1em 0;">Transaction Details</h3>
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Type</th>
<th>Amount</th>
<th>Kind</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for transaction in transactions %}
<tr>
<td>{{ transaction.gateway | payment_method }}</td>
<td>{{ transaction.amount | money }}</td>
<td>{{ transaction.kind }}</td>
<td>{{ transaction.status }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}

{% if note %}
<h3 style="margin: 0 0 1em 0;">Note</h3>
<p>{{ note }}</p>
{% endif %}

{% 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 %}

<p>If you have any questions, please send an email to <u>{{ shop.email }}</u></p>



But for some reason, the SKU is not showing...?


0 Likes
Highlighted
Shopify Partner
29 3 3

Hi,

 

Is it showing the line_item.quantity and line_item.title values?

0 Likes
Highlighted
Tourist
6 0 1

Yes it is. I am very confused why the SKU wont show

0 Likes
Highlighted
Shopify Partner
29 3 3

Hi Thomas,

 

I tested your code on my side and it seems to be working fine. What might be an issue is that not all of your variant items have SKUs. Have you had a look at your variant SKUs?

0 Likes