Webstore Variables
Webstore variables serve as powerful tools that enable you to tailor your template, ensuring content is precisely placed within your design. Utilizing Twig as our templating engine enhances this capability by offering a flexible syntax for defining where and how content appears. For a comprehensive understanding of how to leverage Twig within your templates, including its syntax and functions, the official Twig documentation provides an invaluable resource. https://twig.symfony.com/
Global Variables
Variables that are available in all template files.
Global Variables
- Name
store
- Type
- Store
- Tags
- Description
The details of the currently active store.
- Name
webstore
- Type
- Webstore
- Tags
- Description
The details of your currently active hosted webstore.
- Name
cart
- Type
- Cart
- Tags
- NULLABLE
- Description
The cart of the currently logged in customer. NULL if not logged in.
- Name
navlinks
- Type
- Navlink[]
- Tags
- Description
All enabled navlinks of this store.
- Name
tags
- Type
- Tag[]
- Tags
- Description
All enabled tags of this store.
- Name
customer
- Type
- Customer
- Tags
- NULLABLE
- Description
The currently logged in customer. NULL if not logged in.
- Name
request
- Type
- Request
- Tags
- Description
Details about the HTTP request to the hosted webstore.
- Name
notification
- Type
- Notification
- Tags
- NULLABLE
- Description
Any currently active notification that should be displayed to the customer.
- Name
currency
- Type
- string
- Tags
- NULLABLE
- Description
The preferred currency of the customer. If NULL, then use
store.currency
.
- Name
available_currencies
- Type
- string[]
- Tags
- Description
Array of available currencies to use for FX previews.
To set a preferred currency, redirect the customer to any route with a query parameter called
currency
. (i.e.https://rustinity.paynow.store?currency=EUR
)
- Name
modules
- Type
- html
- Tags
- Description
Pre-rendered HTML of any active modules to insert into your webstore.
Use
{{ modules }}
to inject the rendered modules into any part of your webstore.
- Name
favicon
- Type
- string
- Tags
- Description
The URL to an image to use as a favicon. Usually the store square logo.
index.html
The main page of your webstore.
Available Variables
- Name
products
- Type
- Product[]
- Tags
- Description
An array of all available products of this store.
category.html
The category view of your webstore. You get redirected here after either selecting a navlink, or filtering with a tag.
You can filter products here by using the ?tag
query parameter, and passing in comma separated tag slugs.
Available Variables
- Name
products
- Type
- Product[]
- Tags
- Description
An array of all products matching the query parameters.
- Name
activeTag
- Type
- Tag
- Tags
- Description
The currently active tag.
- Name
activeTags
- Type
- Tag[]
- Tags
- Description
An array of the currently active tags.
- Name
activeNavlink
- Type
- Navlink
- Tags
- Description
The currently active navlink. This is the deepest navlink available (the navlink with the most parents).
product.html
A product detail view page.
Available Variables
- Name
product
- Type
- Product
- Tags
- Description
The currently selected product.
- Name
available_gameservers
- Type
- Available Game Servers[]
- Tags
- NULLABLE
- Description
An array of available gameservers if the product requires a gameserver selection.
cart.html
A page displaying the customer's cart. This page has no special variables.
complete.html
A page informing the customer of a successful purchase.
Available Variables
- Name
complete
- Type
- CheckoutComplete
- Tags
- Description
Information about the completed payment.
subscriptions.html
A page displaying all active and canceled subscriptions of a customer.
Available Variables
- Name
subscriptions
- Type
- Subscription[]
- Tags
- Description
An array of subscriptions.
Available Game Server object
Fields
- Name
id
- Type
- flake
- Tags
- Description
The unique identifier of the game server. This ID is typically used to reference the server in database queries or API calls.
- Name
name
- Type
- string
- Tags
- Description
The name of the game server. This name is used to represent the server to users, allowing them to select it from a list or identify it in the context of the application.
Webstore object
Fields
- Name
id
- Type
- string
- Tags
- Description
The unique identifier of the webstore.
- Name
slug
- Type
- string
- Tags
- Description
A URL-friendly slug associated with the webstore.
- Name
is_active
- Type
- boolean
- Tags
- Description
Indicates whether the webstore is currently active (true) or not (false).
- Name
custom_domain
- Type
- string
- Tags
- NULLABLE
- Description
The custom domain set for the webstore, if any. This field can be null if no custom domain is set.
- Name
custom_domain_verified
- Type
- boolean
- Tags
- Description
Indicates whether the custom domain has been verified (true) or not (false).
- Name
current_template_id
- Type
- string
- Tags
- Description
The unique identifier of the current template being used by the webstore.
- Name
custom_templates
- Type
- string
- Tags
- NULLABLE
- Description
Information about custom templates, if any, associated with the webstore. This field can be null if there are no custom templates.
Checkout Complete object
Fields
- Name
text
- Type
- string
- Tags
- Description
A text message or status indicating the completion of an action or process within the context it is used.
Notification object
Fields
- Name
message
- Type
- string
- Tags
- Description
The message of the notification.
- Name
type
- Type
- string
- Tags
- Description
The type of the notification. Usually
error
.
Request details object
Fields
- Name
url
- Type
- string
- Tags
- Description
The current full URL.
- Name
path
- Type
- string
- Tags
- Description
The path of the URL.
- Name
query
- Type
- map<string, string>
- Tags
- Description
Key-value pair of the query parameters.
- Name
country
- Type
- string
- Tags
- Description
The country code of the IP address.
- Name
countryName
- Type
- string
- Tags
- Description
The human-readable country name of the IP address.
- Name
region
- Type
- string
- Tags
- Description
The region where the IP originates from.
- Name
city
- Type
- string
- Tags
- Description
The city where the IP originates from.
- Name
isEUCountry
- Type
- boolean
- Tags
- Description
Is the request coming from a EU country?