Fulfillment
From Shopify Wiki
A fulfillment object represents a particular shipment of items from an order. Each time you ship items in an order by clicking the "Ship items" button, this creates a fulfillment object which is accessible through Liquid in the "Shipping confirmation" and "Shipping update" email templates.
Contents |
Fulfillment properties
fulfillment.line_items
Returns an array of whichever line items from the order are being shipped with this fulfillment. Note that this is distinct from each of the various line_items properties of the order itself (including fulfilled_line_items). The order's fulfilled_line_items returns all items which have so far been fulfilled in the order, so it will be a bigger set of items than fulfillment.line_items whenever the order currently has more than just the single fulfillment represented in the template.
fulfillment.tracking_number
Returns the tracking number entered for the fulfillment. If a nothing was entered for the tracking number, this attribute will always return nil. This means that you can use Liquid in your templates to test for the existence of the tracking number directly like so:
{% if fulfillment.tracking_number %}
Here's the tracking number! {{ fulfillment.tracking_number }}
{% endif %}
fulfillment.tracking_company
This attribute returns Shopify's best guess about which shipping company generated the tracking number provided. This will return the same name that is shown in the order screen after entering the tracking number. It will return nil if Shopify is unsure about the source of the tracking number.
fulfillment.tracking_url
The tracking URL links to a shipping carrier's page for displaying tracking information for the shipment. The URL returned is the same location to which Shopify links the tracking number on the order screen in your admin interface. If Shopify is unsure about the source of the tracking number, the URL provided is a link to search the tracking number in Google.
