Variables
Template Files
Page templates
| File Name | Description |
|---|---|
index.html | The main landing page of your webstore |
category.html | Displays categories, manages navigation, and product filters |
product.html | Displays detailed information for a specific product |
cart.html | Shows the customer's current shopping cart |
complete.html | Confirms a successful purchase |
subscriptions.html | Lists all active and canceled customer subscriptions |
account.html | The customer's order history |
auth_username.html | Username entry, for stores that sign customers in by name rather than through a platform login |
custom_page.html | Renders any custom page configured in the dashboard |
index.html, category.html, product.html and cart.html cannot be deleted.
Supporting files
| File Name | Description |
|---|---|
layout.html | By convention, the shared shell that page templates {% extends %} |
module.*.html | Markup for individual modules |
schema.json | Declares the template's own settings, which the dashboard renders as a form |
.css, .js | Static assets, referenced with asset() |
| Images | PNG, JPEG, GIF, SVG and WebP, also referenced with asset() |
Files can live in subdirectories. Summit uses this to keep partials/ and svgs/ apart from the page templates. Include them by full path:
{% include 'partials/head.html' %}
{% include 'svgs/cart.html' %}Global Variables
Common Across All Pages
| Variable Name | Description |
|---|---|
store | The currently active store |
webstore | Information about the active hosted webstore |
cart | The current customer's cart (NULL if not logged in) |
navlinks | All enabled navigation links |
tags | All enabled tags in the store |
customer | The logged-in customer (NULL if not logged in) |
request | Information about the current HTTP request |
notification | Active customer notification, if any |
currency | Preferred customer currency (defaults to store.currency if NULL) |
available_currencies | Available currencies for currency conversion previews |
modules | Pre-rendered HTML for all active modules |
favicon | URL of the favicon image for the webstore |
template | This template's own settings, keyed by the option id in schema.json |
cart and customer are NULL for signed-out visitors, which is most of your traffic. Guard every use of them — {% if customer %} — or the storefront breaks for anyone browsing anonymously.
Page-Specific Variables
index.html
| Variable Name | Description |
|---|---|
products | An array of all available products |
category.html
| Variable Name | Description |
|---|---|
products | Products matching the active tag/category |
activeTag | Currently active filtering tag |
activeTags | Array of active filtering tags |
activeNavlink | Detailed object for the active navigation link |
product.html
| Variable Name | Description |
|---|---|
product | Details of the selected product |
available_gameservers | Optional list of gameserver selections |
complete.html
| Variable Name | Description |
|---|---|
complete | Information about the completed order |
subscriptions.html
| Variable Name | Description |
|---|---|
subscriptions | List of the customer’s subscriptions |
account.html
| Variable Name | Description |
|---|---|
orders | The customer's orders, newest first |
account_view | Which section the page is showing, for example "orders" |
custom_page.html
| Variable Name | Description |
|---|---|
title | The page's title |
content | The page's body as HTML — output it with |raw |
custom_pages | Every configured custom page, for building navigation |
Template Helpers
Beyond the standard Twig functions and filters, hosted webstores add:
| Helper | Returns |
|---|---|
asset('file') | The served URL of a static file in this template. Use it for every CSS, JS and image reference — never hardcode a path |
config('id') | One template setting by its schema.json option id. Equivalent to template.id |
|time_diff | A relative time string, such as 3 days ago |
<link href="{{ asset('app.css') }}" rel="stylesheet">
<script src="{{ asset('app.js') }}"></script>
<style>
:root { --primary-color: {{ template['main-color'] }}; }
</style>
{% if config('server_ip') %}<code>{{ config('server_ip') }}</code>{% endif %}Option ids containing a hyphen have to use bracket syntax — template['main-color'], not template.main-color, which Twig parses as a subtraction.
Prices
Every price is an integer in the currency's smallest unit, so 499 means $4.99. There is no preformatted price string on a product. Divide by 100 and format it yourself.
Read the price from pricing, not from price, so that sales are reflected:
{% if product.pricing.active_sale and product.pricing.price_original > product.pricing.price_final %}
<s>{{ (product.pricing.price_original / 100)|number_format(2) }}</s>
{{ (product.pricing.price_final / 100)|number_format(2) }}
{% else %}
{{ (product.price / 100)|number_format(2) }}
{% endif %}product.price already reflects the visitor's regional pricing and any tax shown inclusive of price, so it will not always equal the amount you set in the dashboard.
Subscription objects are the exception: they carry preformatted *_amount_str fields alongside the integers, and presentment_total_amount_str is the one to show a customer.
Object Definitions
The store data in templates is the Storefront API's own models, unchanged. Rather than repeat them here, look the object up in the Storefront API models — that reference is generated from the API spec, so it is always current.
| Template variable | Model |
|---|---|
product, products | StorefrontProductDto |
cart | CartDto, lines as CartLineDto |
customer | StorefrontCustomerDto |
store | StoreDto |
tags, activeTag, activeTags | StorefrontTagDto |
navlinks, activeNavlink | StorefrontNavLinkDto |
subscriptions | StorefrontSubscriptionDto |
The objects below have no Storefront API equivalent — they exist only inside templates.
Available Game Server Object
| Field | Description |
|---|---|
id | Unique server identifier |
name | Display name of server |
Webstore Object
| Field | Description |
|---|---|
id | Unique webstore ID |
slug | Friendly URL slug |
is_active | Webstore active status |
custom_domain | Custom domain, if set |
custom_domain_verified | Domain verification status |
current_template_id | Active template ID |
custom_templates | Any associated custom templates |
Checkout Complete Object
| Field | Description |
|---|---|
text | Completion message or status text |
Notification Object
| Field | Description |
|---|---|
message | Notification message content |
type | Type of notification (e.g., error, etc.) |
Request Details Object
| Field | Description |
|---|---|
url | Full current URL |
path | URL path component |
query | Query parameters from the URL |
country | IP-based country code |
countryName | Human-readable country name |
region | Geographical region of the user |
city | City of origin |
isEUCountry | Boolean indicating if the request is from the EU |
For further details on template syntax and filters, refer to the official Twig documentation.