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. |
|
UTC publication timestamp 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 in UTC, 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. Free-text attribute labels use attribute_text_value.label, whose resource id is attribute_id:value_text. 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.
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. |
|
|
|
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.