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
blogsDictionary<stringBlog>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 }}. 
cartCartContains information about all products currently in the cart, including all rebates and coupons. 
collectionsDictionary<stringCollection>

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_idDictionary<intCollection>Same as "collections", but it isn't accessed by the handle name, but by the "id" field of the collection object. EF
crawlerboolDefines whether the web request was initiated by a crawler. EF
current_pageintSpecifies 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_tagsList<string>Contains the currently active tag of the blog (articles are filtered regarding this tag). 
customerCustomerSome 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_idintAn internal numerical identifier, which contains the country in which the user reside (e.g. 33 = USA, 27 = Germany).EF 
customer_culturestringThis 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_namestringReturns 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 
filterList<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 
linklistsDictionary<stringobject>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. 
mobileboolDefines whether the page was requested from a mobile device. EF
page_descriptionstringContains a description about the contents of the current page 
page_titlestringContains the title of the current page 
pagesDictionary<stringPage>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_linkstringA link to the FlickRocket web page with appropriate text 
rebatesList<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 
requestRequestContains some information about the current request (path, parameters and host)EF 
searchSearchSearch results are reported using this variable. For details please have a look at the object description 
settingsDictionary<stringobject>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. 
shopShopContains information about the shop and the shop owner, like shop name, logo, etc. 
sort_orderint

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
templatestringThe 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). 
translationDictionary<stringstring>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
productProductThe product from the given product page. 
related_collectionCollectionThis variable can also be accessed via the "collections" list via collections['related']. 

Variable only defined on the collection page

Variable nameObjectDescriptionNote
collectionCollectionThe currently active collection. 

Variable only defined on the FAQ page

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

Variable only defined in a for loop block

Variable nameObjectDescriptionNote
forloopForLoopInformation 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
formFormThis variable contains information about the last sending of a form. 

Variable only defined within a paginate block

Variable nameObjectDescriptionNote
paginatePaginateInformation about the various pages (including links to the appropriate pages) 

Variable only defined within a table row block

Variable nameObjectDescriptionNote
tablerowTableRowContains 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.

Read more about other command types: