Skillnad mellan versioner av "Templating:Variables"
Philip (Diskussion | bidrag) (→Globals: POPUP_IMAGE_{WIDTH,HEIGHIT}) |
Philip (Diskussion | bidrag) (→Product list (categories_listing.html)) |
||
| Rad 1 992: | Rad 1 992: | ||
===Product list (categories_listing.html)=== | ===Product list (categories_listing.html)=== | ||
| + | ====GET variables==== | ||
| + | {| class="wikitable" | ||
| + | !Variable name !! Type !! Description !! Format | ||
| + | |- | ||
| + | |} | ||
| + | ====Available data==== | ||
{| class="wikitable" | {| class="wikitable" | ||
!Variable name !! Type !! Description !! Format | !Variable name !! Type !! Description !! Format | ||
| Rad 2 011: | Rad 2 017: | ||
|- | |- | ||
| categories_listing.header || [[#dictionary|dictionary]] || Page header attributes: image, description and title || | | categories_listing.header || [[#dictionary|dictionary]] || Page header attributes: image, description and title || | ||
| + | |- | ||
| + | | categories_listing.cpath || [[#list|list]] of [[#integers|integer]]s || List of category IDs, where the last one is the current category, the second last the current category's parent and so on. The first element is the top level category. ||N/A | ||
| + | |- | ||
| + | | categories_listing.product_list || [[#list|list]] of [[#dictionary|dictionaries]] || All products for current page || [[Templating:Variables#product|Product list]] | ||
| + | |- | ||
| + | | categories_listing.product_count || [[#integer|integer]] || Total number of products using current filters || N/A | ||
| + | |- | ||
| + | |} | ||
| + | ====Display variables==== | ||
| + | {| class="wikitable" | ||
| + | !Variable name !! Type !! Description !! Format | ||
| + | |- | ||
| + | | categories_listing.default_list_style || [[#integer|integer]] || By default this layout for the listing is selected || N/A | ||
|- | |- | ||
| categories_listing.page_limit || [[#integer|integer]] || Maximum number of products per page || N/A | | categories_listing.page_limit || [[#integer|integer]] || Maximum number of products per page || N/A | ||
| Rad 2 019: | Rad 2 038: | ||
|- | |- | ||
| categories_listing.page_count || [[#integer|integer]] || Number of pages || N/A | | categories_listing.page_count || [[#integer|integer]] || Number of pages || N/A | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| categories_listing.sort_options || [[#dictionary|dictionary]] || Total number of products using current filters || Identifier (''model, price, etc'') as key and name (''Model, Price, etc'') as values | | categories_listing.sort_options || [[#dictionary|dictionary]] || Total number of products using current filters || Identifier (''model, price, etc'') as key and name (''Model, Price, etc'') as values | ||
| Rad 2 038: | Rad 2 051: | ||
| categories_listing.pagination_uri_format || [[#string|string]] || Format string for pagination. It contains a %d that the pagination macro replaces by page number || N/A | | categories_listing.pagination_uri_format || [[#string|string]] || Format string for pagination. It contains a %d that the pagination macro replaces by page number || N/A | ||
|- | |- | ||
| − | | | + | |} |
| + | ====Filtering variables==== | ||
| + | {| class="wikitable" | ||
| + | !Variable name !! Type !! Description !! Format | ||
|- | |- | ||
| categories_listing.tags || [[#list|list]] of [[#tag|tags]] || Root tags for which at least one subtag is used by one of the listed products. || N/A | | categories_listing.tags || [[#list|list]] of [[#tag|tags]] || Root tags for which at least one subtag is used by one of the listed products. || N/A | ||
Versionen från 15 november 2012 kl. 16.06
See also Templating:Emails.
Innehåll
- 1 Variables
- 1.1 Types
- 1.2 Globals
- 1.3 Boxes
- 1.4 Modules
- 1.5 Page specific
- 1.5.1 Account edit page (account_edit.html)
- 1.5.2 Account history page (account_history.html)
- 1.5.3 Order info page (account_history_info.html)
- 1.5.4 Account page (account.html)
- 1.5.5 Account newsletter subscription page (account_newsletters.html)
- 1.5.6 Account notifications page (account_notifications.html)
- 1.5.7 Change account password page (account_password.html)
- 1.5.8 New account password page (account_password_new.html)
- 1.5.9 Address book page (address_book.html)
- 1.5.10 Address book modification page (address_book_process.html)
- 1.5.11 Advanced search page (advanced_search.html)
- 1.5.12 Search results page (advanced_search_results.html)
- 1.5.13 Campaign page (campaign.html)
- 1.5.14 Product list (categories_listing.html)
- 1.5.15 Checkout success (checkout_success.html)
- 1.5.16 Contact us page (contact.html)
- 1.5.17 Cookie usage page (cookie_usage.html)
- 1.5.18 Gallery pages (gallery.html, galleries/)
- 1.5.19 Index page (index.html)
- 1.5.20 Kolli page (kolli.html)
- 1.5.21 Login page (create_account.html, login.html, password_forgotten.html)
- 1.5.22 Log off page (logoff.html)
- 1.5.23 Manufacturers page (manufacturers.html)
- 1.5.24 News archive page (news_archive.html)
- 1.5.25 News article page (news.html)
- 1.5.26 Newsletter page (newsletter.html)
- 1.5.27 Product page (product.html)
- 1.5.28 Product added to shopping cart page (product_added.html)
- 1.5.29 New products page (products_new.html)
- 1.5.30 Product reviews page (product_reviews.html)
- 1.5.31 Review page (product_reviews_info.html)
- 1.5.32 Write review page (product_reviews_write.html)
- 1.5.33 Question about product page (question_about_product.html)
- 1.5.34 Product reviews page (reviews.html)
- 1.5.35 Shopping cart page (shopping_cart.html)
- 1.5.36 Specials page (specials.html)
- 1.5.37 Tell a friend page (tell_a_friend.html)
- 2 Extensions
Variables
Templates get variables containing all necessary data passed from the back end. This is a complete reference of all available variables.
Types
string
URL
HTML
The raw filter should be applied when displaying these variables.
integer
decimal
boolean
list
dictionary
pagination
| Key | Type | Description |
|---|---|---|
| page | integer | The current page. |
| prev | integer | The previous page. |
| next | integer | The next page. |
| pages | list of integers | The pages in the current set. |
| set_prev | integer | The last page in the previous set of pages. |
| set_next | integer | The first page in the next set of pages. |
| from_row | integer | The first row displayed. |
| to_row | integer | The last row displayed. |
| row_count | integer | The number of rows paginated. |
product
| Key | Type | Description |
|---|---|---|
| id | string | Products internal ID |
| delivery_time | string | |
| description | HTML | |
| description_short | HTML | |
| href_buy | URL | |
| href | URL | |
| image | URL | |
| manufacturer_image | URL | |
| manufacturer_name | string | |
| model | string | |
| name | string | |
| price_discount_percentage | HTML | |
| price | HTML | |
| price_recommended | HTML | |
| price_special | HTML | |
| quantity | integer | |
| seo_link | string | |
| tax | decimal | Product tax rate. |
| tax_class_id | integer | |
| parent_id | integer | The products parent |
| child_count | integer | Counts amount of child products |
| rating | decimal | Average review rating in increments of 0.5. |
| price_per_unit | decimal | Product price per unit |
| unit | string | Product unit. ex. st/cm/m |
| price_per_unit_recommended | decimal | Recommended price in unit |
| price_per_unit_special | decimal | Special price in unit |
| price_klarna_account | decimal | Klarna account price |
| tags | list of tags |
tag
| Key | Type | Description |
|---|---|---|
| id | integer | ID. |
| parent_id | integer | Parent ID, 0 when there is no parent tag. |
| name | string | Name. |
| description | HTML | Description. |
| image | URL | Image URL. |
| meta_title | HTML | Meta title. |
| meta_keywords | HTML | Meta keywords. |
| meta_description | HTML | Meta description. |
| children | list of tags | Child tags. |
| used | boolean | Indicates if the tag is used by any product in a category listing. |
Globals
Globals are accessible anywhere in the templates, including macros.
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| template | string | Path to active template directory | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| current_page | string | Contains URL after domain name and before ?, for example storedomain.com/p/digital-fotoram/nextbase-photomil-8wi-fi-fotoram.html?vat_disp=0 returns /p/digital-fotoram/nextbase-photomil-8wi-fi-fotoram.html | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| current_script | string | Contains filename of current page | index.php | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| request | dictionary | A dictionary of recieved GET and POST data |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| current_customer_id | integer | Returns customer ID if customer is logged in, else None | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| customer | dictionary | Contains information about the logged in customer, or null. |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_agent | string | The client's user agent string. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| meta | dictionary | Header meta information for current page. |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings | dictionary | Contains some of the settings defined in the administration |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shoppingcart_amount | string | Amount of products in shopping cart | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shoppingcart_total | string | Total sum of the content in shopping cart | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| random_box_left | string | Shows boxes at the left side of the store | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| random_box_right | string | Shows boxes at the right side of the store | N/A |
Boxes
Boxes are variables used for the side boxes. They are all prefixed with boxes.
Category menu
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.categories.tree | list of dictionaries | Contains a tree of displayed categories in menu |
|
Category full menu
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.categories_full.tree | list of dictionaries | Contains a full tree of all available categories in menu |
|
Manufacturer select
| Variable name | Type | Description | Format | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.manufacturers.list | list of dictionaries | Lists all available manufacturers |
|
Search box
| Variable name | Type | Description | Format |
|---|---|---|---|
| boxes.search.advanced_href | string | URL to advanced search page | N/A |
| boxes.search.advanced_result_href | string | Action URL for search form | N/A |
Information page list
| Variable name | Type | Description | Format | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.information_pages.list | list of dictionaries | Lists all active information pages |
|
Language list
| Variable name | Type | Description | Format | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.languages.list | list of dictionaries | Lists all languages |
|
Login box
| Variable name | Type | Description | Format |
|---|---|---|---|
| boxes.login.form_href | string | Action link for login form | N/A |
| boxes.login.password_forgotten_href | string | Link to retrieve forgotten password page | N/A |
| boxes.login.account_history_href | string | Link to current customer's account history page. Contains orders and such | N/A |
| boxes.login.account_href | string | Link to current customer's account page | N/A |
| boxes.login.account_password_href | string | Unknown | N/A |
| boxes.login.logoff_href | string | Link to log off current customer | N/A |
| boxes.login.customer_first_name | string | Current customer's first name | N/A |
| boxes.login.customer_last_name | string | Current customer's last name | N/A |
New products list
Lists the most recently added products.
| Variable name | Type | Description |
|---|---|---|
| boxes.products_new.list | list of product | The most recently added products, the most recent first. |
News list
| Variable name | Type | Description | Format | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.news.list | list of dictionaries | Lists recent news. Limit set in administration |
|
Review
| Variable name | Type | Description | Format | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.reviews.write_review_href | string | Link to write review page. Only set if customer is viewing a product page | N/A | ||||||||||||||||||
| boxes.reviews.product | dictionary | Product and review data |
|
Shopping cart
| Variable name | Type | Description | Format | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.shopping_cart.list | list of dictionaries | List of products in shopping cart |
| ||||||||||||||||||||||||||||||||||||
| boxes.shopping_cart.total | string | Total value of contents of shopping cart represented as a string with currency symbol | N/A | ||||||||||||||||||||||||||||||||||||
| boxes.shopping_cart.total_items | integer | Sum of product quantities. | N/A |
Random special offer
Contains a random special offer.
| Variable name | Type | Description | Format | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.special_offers.product | dictionary | True if prices are displayed including VAT, else false. |
|
VAT select box
| Variable name | Type | Description | Format |
|---|---|---|---|
| boxes.vat_select.display_with_vat | boolean | True if prices are displayed including VAT, else false. | N/A |
| boxes.vat_select.with_href | string | URL to page where VAT display is set to true. | N/A |
| boxes.vat_select.without_href | string | URL to page where VAT display is set to false. | N/A |
Custom boxes
| Variable name | Type | Description | Format | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| boxes.custom.boxes | dictionary of lists | Dictionary of boxes, indexed by the box name. |
If type is 0:
If type is 1:
If type is 2:
|
Modules
product_parent
| Variable name | Type | Description | Format |
|---|---|---|---|
| modules.product_parent.name | string | Parent product name. | N/A |
| modules.product_parent.description | string | Parent product description. | N/A |
| modules.product_parent.image | string | Parent product image. | N/A |
| modules.product_parent.images | string | Parent product additional images. | N/A |
associated_products.html
| Variable name | Type | Description | Format |
|---|---|---|---|
| modules.associated_products.products | list of products | Associated products. | N/A |
product_attributes.html
| Variable name | Type | Description | Format | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| modules.product_attributes.attributes | list of dictionaries | Product attributes. |
|
product_specifications.html
| Variable name | Type | Description | Format | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| modules.product_specifications.grouped | list of categories | Specifications with multiple values per specification grouped into a values variable. | ||||||||||
| modules.product_specifications.hierarchy | list of categories | The hierarchy of specifications used for this product. | ||||||||||
| modules.product_specifications.specifications | list of dictionaries | Product specifications. |
|
products_in_package.html
| Variable name | Type | Description | Format |
|---|---|---|---|
| modules.products_in_package.products | list of products | Products in product package. | N/A |
products_reviews.html
| Variable name | Type | Description | Format | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| modules.products_reviews.captcha_href | URL | Link to the captcha image. | N/A | |||||||||||||||
| modules.products_reviews.error | string | Error message. | N/A | |||||||||||||||
| modules.products_reviews.customer | dictionary | Customer information. |
| |||||||||||||||
| modules.products_reviews.reviews | list of dictionaries | Product reviews. |
|
products_variants.html
| Variable name | Type | Description | Format | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| modules.products_variants.category | integer | Category index. | N/A | ||||||||||||
| modules.products_variants.variants | list of dictionaries | Variants. |
| ||||||||||||
| modules.products_variants.products | list of dictionaries | Variants. |
| ||||||||||||
| modules.products_variants.combinations | list of lists of integers | Available combinations of options. | N/A | ||||||||||||
| modules.products_variants.combination | list of integers | Currently selected combination. | N/A |
tell_a_friend.html
| Variable name | Type | Description | Format |
|---|---|---|---|
| modules.tell_a_friend.form_action | URL | Form handler. | N/A |
Page specific
Most variables are not available on a global scale. They are page specific variables. They are always prefixed with the same name as the included template. So contact.html variables are prefixed with contact.
Account edit page (account_edit.html)
| Variable name | Type | Description | Format | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account_edit.form_action | URL | A link to the page which handles the form | N/A | ||||||||||||||||||||||||||||||
| account_edit.back_href | URL | A link back to the account page | N/A | ||||||||||||||||||||||||||||||
| account_edit.account | dictionary | Account data |
|
Account history page (account_history.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account_history.account_href | URL | A link back to the account page | N/A | |||||||||||||||||||||||||||
| account_history.pagination | pagination | Pagination info | N/A | |||||||||||||||||||||||||||
| account_history.page_href_format | URL | Pagination link format | N/A | |||||||||||||||||||||||||||
| account_history.order_history | list of dictionaries | Order history |
|
Order info page (account_history_info.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account_history_info.back_href | URL | Link back to the account order history | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| account_history_info.order | dictionary | Order info |
|
Account page (account.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account.account_history_href | URL | A link to the account history page | N/A | |||||||||||||||||||||
| account.account_edit_href | URL | A link to the edit account page | N/A | |||||||||||||||||||||
| account.address_book_href | URL | A link to the address book page | N/A | |||||||||||||||||||||
| account.account_password_href | URL | A link to the password change page | N/A | |||||||||||||||||||||
| account.logoff_href | URL | A link to the logoff page | N/A | |||||||||||||||||||||
| account.account_newsletters_href | URL | A link to the newsletters page | N/A | |||||||||||||||||||||
| account.account_notifications_href | URL | A link to the notifications page | N/A | |||||||||||||||||||||
| account.order_history_enabled | boolean | Is the order history enabled? | N/A | |||||||||||||||||||||
| account.order_history | list of dictionaries | Order history |
|
Account newsletter subscription page (account_newsletters.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| account_newsletters.form_action | URL | A link to the page which handles the form | N/A |
| account_newsletters.back_href | URL | Link back to the account page | N/A |
| account_newsletters.subscribed | boolean | Is the user subscribed to the newsletter | N/A |
Account notifications page (account_notifications.html)
| Variable name | Type | Description | Format | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account_notifications.form_action | URL | A link to the page which handles the form | N/A | ||||||||||||
| account_notifications.account_href | URL | A link back to the account page | N/A | ||||||||||||
| account_notifications.products | list of dictionaries | The products subscribed to |
| ||||||||||||
| account_notifications.global_product_notifications | boolean | Has the user enabled the global product notification setting | N/A |
Change account password page (account_password.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| account_password.form_action | URL | A link to the page which handles the form | N/A |
| account_password.back_href | URL | Link back to the account page | N/A |
New account password page (account_password_new.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| account_password_new.form_action | URL | A link to the page which handles the form | N/A |
| account_password_new.back_href | URL | Link back to the account page | N/A |
| account_password_new.password_provided | boolean | Is a password provided by the user, or the default password | N/A |
Address book page (address_book.html)
| Variable name | Type | Description | Format | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| address_book.back_href | URL | A link back to the account page | N/A | ||||||||||||||||||
| address_book.add_href | URL | A link to a form which adds a new entry to the address book | N/A | ||||||||||||||||||
| address_book.entries_count | integer | Number of entries | N/A | ||||||||||||||||||
| address_book.address_label | HTML | Address label | N/A | ||||||||||||||||||
| address_book.addresses | list of dictionaries | The addresses in the address book |
|
Address book modification page (address_book_process.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| address_book_process.editing | boolean | Is the page in the editing mode? | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.deleting | boolean | Is the page in the deletion mode? | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.edit_form_action | URL | A link to a page which handles the editing form | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.delete_form_action | URL | A link to a page which handles the deletion form | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.address_label | HTML | The address | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.back_href | URL | A back link | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.address_book_href | URL | A link to the address_book | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.process | boolean | Is the page in the processing mode? | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.default_address | boolean | Is this the default address? | N/A | |||||||||||||||||||||||||||||||||||||||
| address_book_process.entry | dictionary | The fields in the current entry |
|
Advanced search page (advanced_search.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| advanced_search.form_action | string | A link to the page which handles the form. | N/A |
| advanced_search.categories | association list | A list of category names mapped to their indices. | dictionary of string to integer mappings. |
| advanced_search.manufacturers | association list | A list of manufacturer names mapped to their indices. | dictionary of string to integer mappings. |
Search results page (advanced_search_results.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| advanced_search_results.results | list of products | The search results. | N/A |
| advanced_search_results.num_results | integer | The number of search results. | N/A |
| advanced_search_results.back_href | URL | A link for returning to the search page. | N/A |
Campaign page (campaign.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| campaign.campaign_name | HTML | Title of campaign. | N/A |
| campaign.campaign_description | HTML | Description of campaign. | N/A |
| campaign.campaign_image | URL | Selected campaign image. | N/A |
| campaign.products | list of products | Products included in campaign. | N/A |
Product list (categories_listing.html)
GET variables
| Variable name | Type | Description | Format |
|---|
Available data
| Variable name | Type | Description | Format | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| categories_listing.header | dictionary | Attributes for the top of the page. It is either a manufacturer or a category |
| ||||||||||||||||||
| categories_listing.header | dictionary | Page header attributes: image, description and title | |||||||||||||||||||
| categories_listing.cpath | list of integers | List of category IDs, where the last one is the current category, the second last the current category's parent and so on. The first element is the top level category. | N/A | ||||||||||||||||||
| categories_listing.product_list | list of dictionaries | All products for current page | Product list | ||||||||||||||||||
| categories_listing.product_count | integer | Total number of products using current filters | N/A |
Display variables
| Variable name | Type | Description | Format |
|---|---|---|---|
| categories_listing.default_list_style | integer | By default this layout for the listing is selected | N/A |
| categories_listing.page_limit | integer | Maximum number of products per page | N/A |
| categories_listing.page_limits | list of integers | List of available page limits. 0 means all product on one page | N/A |
| categories_listing.page_index | integer | Current page number | N/A |
| categories_listing.page_count | integer | Number of pages | N/A |
| categories_listing.sort_options | dictionary | Total number of products using current filters | Identifier (model, price, etc) as key and name (Model, Price, etc) as values |
| categories_listing.sort_form_href | string | Link to the same page. | N/A |
| categories_listing.sort_name_href | string | Link to the same page when sorting by name. If already sorting by name, this URL inverts the order | N/A |
| categories_listing.sort_model_href | string | Link to the same page when sorting by model. If already sorting by model, this URL inverts the order | N/A |
| categories_listing.sort_price_href | string | Link to the same page when sorting by price. If already sorting by price, this URL inverts the order | N/A |
| categories_listing.pagination_uri_format | string | Format string for pagination. It contains a %d that the pagination macro replaces by page number | N/A |
Filtering variables
| Variable name | Type | Description | Format | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| categories_listing.tags | list of tags | Root tags for which at least one subtag is used by one of the listed products. | N/A | ||||||||||||
| categories_listing.used_tag_ids | list of integers | The tags used by at least one product in the filtered set of products. | N/A | ||||||||||||
| categories_listing.manufacturers | list of dictionaries | Manufacturers used by products in current category tree. |
|
Checkout success (checkout_success.html)
| Variable name | Type | Description | Format | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| checkout_success.update_action | URL | A link to the page which handles the form | N/A | ||||||||||||||||||||||||
| checkout_success.heading | string | Page heading | N/A | ||||||||||||||||||||||||
| checkout_success.text | HTML | Page content | N/A | ||||||||||||||||||||||||
| checkout_success.order_id | integer | Order ID | N/A | ||||||||||||||||||||||||
| checkout_success.survey_questions | list of dictionaries | Survey questions |
|
Contact us page (contact.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| contact.form_href | string | URL with target of form for handling user input data | N/A |
| contact.captcha | boolean | Determines whether Captcha should be used or not | N/A |
| contact.name | String | Contains customer name if customer is logged in or validation if validation of a field failed | N/A |
| contact.email | string | Contains customer e-mail if customer is logged in or validation if validation of a field failed | N/A |
| contact.heading | string | Contains heading text | N/A |
| contact.text | string | Contains a descriptive text of what the contact us page is. It most certainly contains HTML so the raw filter may be appropriate to use | N/A |
Cookie usage page (cookie_usage.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| cookie_usage.continue_href | string | A link to the next page (index.php) | N/A |
Gallery pages (gallery.html, galleries/)
| Variable name | Type | Description | Format | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gallery.title | string | Gallery title. | N/A | |||||||||||||||
| gallery.description | string | Gallery description or content. | N/A | |||||||||||||||
| gallery.date | string | Last modification date. | N/A | |||||||||||||||
| gallery.type | string | Type of gallery. | N/A | |||||||||||||||
| gallery.upload_data_action | URL | Form action for uploading. | N/A | |||||||||||||||
| gallery.upload_data_check | boolean | True. | N/A | |||||||||||||||
| gallery.upload_data_type | HTML | Form field. | N/A | |||||||||||||||
| gallery.page_title | string | Edited page title. | N/A | |||||||||||||||
| gallery.page_description | HTML | Edited page description. | N/A | |||||||||||||||
| gallery.meta_title | N/A | |||||||||||||||||
| gallery.meta_description | N/A | |||||||||||||||||
| gallery.meta_keywords | N/A | |||||||||||||||||
| gallery.form_page_description | string | Edited page description, escaped. | N/A | |||||||||||||||
| gallery.gallery_owned | boolean | Set if the gallery is owned by the logged-in user. | N/A | |||||||||||||||
| gallery.edit_content_link | URL | Link for editing the gallery. | N/A | |||||||||||||||
| gallery.remove_content_link | URL | Link for removing the gallery. | N/A | |||||||||||||||
| gallery.edit_mode | boolean | Set when editing, otherwise adding. | N/A | |||||||||||||||
| gallery.gallery_fields | list of dictionaries | Gallery fields. |
| |||||||||||||||
| gallery.children | list of string to dictionary mappings | Child galleries indexed by gallery type. |
| |||||||||||||||
| gallery.siblings | list of string to dictionary mappings | Sibling galleries indexed by gallery type. | See gallery.children. |
Index page (index.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| index.text | HTML | Page text | N/A |
| index.header_products | products | A random selection of products. | list of products |
| index.featured_products | products | A list of featured products. | list of products |
| index.new_products | products | A list of recently added products. | list of products |
| index.specials_products | products | A list of products with special prices. | list of products |
Kolli page (kolli.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| kolli.heading | string | Page heading | N/A |
| kolli.text | HTML | Page text | N/A |
Login page (create_account.html, login.html, password_forgotten.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| create_account.form_action | URL | A link to the page which handles the form | N/A |
| create_account.heading | string | Page heading. | N/A |
| create_account.text | string | Page text. | N/A |
| create_account.generated_password | string | A randomly generated password suitable for the new account. | N/A |
| create_account.customers_personnummer | string | N/A | |
| create_account.countries | association list | A list of country indices mapped to their names. | dictionary of integer to string mappings. |
| Variable name | Type | Description | Format |
|---|---|---|---|
| login.form_action | URL | A link to the page which handles the form | N/A |
| login.heading | string | Page heading | N/A |
| login.page_name | string | N/A |
| Variable name | Type | Description | Format |
|---|---|---|---|
| password_forgotten.form_action | string | A link to the page which handles the form | N/A |
| password_forgotten.back_href | string | A link to the parent page (login.php) | N/A |
Create account box (containboxes/create_account.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| containboxes.create_account.form_action | URL | A link to the page which handles the form | N/A |
| containboxes.create_account.text | HTML | Box text | N/A |
| containboxes.create_account.generated_password | string | A randomly generated password suitable for the new account. | N/A |
| containboxes.create_account.customers_personnummer | string | The customer's personnummer | N/A |
| containboxes.create_account.countries | association list | A list of country indices mapped to their names. | dictionary of integer to string mappings. |
Login box (containboxes/login_box.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| containboxes.login_box.form_action | URL | A link to the page which handles the form | N/A |
Password forgotten box (containboxes/password_forgotten_box.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| containboxes.password_forgotten_box.form_action | URL | A link to the page which handles the form | N/A |
Log off page (logoff.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| logoff.continue_href | string | Link presented to the user after logging off. | N/A |
Manufacturers page (manufacturers.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| id | string | N/A | N/A |
| name | string | N/A | N/A |
| image | string | N/A | N/A |
| address | string | N/A | N/A |
| postcode | string | N/A | N/A |
| postal_address | string | N/A | N/A |
| visitational_address | string | N/A | N/A |
| country | string | N/A | N/A |
| telephone1 | string | N/A | N/A |
| telephone2 | string | N/A | N/A |
| fax | string | N/A | N/A |
| email_address | string | N/A | N/A |
| orgno | string | N/A | N/A |
| vat | string | N/A | N/A |
| note | string | N/A | N/A |
| plusgiro | string | N/A | N/A |
| bankgiro | string | N/A | N/A |
| contact | string | N/A | N/A |
| payment_conditions | string | N/A | N/A |
| customers_no | string | N/A | N/A |
| homepage | string | N/A | N/A |
| link | string | N/A | N/A |
News archive page (news_archive.html)
| Variable name | Type | Description | Format | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| news_archive.news | list of dictionaries | News articles |
|
News article page (news.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| news.title | string | News article title | N/A |
| news.date | string | Date of publishing | N/A |
| news.content | string | News article content | N/A |
Newsletter page (newsletter.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| newsletter.text | HTML | The newsletter. | N/A |
Product page (product.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| product.form_href | URL | Add to cart handler. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.reviews_href | URL | Link to product reviews. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.invalid_name | string | Invalid product name page title. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.invalid_text | string | Invalid product name page text. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.inactive_name | string | Inactive product name page title. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.inactive_text | string | Inactive product name page text. | N/A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.product_prev
product.product_next |
dictionary | Previous and next products in the current category. |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.category_path | list of dictionaries | Information about the current category path. |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.product | dictionary | Product information |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| product.manufacturer | dictionary | Product manufacturer information |
|
Product added to shopping cart page (product_added.html)
| Variable name | Type | Description | Format | ||||||
|---|---|---|---|---|---|---|---|---|---|
| product_added.checkout_href | URL | A link to the checkout page. | N/A | ||||||
| product_added.product | product | The product added. | The product has one additional key.
|
New products page (products_new.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| products_new.pagination | pagination | Pagination info | N/A |
| products_new.page_href_format | URL | Pagination link format | N/A |
| products_new.products | products | A list of recently added products. | list of products |
Product reviews page (product_reviews.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| product_reviews.back_href | URL | Link to the product page. | N/A | |||||||||||||||||||||
| product_reviews.write_href | URL | Link to the write review page. | N/A | |||||||||||||||||||||
| product_reviews.product | product | The product. | N/A | |||||||||||||||||||||
| product_reviews.pagination | pagination | Pagination object for the reviews. | N/A | |||||||||||||||||||||
| product_reviews.page_href_format | URL | Page format for the pagination. | N/A | |||||||||||||||||||||
| product_reviews.reviews | list of dictionaries | The displayed reviews. |
|
Review page (product_reviews_info.html)
| Variable name | Type | Description | Format | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| product_reviews_info.back_href | URL | Link to the product reviews page. | N/A | |||||||||||||||
| product_reviews_info.write_href | URL | Link to the write review page. | N/A | |||||||||||||||
| product_reviews_info.product | product | The product. | N/A | |||||||||||||||
| product_reviews_info.review | dictionary | The displayed review. |
|
Write review page (product_reviews_write.html)
| Variable name | Type | Description | Format | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| product_reviews_write.form_href | URL | Form handler. | N/A | |||||||||
| product_reviews_write.back_href | URL | Link to the product reviews page. | N/A | |||||||||
| product_reviews_write.product | product | The product. | N/A | |||||||||
| product_reviews_write.customer | dictionary | Customer information. |
|
Question about product page (question_about_product.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| question_about_product.form_action | URL | A link to the page which handles the form | N/A |
| question_about_product.back_href | URL | Link back to the product page | N/A |
| question_about_product.product | product | Product information. | N/A |
Product reviews page (reviews.html)
| Variable name | Type | Description | Format | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| reviews.pagination | pagination | Pagination info | N/A | |||||||||||||||||||||||||||
| reviews.page_href_format | URL | Pagination link format | N/A | |||||||||||||||||||||||||||
| reviews.reviews | list of dictionaries | Product reviews |
|
Shopping cart page (shopping_cart.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| shopping_cart.title | |||
| shopping_cart.description | |||
| shopping_cart.update_products_href | |||
| shopping_cart.checkout_href | |||
| shopping_cart.referer_url | |||
| shopping_cart.cart_count | |||
| shopping_cart.cart_total | |||
| shopping_cart.any_out_of_stock | |||
| shopping_cart.checkout_cart |
Specials page (specials.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| specials.pagination | pagination | Pagination info | N/A |
| specials.page_href_format | URL | Pagination link format | N/A |
| specials.specials | products | A list of products with special prices. | list of products |
Tell a friend page (tell_a_friend.html)
| Variable name | Type | Description | Format |
|---|---|---|---|
| tell_a_friend.form_action | URL | A link to the page which handles the form | N/A |
| tell_a_friend.back_href | URL | Link back to the product page | N/A |
| tell_a_friend.product | product | Product information. | N/A |
Extensions
Operators
String matching
'=~' matches a string against a regular expression. Example:
var =~ '//'