Online store
Liquid & theme code
Open Online Store → Themes → Edit code. A theme has three kinds of files:
| Path | Purpose |
|---|---|
sections/*.liquid | A section merchants can add in the theme editor. Settings come from its {% schema %} block. |
snippets/*.liquid | Reusable partials: {% render 'name', var: value %}. |
assets/custom.css | Loaded on every storefront page after theme styles. |
assets/custom.js | Runs once per page load (good place for custom pixels). |
Section schema
Liquid
<section class="sf-page">
<h2>{{ section.settings.heading }}</h2>
{%- for block in section.blocks -%}
<p>{{ block.settings.text }}</p>
{%- endfor -%}
</section>
{% schema %}
{
"name": "Testimonials",
"settings": [{ "type": "text", "id": "heading", "label": "Heading", "default": "What customers say" }],
"blocks": [{ "type": "quote", "name": "Quote", "settings": [{ "type": "textarea", "id": "text", "label": "Quote" }] }],
"max_blocks": 6
}
{% endschema %}Setting types: text, textarea, richtext, url, image, color, checkbox, range (min/max/step), select (options), collection, product, menu, page, header.
Objects
| Object | Fields |
|---|---|
shop | name, currency, url, email |
section | id, settings, blocks[] (id, type, settings) |
settings | Theme settings (colors, fonts, social links…) |
product | On product pages: title, handle, url, price, compare_at_price, vendor, type, tags, description, featured_image, images, variants[] |
collection | On collection pages: title, handle, url, description, image, products_count, products[] |
collections['handle'] | Any collection by handle (or 'all'), with products[] (first 50) |
all_products['handle'] | Any active product by handle |
cart | item_count |
Filters
All standard Liquid filters plus money (formats minor units, e.g. {{ product.price | money }} → ₹799), money_without_currency, handleize, json.
Rules
- Liquid is sandboxed: no JavaScript execution, no access to object prototypes, render-time and memory limits. Errors show in the theme editor preview and render nothing on the live store.
- Files are validated on save (Liquid syntax and schema JSON). Max 256 KB per file. Every save is versioned; restore from Versions.
- Names: lowercase letters, numbers,
-and_.