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.
