Order attributes
attributes holds the order’s custom fields, each a name and a value.
Print all of them:
Line item properties
Each line item’sproperties hold the custom fields for that item. Print them inside the line items loop:
property.first is the field’s name and property.last its value.
Properties whose name starts with an underscore (such as _bundle_id) are meant to stay hidden. To leave them out:
In the visual editor
- Items table: tick Line item properties (engraving, gift note…) under Rows to print each item’s properties under its title. Properties whose name starts with an underscore, and empty ones, are left out.
- Order attributes: use a Custom Liquid block with the loop above.
Good to know
- Always add
| escapeto what customers typed, so their text prints as text. - Order attribute names are case sensitive:
attributes['gift message']andattributes['Gift message']are different. - Data stored in metafields rather than attributes is printed differently. See Metafields in templates.
- Choices made with Bold Product Options or Infinite Options are line item properties too; their priced add-ons can print under the item. See Product options apps.