How can I add a tracking number to my packing slip template?

How can I add a tracking number to my packing slip template?

khalilkur146
Visitor
2 0 0

Hey guys!
Maybe someone of you can help me with the below questions about the customization of the packing slip template.

I wanted to add the tracking number of that particular order on the packing slip.

I am trying to add below code to add the tracking number on the packing slip but it is not working

 

Tracking Number: {{ customer.order.line_item.fulfillment.tracking_number }}
Replies 3 (3)

Gagharv
Shopify Partner
6 0 0

Hi Khalilkur146, Have you solved this problem yet?

I meet the same issue.

khalilkur146
Visitor
2 0 0

Not yet, I tried many solutions but didn't worked.  I think it has some kind of restriction for the access of classes in packing slip. I tried the customization for the total of slip and it worked, but this is not working.

DAW01
Shopify Partner
13 0 6

Use Shopify Flow to add the tracking number as an order metafield then display the order metafield on the packing slip. This is the only way.

 

Let me know if you can't get it to work.