Before you start: check which metafields Foliant loads
Foliant loads metafields together with the order, and it can’t load all of them. It works like this:- Your store needs at least one metafield definition (in the Shopify admin, Settings › Custom data). Without any definition, no metafields are loaded.
- For each kind (orders, draft orders, customers, products and variants), Foliant loads the definitions you pinned, up to 10 per kind, in their pinned order.
- If a kind has no pinned definitions, Foliant loads the first 10 metafields it finds for it.
Print a metafield
Replacenamespace and key with your metafield’s namespace and key (for example custom.gift_message):
Product and variant metafields are per item, so use them inside the line items loop:
How metafield types print
Good to know
- An empty or missing metafield prints nothing. Use
!= blankto leave out its label. - In visual templates, print metafields with a Custom Liquid block.
- Pick lists can show product or variant metafields as columns, in the template’s Pick list settings.