Skip to main content
The items on an order are in line_items. To print them, loop over the list: everything between {% for line_item in line_items %} and {% endfor %} repeats once per item, and line_item is the current one. Line item fields only work inside the loop.

A basic items table

Line item fields

Common patterns

Print the variant title under the product, only when there is one:
Leave out fully refunded items on a packing slip:
Show a barcode of each SKU:

One document per shipment

When a template prints one document per shipment (Split shipments on the template’s settings page), document_fulfillment is the shipment being printed. To list only what’s in it:

Good to know

  • Prices are in cents: always print them with a money filter. See Money and currency in templates.
  • Item images print at the size you ask for with img_url, such as 'thumb', 'small', 'medium' or '120x120'.
  • Product and variant metafields are under line_item.product.metafields and line_item.variant.metafields. See Metafields in templates.
  • The loop variable name is yours to choose, but line_item matches the reference and the starters.
  • Orders from Bold Product Options and Infinite Options add line_item.options, line_item.option_addon, line_item.option_addons and prices with add-ons, so you can print priced add-ons under their item. See Product options apps.
  • Items sold in a bundle (Shopify Bundles, Simple Bundles, Fast Bundle) have line_item.bundle_component, line_item.bundle_title and line_item.bundle_quantity, and line_items | bundled turns each bundle into one line with its items in components. See Bundles on your documents.