Depressing: Cannot make {{ line_item.fulfillment.tracking_number}} work with Packing Slip Template

LaurentH
Tourist
12 0 1

Sorry to post something about {{ line_item.fulfillment.tracking_number}} but I cannot make it work at all.

 

Objective: I want to include the Tracking Number of my orders into the standard Shopify Packing Slip Template that is define in Settings

 

I have used the 3 methods below, but none of them return any value.

 

Method 1:

 Tracking number: {{ fulfillment.tracking_number }}

Result: Only "Tracking number" is displayed

 

Method 2: (Please note that I have 1 tracking number for all the item in an order,) 

     {% for line_item in line_items %}
         Tracking number : {{line_item.fulfillment.tracking_number}}
     {% endfor %}

Result: Nothing is displayed.The loop is not even executed once as "Tracking number" is not displayed

 

Method 3:

     {% for fulfillment in fulfillments %}
         Tracking number: {{ fulfillment.tracking_number }}
     {% endfor %}

Result: Nothing is displayed. The loop is not even executed once as "Tracking number" is not displayed

 

I am sure there is a tracking number for the order that I test (See print screen below). In addition I use an app to Extract my orders into Excel, and the pp return the tracking number "2015" as expected.

 

Help please. I am banging my head against the wall.

I have check in many other post and look at Shopify documentation (https://shopify.dev/docs/themes/liquid/reference/objects/fulfillment) but can not solve the issue.

 

Many thanks,

L.

 

Capture.JPG 

 

 

 

Replies 3 (3)
teonsight
New Member
3 0 0

Hi  LaurentH,

did you solved it? I think that object is not availabile (anymore?) in Order Printer templates.

Thanks.

Gagharv
Shopify Partner
6 0 0

Has anyone solved this problem yet?
It's 2023 and it looks like still doesn't support Tracking Number in Packing Slip.

Gagharv
Shopify Partner
6 0 0

Actually Tracking Number can be used in Order Printer App template.

But in Order Printer, I don't know how to get the quantity of each fulfillment.