Liquid, JavaScript, themes, sales channels
Goodday everyone,
I have to add the barcode and other info to the default packing slip on Shopify.
refering to this post
I edit the code as following
(line 125,126, 132, 133)
but it shows nothing on the packingslip
our metafields register as below
How could I display these mefields data on the packing slip?
Solved! Go to the solution
This is an accepted solution.
Hi @Lin_RelationsJP,
Sorry for the confusion, I checked it again and Shopify doesn't support this. Refer: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/packing-slips-vari...
You can try contacting Shopify directly for this. Refer https://help.shopify.com/en/questions#/contact
Hope it helps!
What you could do is @import the Google Font Barcode font. And add font class to the css. Also, there is builtin barcode metafield. By default, it mirrors the sku.
https://fonts.google.com/specimen/Libre+Barcode+128+Text?query=barcode
Hi @Lin_RelationsJP,
You can try the following code:
line_item.variant.metafields.custom.barcode
Then check the product variant has successfully added metafields, if everything is correct, it will display fine.
Hope it helps!
Hi LiExtension,
Thanks for your reply,
but I already tried the same code at line 133,
and it didn't work out.
Do you have another solution?
Hi,
thanks for your reply,
but I'm not only adding the barcode but also other info I registered at metafields.
Do you have other suggestions?
Try this:
{{ line_item.variant.metafields.custom.barcode }}
instead of
{{line_item.variant.metafields.custom.barcode}}
The difference between NE code and SKU and Barcode is the space between text and curly brackets.
Dear AlohaAkahai,
I added the space to lines 125, 126, 132, and 133,
but everything stayed the same.
assuming it only read the product's data and doesn't read the metafields data.
Do you have other suggestions?
This is an accepted solution.
Hi @Lin_RelationsJP,
Sorry for the confusion, I checked it again and Shopify doesn't support this. Refer: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/packing-slips-vari...
You can try contacting Shopify directly for this. Refer https://help.shopify.com/en/questions#/contact
Hope it helps!
What @LitExtension actually said that Shopify doesn't generate barcodes out of the box.
Here is some more info for you, https://community.shopify.com/c/technical-q-a/adding-custom-meta-fields-to-packing-slip/td-p/1332362
Check this out. https://community.shopify.com/c/technical-q-a/adding-custom-meta-fields-to-packing-slip/td-p/1332362
Scroll down and read @basilkhan comment.
You can also try our order related documents app, you can build a packing slip with drag & drop designer, it has a barcode line item field too, we are working on adding a metafield component for the line items
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024