Catalog data available to themes#
themectx/contract.go, domains.go, and the exported metafield_types map are canonical. Catalog reads use the same channel, currency, inventory and tax rules on every card surface. These fields are available on grids, rails, merchant picks, product/variant metafield references and search cards.
Path |
Value and meaning |
|---|---|
|
Effective URL slug and featured media; |
|
|
|
|
|
Addressed, translated entity URLs; null without the entity. |
|
Publication time (RFC 3339 in the store's timezone with its offset) or null; sold units including the merchant's baseline. |
|
Variant supplying a variable product's starting price; null for a simple product. |
|
Variant at each end of the range. Tax projection uses that variant's market tax class. |
|
Scheduled sale window (RFC 3339 in the store's timezone with its offset), or null for an open end. The dates can exist before a sale becomes active. Use |
|
|
|
Active memberships as |
|
Merchant identifier facts; |
|
Effective variant value, inheriting the product value when unset. SKU remains variant-specific. |
|
Nullable physical facts. Variants inherit unset values; origin is an ISO country code. |
|
Addressed entity URL and nullable translated SEO text. |
|
Navigation references |
|
Above 20,000 matching products, |
|
Numbered page links stop at 50. Follow |
|
Counts over a large scope are bounded lower estimates. |
|
Render this label beside the value, instead of treating |
|
Translated file media or null, loaded once across content search groups. |
Cart |
Translated metafield-definition name. Select display values use translated choice labels. Property keys and saved values stay canonical. |
Foreign-currency prices apply the request's current rate and rounding to native endpoints, including automatic exchange rates. Explicit currency rows still override conversion per variant. Equal displayed endpoints prefer an explicit currency price, then the native endpoint and the lowest variant ID; PDP and cards use the same rule.
Quantity tiers are always attached after tax projection, including rails, picks, references and wishlists. The product, variant and card purchase_state enum is in_stock or unavailable; preview uses the same enum.
Text tries the requested locale, its language, then the store's source/default text. An empty translation continues down that chain. Slugs use their exact locale, then the source slug: borrowing another locale's slug would create URL collisions. Media alt_text uses product_media.alt_text for galleries and variant images, and file.alt_text for file metafields and collection/category images. Do not substitute a product title for a translated alt value.
Facet headings and select labels are translated independently. Non-select metafields use the corresponding product/variant metafield value translation; when a source value is shared, the first available translated owner value in product order supplies its label. Tokens in filter URLs always remain source values.
Filter display types#
ctx.filters.items arrive in the merchant's order from Store Admin › Filters, and only enabled filters that can narrow the current results arrive (an applied filter always does; see the ctx.filters reference). Each item's display_type is the merchant's choice of presentation; branch on it for every item instead of choosing by filter key or label. allow_multiple false means single-select: style values as radio choices. Each values[].url already toggles that value, and values with selectable false cannot be chosen with the current selection.
filter_type |
display_type values |
Render |
|---|---|---|
enum, multi_enum |
checkbox, pills, image_swatch |
Check list; chip buttons; thumbnails from values[].image_url with the label. |
color |
swatch, checkbox |
Circles from values[].color (or image_url); check list. |
boolean |
toggle, checkbox |
One on/off switch; one check box. |
range |
range |
Min and max inputs or a slider bound to range.min and range.max, posting range.min_input and range.max_input with range.inputs to range.action. The price filter arrives the same way in filters.price. |
Long value lists are paged: when values_page.has_next or has_previous is true, link next_url and previous_url. A value search posts values_page.search_input with values_page.inputs to values_page.action. clear_url on an item clears that filter; filters.clear_url clears all of them.
Metafield value types#
Read metafields[namespace][key] directly, without a {type, value} wrapper. Schema.metafield_types declares every supported definition type:
Definition type |
Theme value |
|---|---|
|
Text; a select is its translated display label. |
|
Native integer, decimal or boolean. Decimals retain numeric operations and their stored precision when printed. |
|
Native date value accepted by the date filter; JSON is ISO text, with the store offset for datetime. |
|
Parsed JSON. |
|
|
|
A visibility-checked product card, or null. |
|
|
|
Text with its line breaks ( |
|
Sanitized HTML (headings, bold, italic, links, lists), printed as markup. |
|
|
|
The page as a page setting resolves it ( |
|
The post as a blog post setting resolves it (post fields without content and comments), or null when it is not shown. |
|
|
|
Array of the corresponding value type; unavailable references are omitted. |
Reference hydration is lazy and batched across the grid. It admits at most 256 unique product/variant references per request and follows one reference level. Product galleries read at most 250 media rows and PDP rosters at most 2,000 variants. Card pricing reads only the precomputed price endpoints.
Proposal: product specifications#
P2-4 remains a proposal. A future specification-value table could hold non-variant attributes such as Material and expose product.specifications[]. This change adds no table or theme field for it.