add product barcode to Packing List

Highlighted
New Member
6 0 0

I want add product barcode to Packing List.

8261.png

But it doesn't work...

8262.png

 

8263.png

0 Likes
Highlighted
Explorer
65 5 7

Hello  Tommaso,

 

Please try the below given code:-

{% for variant in product.variants %}
{{ variant.barcode }}
{% endfor %}
-Want to customize or make changes to a theme? Hire me.
-If my reply was helpful, Click Like to let me know!
- If your question was answered, Mark it as an Accepted Solution!
0 Likes
Highlighted
Shopify Partner
242 59 113

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!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

0 Likes
Highlighted
New Member
6 0 0

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

0 Likes
Highlighted
Shopify Partner
1 0 0

Did anyone find a working solution for this?

0 Likes
Highlighted
New Member
3 0 0

Hi, have you found a solution to this yet?

0 Likes
Highlighted
New Member
6 0 0

{% for line_item in line_items %}

{{ line_item.variant.barcode }}

{% endfor %}

 

 

 

You try it, this should work.

0 Likes
Highlighted
New Member
3 0 0

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

0 Likes
Highlighted
New Member
6 0 0
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
  <thead>
    <tr>
    <td>Img</td>
     <td> Quantità</td>
      <td>Articolo</td>
      <td>Barcode</td>
      <td>SKU</td>
     <td>Prezzo</td>
     <td>Imponib.</td>
    </tr>
  </thead>
  <tbody>
 
{% for line_item in line_items %}
  
      <tr>
     
<td>{{ line_item | img_url: 'thumb' | img_tag }}</td>
        <td>{{ refund_line_item }}
       
       {{ line_item.fulfillable_quantity }}
      
          
       x</td>
        <td>{{ line_item.title }}</td>
        <td>{{ line_item.variant.barcode }}</td>
         <td>{{ line_item.sku }} </td>
       
        <td>
          {% if line_item.original_price != line_item.price %}
            <s>{{ line_item.original_price | money }}</s>
          {% endif %}
          
          {{ line_item.price | money }}
        </td>
        <td>
       {{ line_item.fulfillable_quantity  | times: line_item.price | money  }}
        
        
        
         </td>
      </tr>
    {% endfor %}
  </tbody>
</table>
 
 
 
514.png
0 Likes
Highlighted
New Member
1 0 0

This didn't show the barcode for me either. 

Any suggestions?

0 Likes