Skip to main content

Scope

page_seo is always present, so ${ page_seo.title ?? theme.settings.title } resolves without an undefined. Components and layouts receive everything above except the page’s {sections}. In a block template, block.settings holds the block’s values and section resolves outward to the enclosing section.

storefront

The complete object. It contains no products, cart or user. Two fields duplicate information held elsewhere in the object:
  • presentment_rates_json carries the rate table pre-serialised, since Slurp has no json filter. Embed it with | js and parse it with JSON.parse.
  • oauth_google and oauth_github are flat booleans, since {if} cannot test array membership. oauth_providers remains the canonical list.

Fetching products

Products are not in the render context.
{fetch} runs during the render pass, so the HTML arrives complete. Use it for content that must be in the initial markup or indexed by a crawler.
Not available in a block template. See Sections and blocks.

Money

Prices arrive as strings, since they are decimals on the server. .toFixed() on one throws.
$ccy(value) converts from the store currency into the buyer’s display currency. $ccy(value, currency) renders as-is. Use the two-argument form for store credit, gift cards and affiliate payouts, which are already denominated. The one-argument form converts an already-converted value, and the result is silently wrong.
These helpers are defined by the theme, not the platform. See JavaScript.