How can I add a product variant level information field to the packing slip?

Hi, I need to add a product variant level information field to the packing slip. I’m using the barcode field to store the information and hope to show that on the packing slip but it’s not working

{{ line_item.variant.barcode | json }}
{{ line_item.barcode | json }}
{{ line_item.variant.barcode }}

all gave me null

Does anyone know how to output the field? Is there another field I can use for this purpose?

thank you

@inlander
Use like this code to display barcode.

{% for variant in product.variants %}
{{ variant.sku }}
{{ variant.barcode }}
{% endfor %}

Let me know if you need any more help,

Thank you.

doesn’t work. no barcode

@inlander

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

Checkout this link.