+813-444-3589+44 118 328 3220+49-231-976765-0 | Contact us

Global Variables

Following a brief list of default variables (for every page), their corresponding type and a short description. For the detailed contents of each object type, please have a look at their specific object type description.

Variables defined on all pages

Variable nameObjectDescriptionNote
blogs Dictionary<string, Blog> This variable contains a dictionary of Blog objects of all user-defined blogs. These can either be iterated or accessed by their handle (which is the normal way). To access a specific blog use e.g. {{ blogs['news'] }} or identically {{ blogs.news }}.  
cart Cart Contains information about all products currently in the cart, including all rebates and coupons.  
collections Dictionary<string, Collection>

The collections dictionary contains all available collections/categories. Products can be part of several collections, so there is not always a specific collection for a product. Collections always contain at least one product.

The collection list can either be iterated or accessed by their handle. To access a specific collection use e.g. {{ collections['related'] }} or identically {{ collections.related }}.

 
collections_by_id Dictionary<int, Collection> Same as "collections", but it isn't accessed by the handle name, but by the "id" field of the collection object.  EF
crawler bool Defines whether the web request was initiated by a crawler.  EF
current_page int Specifies the current page (e.g. on collection pages showing more products than fitting on one page, pagination would be used which distributes the products on several pages).  
current_tags List<string> Contains the currently active tag of the blog (articles are filtered regarding this tag).  
customer Customer Some information about the currently logged in user. If currently no user is logged in, this structure doesn't exist. By that, you can check whether a user is logged in e.g. by using {% if customer %} … {% endif %}.  
customer_country_id int An internal numerical identifier, which contains the country in which the user reside (e.g. 33 = USA, 27 = Germany). EF 
customer_culture string This element contains a culture code of the country where the customer resides, this is e.g. "en-US" for USA and "de-AT" for Austria. Not for all countries a culture setting will be provided by the server, but for most larger countries this field will be set. EF 
customer_vat_name string Returns a localized string which contains the name of the value added taxes in the country of the customer, e.g. "VAT", "MwSt", etc. This can be used in the cart to show the VAT translated into the customers country. EF 
filter List<AttributeFilter> This variable contains information about filter that are active. A filter is something like a tag that can be selected by the user and then all products will be filtered against such a tag. But filters are a bit more complex, because its tags can be grouped forming a new unit. For example you could do one group called "size" which contains the tags "20-22", "23-25" and "27-30" and a second group called "color" which contains tags like "red", "green" and "blue". The user can then select the tags "23-25" and "red" and "blue" to receive all products of size 23-25 which are wither red or blue (or red and blue). The groups are combined using a bool AND operation, each of the tags in a group are combined using a bool OR operation. The various groups can be maintained from within the admin interface by the shop owner. EF 
linklists Dictionary<string, object> The linklist data contains a kind of menu structure, which also allows sub-menus. Currently only two fixed LinkList's are provided, called "main-menu" and "footer" (as their handles), which contain the information for the main top menu and an additional optional footer menu.  
mobile bool Defines whether the page was requested from a mobile device.  EF
page_description string Contains a description about the contents of the current page  
page_title string Contains the title of the current page  
pages Dictionary<string, Page> This variable contains a dictionary of Page objects of all user-defined pages. These can either be iterated or accessed by their handle (which is the normal way). To access a specific page use e.g. {{ pages['about-us'] }} or identically {{ pages.about-us }}.  
powered_by_link string A link to the FlickRocket web page with appropriate text  
rebates List<Rebates> A list of possible rebates (and each rebate can have several quantity scales) for the items in the shop. For more information, please have a look at the Rebates object. EF 
request Request Contains some information about the current request (path, parameters and host) EF 
search Search Search results are reported using this variable. For details please have a look at the object description  
settings Dictionary<string, object> All shop-owner-settings from the design editor are stored within this variable. The content and structure of this object depends on the settings defined by the template. The accessor are the names specified as settings name in the JSON and the settings.html file.  
shop Shop Contains information about the shop and the shop owner, like shop name, logo, etc.  
sort_order int

Defines which sort order is used to display products of a collection. The following values are valid:

1             -              By title ascending

6             -              By title descending

7             -              By release date ascending

2             -              By release date descending

9             -              By rating ascending

4             -              By rating descending

10           -              By sales ascending

5             -              By sales descending

You don't need to perform any sorting yourself, this just specifies how the product lists are sorted that are passed to the template. By using the URL  parameter "order" you can specify a sort behavior for yourself. Once specified, it will be stored within the session and be used for all further delivered pages. In order to reset the sorting just use an "order" parameter of -1

 EF
template string The template variable contains a string, which denotes the current page. E.g. "product" for the product template. Most often it is named like the .liquid file (without the .liquid extension).  
translation Dictionary<string, string> Stores the text information for the current user language imported from the .resx files. The accessor is the name/handle you specified in the .resx file (on the left side), the result will be the given text translation. You would access a translation by e.g. {{ translation.Best_Match }}.  EF

Variables only defined on the product page

Variable nameObjectDescriptionNote
product Product The product from the given product page.  
related_collection Collection This variable can also be accessed via the "collections" list via collections['related'].  

Variable only defined on the collection page

Variable nameObjectDescriptionNote
collection Collection The currently active collection.  

Variable only defined on the FAQ page

Variable nameObjectDescriptionNote
faq List<FAQ> Contains a list of questions and answers regarding the FlickRocket system.  EF

Variable only defined in a for loop block

Variable nameObjectDescriptionNote
forloop ForLoop Information about the current iteration. You can e.g. ask whether it is the first or last iteration, get the number of elements or the current index.  

Variable only defined within a form block

Variable nameObjectDescriptionNote
form Form This variable contains information about the last sending of a form.  

Variable only defined within a paginate block

Variable nameObjectDescriptionNote
paginate Paginate Information about the various pages (including links to the appropriate pages)  

Variable only defined within a tablerow block

Variable nameObjectDescriptionNote
tablerow TableRow Contains information about the current row, current column and size in a table created via tablerow.  

 

Note: All variables marked with EF are exclusive to FlickRocket.