Global Models
Prodyflow provides global variables that are always available in your Twig templates. These variables give access to webshop data, request information, and localization settings generated by the backend.
Global models allow you to build dynamic templates without writing backend code — all core page and webshop values are accessible directly in Twig.
| Variable | Description |
|---|
| canonical_url | Canonical page URL for SEO |
| page_title | Title of the current page |
| page_description | Meta page description of the current page |
| request | request data |
| locale | Active locale details |
| supported_locales | All supported languages for the webshop |
| is_single_language | true when the sale channel has one language: its URLs have no language segment (/{slug}/...) |
| webshop | Webshop details |
| sale_channels | List of all webshop sale channel |
Locale
Prodyflow provides localization information for your webshop, including the currently active language and a list of all supported locales.
| Variable | Description | Comment |
|---|
code | Returns the currently active language code, e.g., en, hu. | Only for the current locale, for supported_locales this is the array key |
name | Returns the full name of the current locale, e.g., English. | |
native | Returns the native name of the current locale, e.g., Magyar. | |
script | Returns the script of the locale, e.g., Latn. | |
regional | Returns the regional variant of the locale, e.g., en_GB. | |
request
| Variable | Description | Comment |
|---|
iso_code | The current locale code, e.g., en, hu. | Used for language-specific rendering. |
origin | The origin URL of the request. | Typically includes protocol + host, e.g., https://example.com. |
host | The host of the request, e.g., example.com. | Useful for multi-domain setups. |
path | The path of the request URI. | Example: /products/123. |
full_url | Full URL of the current request including query parameters. | Example: https://example.com/products/123?ref=homepage. |
query | Associative array of GET query parameters. | Example: ['ref' => 'homepage']. |
method | HTTP method of the request. | Example: GET, POST. |
scheme | Protocol of the request. | Example: http or https. |
is_secure | Whether the request came over HTTPS. | Boolean. |
country_code | Code of the country based of the visitor's IP address | Example: hu or de. |
route_name | Name of the current page | Example: product. |
webshop
| Variable | Description | Comment |
|---|
name | The display name of the webshop. | Example: My webashop. |
sale_channel | The sales channel object | |
sale_channels | The list of all sale channels of the webshop | See below |
channel_switcher | The rows and the label of the channel switcher | See below |
Webshop Sale Channel Properties
| Variable | Description | Comment |
|---|
name | Name of the sale channel | |
domain | Domain of the sale channel | |
slug | Slug used for URLs | Nullable |
favicon | Favicon URL | Nullable |
logo | Logo URL | Nullable |
currency | Default currency code (e.g., USD, EUR) | |
default_language | Default language code (e.g., en, hu) | |
is_change | Indicates if the webshop supports product/exchange changes | Boolean |
is_return | Indicates if the webshop supports returns | Boolean |
is_international_cod | Indicates if international cash-on-delivery (COD) is supported | Boolean |
return_allowed_days | Number of days allowed for returning products | Integer |
phone | Contact phone number | Nullable |
email | Contact email address | Nullable |
id | ID of the sale channel | |
dispute_allowed_days | Number of days a customer can report a problem with a delivered order | Nullable integer |
show_tickets | The help page lists the customer's tickets | Boolean |
show_chat | The webshop chat is on: render the chat panel only when it is (see chat.js in Config) | Boolean |
country | The sale channel's own country (the shipping default, not the visitor's): id, code, name, local_name | Nullable |
free_delivery_over | Free delivery from this order amount (the lowest amount of a free delivery price), null when there is none | Nullable number |
channel_switcher | What the channel switcher offers: sale_channels or countries | String |
Sale Channels
webshop.sale_channels is the short list of all sale channels:
| Variable | Description | Comment |
|---|
id | ID of the sale channel | |
name | Name of the sale channel | |
slug | Slug used for URLs | Nullable |
currency | Currency code of the sale channel | |
is_default | The default sale channel | Boolean |
Channel Switcher
webshop.channel_switcher has everything a switcher needs. What it offers is the sale channel's channel_switcher
setting: the sale channels, or the countries they deliver to (the country decides the channel).
| Variable | Description |
|---|
mode | sale_channels or countries |
label | The text of the switcher's button: the current sale channel's name, or the chosen country (the ship_country cookie), or the only country of the channel |
items | The rows. Every row has url, the same page on the target channel, name, currency and current (the row of this channel). In countries mode a row is a country with its own label and the link to the channel that delivers there. |
JavaScript globals
The engine puts a few values on window for the template's scripts:
| Global | Description |
|---|
window.SHOP_BASE | The sale channel's link prefix: /{language}/{slug}, or /{slug} on a channel with one language. Use it for links built in JS (window.SHOP_BASE + '/profile'). |
window.lan | The language code of the page |
window.MONEY_FORMAT | The money format rules of the template (only when the template sets them) |