Liquid reference
Themes are Liquid templates rendered in ShopFast's sandboxed engine. This page is generated from the engine itself: 107 filters, 26 tags and 9 object types. If it is here, it works in a theme.
How rendering works
- Output is HTML-escaped by default. Rich text (
description_html) is sanitized before it reaches a theme. - Strict filters: an unknown filter is an error when you publish. Snippets render with
{% render %}and see only what you pass them. - Every section renders on a time, memory and template budget; a broken section becomes a placeholder, never a broken page.
- Money is integer minor units:
{{ product.price | money }}prints$24.99for2499.
Global objects
title
ShopFast filters
artShopFastA decorative SVG from the theme art set.
{{ 'grid' | art }}asset_urlShopFastURL of a theme image from config/assets.json.
{{ 'hero.png' | asset_url }}coverShopFastThe generated SVG cover for a product (folded planes from its id and type).
{{ product | cover: 'wide' }}editableShopFastMarks text the visual editor can edit in place.
{{ section.settings.heading | editable: 'heading' }}faq_jsonldShopFastFAQPage JSON-LD from question blocks.
{{ section.blocks | faq_jsonld }}handleShopFastAlias of handleize.
{{ title | handle }}handleizeShopFastLowercase, dash-separated handle: golden-hour.
{{ "Golden Hour" | handleize }}hmac_sha256ShopFastHex HMAC-SHA256.
{{ text | hmac_sha256: 'key' }}image_tagShopFastA full <img> with width, height and alt.
{{ section.settings.image | image_tag: loading: 'lazy' }}image_urlShopFastURL of an image setting or theme image, resized.
{{ section.settings.image | image_url: width: 800 }}iso_dateShopFastAn ISO 8601 date string for <time datetime>.
{{ article.created_at | iso_date }}jsonShopFastJSON for data attributes, escaped for HTML.
{{ product | json }}jsonldShopFastA safe <script type="application/ld+json"> block.
{{ data | jsonld }}moneyShopFastMinor units to the store currency: 2499 → $24.99.
{{ product.price | money }}money_with_currencyShopFastLike money, followed by the ISO code: $24.99 USD.
{{ product.price | money_with_currency }}money_without_currencyShopFastThe amount without a symbol: 24.99.
{{ product.price | money_without_currency }}pluralizeShopFastPicks the singular when the number is 1.
{{ n | pluralize: 'item', 'items' }}sha256ShopFastHex SHA-256 of a string.
{{ text | sha256 }}starsShopFastAccessible star rating markup.
{{ product.rating.value | stars }}tShopFastA string from the theme locale file, with variables: {{ 'cart.items' | t: count: 3 }}.
{{ 'cart.title' | t }}type_labelShopFastHuman label for a product type: license_key → License key.
{{ product.type | type_label }}videoShopFastParses a YouTube or Vimeo URL into an embeddable player.
{{ section.settings.video_url | video }}
Standard filters
LiquidJS filters, all available: abs, append, array_to_sentence_string, at_least, at_most, base64_decode, base64_encode, capitalize, ceil, cgi_escape, compact, concat, date, date_to_long_string, date_to_rfc822, date_to_string, date_to_xmlschema, default, divided_by, downcase, escape, escape_once, find, find_exp, find_index, find_index_exp, first, floor, group_by, group_by_exp, has, has_exp, inspect, join, jsonify, last, lstrip, map, minus, modulo, newline_to_br, normalize_whitespace, number_of_words, plus, pop, prepend, push, raw, reject, reject_exp, remove, remove_first, remove_last, replace, replace_first, replace_last, reverse, round, rstrip, sample, shift, size, slice, slugify, sort, sort_natural, split, squish, strip, strip_html, strip_newlines, sum, times, to_integer, truncate, truncatewords, uniq, unshift, upcase, uri_escape, url_decode, url_encode, where, where_exp, xml_escape.
Tags
{% assign %}StandardStandard Liquid tag.
{% block %}DisabledNot available: use {% content_for %} and theme blocks.
{% break %}StandardStandard Liquid tag.
{% capture %}StandardStandard Liquid tag.
{% case %}StandardStandard Liquid tag.
{% comment %}StandardStandard Liquid tag.
{% content_for %}ShopFastRenders blocks: {% content_for 'blocks' %} or a single theme block.
{% continue %}StandardStandard Liquid tag.
{% cycle %}StandardStandard Liquid tag.
{% decrement %}StandardStandard Liquid tag.
{% echo %}ShopFastOutputs an expression inside {% liquid %}.
{% for %}StandardStandard Liquid tag.
{% if %}StandardStandard Liquid tag.
{% include %}DisabledNot available: use {% render %}, which keeps snippet variables isolated.
{% increment %}StandardStandard Liquid tag.
{% javascript %}DisabledNot available: themes ship no JavaScript; interactive blocks use the ShopFast storefront runtime.
{% layout %}DisabledNot available: templates choose their layout in their JSON file.
{% liquid %}ShopFastSeveral tags in one block, one per line.
{% raw %}StandardStandard Liquid tag.
{% render %}ShopFastRenders a snippet with its own variables: {% render 'product-card', product: product %}.
{% schema %}ShopFastThe section's settings, blocks and presets as JSON. Read by the editor, never rendered.
{% sections %}ShopFastRenders a section group (header-group, footer-group, overlay-group).
{% style %}ShopFastScoped <style> for a section, with settings available as CSS variables.
{% stylesheet %}ShopFastCSS for a section or the library, compiled into the theme stylesheet (never inline).
{% tablerow %}StandardStandard Liquid tag.
{% unless %}StandardStandard Liquid tag.
Objects
Review
| Field | Type | Notes |
|---|---|---|
id | string | |
rating | number | |
title | string | |
body | string | |
author | string | |
verified | boolean | |
created_at | string | |
reply | string | null | |
replied_at | string | null | |
source | string | null | |
source_label | string | null | |
image_url | string | null | A proof image kept with an imported review (https). |
Promotion
| Field | Type | Notes |
|---|---|---|
id | string | |
title | string | |
percent_off | number | Whole percent, e.g. 20. |
ends_at | string | |
stacking | string | "stack": discount codes still apply; "exclusive": they do not. |
PromotionBanner (extends Promotion)
| Field | Type | Notes |
|---|---|---|
text | string | The banner text with {percent} and {ends} filled in. |
tone | string | |
countdown | boolean | |
url | string |
Media
| Field | Type | Notes |
|---|---|---|
kind | 'image' | 'video' | 'youtube' | 'vimeo' | |
url | string | |
alt | string | |
poster_url | string | null | |
external_id | string | null | |
width | number | null | |
height | number | null |
Product
| Field | Type | Notes |
|---|---|---|
id | string | |
handle | string | |
title | string | |
type | string | |
type_label | string | |
description | string | |
description_html | html | |
excerpt | string | |
delivers | string | |
url | string | |
price | number | |
compare_at_price | number | null | |
on_sale | boolean | |
savings | number | null | |
savings_percent | number | null | |
available | boolean | |
sold_out | boolean | |
stock | number | null | |
low_stock | boolean | |
is_key | boolean | |
is_bundle | boolean | |
is_membership | boolean | |
is_free | boolean | |
cover_url | string | null | |
image_url | string | |
rating | { value: number; count: number; distribution: number[] } … | |
reviews | ReviewDrop[] | |
reviews_count | number | |
bundle_items | { handle: string; title: string; url: string }[] | |
units_sold_30d | number | |
template_suffix | string | null | |
created_at | string | |
updated_at | string | |
short_description | string | |
tags | string[] | |
featured | boolean | |
pricing_mode | string | |
pay_what_you_want | boolean | |
min_price | number | null | |
suggested_price | number | null | |
variants | VariantDrop[] | Price options in display order; empty = one price. |
selected_variant | VariantDrop | null | The option the product page starts on: the first one in stock, else the first (null without options). |
has_variants | boolean | |
has_durations | boolean | Templates: every option is a duration (1 Day / 7 Days / 30 Days / Lifetime): render the duration picker. |
price_min | number | Lowest variant price ("From $9"), or the price. |
price_varies | boolean | |
gallery | { url: string; alt: string; width: number | null; height:… | Images only, in order (the first is the cover). |
media | MediaDrop[] | Every media item in order: images and videos. Videos never become the cover. |
has_video | boolean | |
first_video | MediaDrop | null | The first video (uploaded, YouTube or Vimeo), or null. |
collection_handles | string[] | |
category_handles | string[] | Product categories it is filed in, the main one first: `categories[product.category_handles.first]`. |
upsell_handles | string[] | |
cross_sell_handles | string[] | |
preorder | boolean | |
subscription | { interval: string; interval_count: number; trial_days: n… | |
min_per_order | number | |
max_per_order | number | null | |
game | string | null | |
platforms | string[] | |
region | string | null | |
status_badge | { key: string; label: string; tone: string; note: string;… | |
sales_paused | { label: string; color: string; since: string; message: s… | usp-keys: sales paused by a linked status (Not working, Down…). |
license | { clock: 'purchase' | 'first_use'; hwid_enabled: boolean;… | |
instant_delivery | boolean | |
features | string[] | Every feature line in the seller's order, grouped or not (empty = none). Short spots show the first few. |
feature_groups | FeatureGroupDrop[] | |
feature_count | number | How many feature lines there are in all. |
requirements | string[] | "System requirements": one line each (empty = none). |
listed | boolean | false for unlisted products (reachable by URL only). |
featured_image | { url: string; alt: string; width: number | null; height:… | First gallery image, or the generated cover. |
add_ons | { handle: string; title: string; headline: string; body: … | Order bumps offered with this product in the cart. |
seo_title | string | |
seo_description | string | |
og_image_url | string | Social image: the custom one, the first gallery image, or the generated cover PNG. |
checkout_fields | { id: string; label: string; type: string; required: bool… | Questions the buyer answers at checkout. |
promotion | PromotionDrop | null |
FeatureGroup
| Field | Type | Notes |
|---|---|---|
title | string | |
items | string[] | |
count | number |
Variant
| Field | Type | Notes |
|---|---|---|
id | string | |
title | string | |
description | string | |
price | number | |
compare_at_price | number | null | |
available | boolean | |
stock | number | null | |
low_stock | boolean | |
duration_key | string | null | Templates: the duration this option stands for ("7 Days" → 7d), or null for options that are not durations. |
duration_days | number | null | Days of play, null for Lifetime or non-duration options. |
is_lifetime | boolean | |
per_day_price | number | null | Price per day in minor units (rounded), null for 1 Day, Lifetime and non-duration options. |
Collection
| Field | Type | Notes |
|---|---|---|
id | string | null | |
handle | string | |
title | string | |
description | string | |
url | string | |
products | ProductDrop[] | |
products_count | number | |
sort_by | string | |
sort_options | { value: string; label: string }[] | |
image_url | string | null | |
seo_title | string | |
seo_description | string |
Page
| Field | Type | Notes |
|---|---|---|
id | string | |
handle | string | |
title | string | |
content | html | |
url | string | |
template_suffix | string | null |