How to add a product barcode to the packing list?

I want add product barcode to Packing List.

But it doesn’t work…

Hello Tommaso,

Please try the below given code:-

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

Hi @tommaso ,

Try this out:

<div>barcode: {{ line_item.variant.barcode }}</div>

Let me know if this solves your problem or if you need further help!

@BrianAtWork @shopify-dev-05 Thank you for your help, but the code is still invalid.Behind the barcode, it is still blank.

Did anyone find a working solution for this?

Hi, have you found a solution to this yet?

{% for line_item in line_items %}

{{ line_item.variant.barcode }}

{% endfor %}

You try it, this should work.

Didn’t work for me. Did it work for you? Are you able to provide a screenshot of yours?

{% for line_item in line_items %}

{% endfor %}
Img Quantità Articolo Barcode SKU Prezzo Imponib.
{{ line_item | img_url: 'thumb' | img_tag }} {{ refund_line_item }}

{{ line_item.fulfillable_quantity }}

x

{{ line_item.title }} {{ line_item.variant.barcode }} {{ line_item.sku }} {% if line_item.original_price != line_item.price %} {{ line_item.original_price | money }} {% endif %}

{{ line_item.price | money }}

{{ line_item.fulfillable_quantity | times: line_item.price | money }}

This didn’t show the barcode for me either.

Any suggestions?

It didn’t work for me and I stopped trying. Sorry :disappointed_face:

i have been trying this too but no luck do i need to purchase an app for this

{% for line_item in line_items %}

{{ line_item.variant.barcode }}

{% endfor %}

where does this go what line

HI!

Did you figure this out?

I am trying to do the exact same thing.

Thank you!

No, unfortunately we were told it wasn’t possible. Seems like such an easy formatting change, so I don’t understand why they can’t do it.

No this code is not working

Try this code :

{{ line_item.variant.barcode | json }}

Adding the " | json" part worked for me, hope this helps!

No its not working. It’s showing “null”.

One more thing any one know, How to show custom attribute value on packaging slip?