How to display barcode on order packing slip?

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

{{ line_item.title }} {% if line_item.variant_title != blank %} {{ line_item.variant_title }} {% endif %} {% if line_item.sku != blank %} {{ line_item.sku }} {% endif %} **{% if line_item.variant.barcode != blank %}** **** **{{ line_item.variant.barcode }}** **** **{% endif %}**

... {% endfor %}

Any advice?

Thanks.

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

This solution works for barcode number on packing slip.

https://community.shopify.com/post/2123720

{% if line_item.sku != blank %}
{% for item in order.line_items %}
{% if item.sku == line_item.sku %}

{{ item.variant.barcode }}

{% break %}
{% endif %}
{% endfor %}
{% endif %}