Display barcode on packing slip

cartparts
New Member
2 0 0

Hello,

We are trying to display the text we have entered in an items barcode field on an order packing slip underneath the sku.  We have tried using {{ line_item.variant.barcode }} but it fails to pull the barcode for the item in question.  

This is the snippet of code that we are editing in the packing slip template:


{% for line_item in line_items_in_shipment %}
...
<p>
<span class="line-item-description-line">
{{ line_item.title }}
</span>
{% if line_item.variant_title != blank %}
<span class="line-item-description-line">
{{ line_item.variant_title }}
</span>
{% endif %}
{% if line_item.sku != blank %}
<span class="line-item-description-line">
{{ line_item.sku }}
</span>
{% endif %}
{% if line_item.variant.barcode != blank %}
<span class="line-item-description-line">
{{ line_item.variant.barcode }}
</span>
{% endif %}
</p>
...
{% endfor %}

 

Any advice?

Thanks.

Reply 1 (1)
Charlie506
Excursionist
41 2 2

Hi @cartparts 

Unfortunately it doesn't look like lineitem.barcode is an option in the Shopify liquid variables.

If you would like a barcode shown on your Packing slip why not check out our app EasyScan.

There is a free 10-day trial as well, plus a lot more features!

Have a great day!

Charlie

If my comments are helpful, please Like my post and Accept Solution.
Product Manager at 506.io