Skillnad mellan versioner av "Templating:Variables"

Från Vendre Help
Hoppa till: navigering, sök
(Product page (product.html): List all variables. Hide deprecated variables.)
(upsell() dictionary)
 
(359 mellanliggande versioner av 15 användare visas inte)
Rad 1: Rad 1:
[[Category:Templating]]
+
See also [[Templating:Emails]].
 
=Variables=
 
=Variables=
 
Templates get variables containing all necessary data passed from the back end. This is a complete reference of all available variables.
 
Templates get variables containing all necessary data passed from the back end. This is a complete reference of all available variables.
Rad 8: Rad 8:
 
The [http://www.twig-project.org/doc/templates.html#raw raw] filter should be applied when displaying these variables.
 
The [http://www.twig-project.org/doc/templates.html#raw raw] filter should be applied when displaying these variables.
 
===integer===
 
===integer===
 +
 +
===decimal===
 
===boolean===
 
===boolean===
 
===list===
 
===list===
 
===dictionary===
 
===dictionary===
====pagination====
+
====manufacturer====
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 17: Rad 19:
 
!Description
 
!Description
 
|-
 
|-
|page
+
|id
|integer
+
|[[#integer|integer]]
|The current page.
+
|
 
|-
 
|-
|prev
+
|name
|integer
+
|[[#string|string]]
|The previous page.
+
|
 
|-
 
|-
|next
+
|image
|integer
+
|[[#URL|URL]]
|The next page.
+
|
 
|-
 
|-
|pages
+
|address
|list of integers
+
|[[#string|string]]
|The pages in the current set.
+
|
 
|-
 
|-
|set_prev
+
|postcode
|integer
+
|[[#string|string]]
|The last page in the previous set of pages.
+
|
 
|-
 
|-
|set_next
+
|postal_address
|integer
+
|[[#string|string]]
|The first page in the next set of pages.
+
|
 
|-
 
|-
|from_row
+
|visitational_address
|integer
+
|[[#string|string]]
|The first row displayed.
+
|
 
|-
 
|-
|to_row
+
|country
|integer
+
|[[#string|string]]
|The last row displayed.
+
|
 
|-
 
|-
|row_count
+
|telephone1
|integer
+
|[[#string|string]]
|The number of rows paginated.
+
|
|}
 
 
 
====product====
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|delivery_time
+
|telephone2
|string
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|description
+
|fax
|HTML
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|description_short
+
|email_address
|HTML
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|href_buy
+
|orgno
|URL
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|href
+
|vat
|URL
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|image
+
|note
|URL
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|manufacturer_image
+
|postgiro
|URL
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|manufacturer_name
+
|plusgiro
|string
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|model
+
|bankgiro
|string
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|name
+
|contact
|string
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|price_discount_percentage
+
|payment_conditions
|HTML
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|price
+
|customers_no
|HTML
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|price_recommended
+
|video_1
|HTML
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|price_special
+
|video_2
|HTML
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|quantity
+
|extra1
|integer
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|seo_link
+
|extra2
|string
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|tax_class_id
+
|extra3
|integer
+
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|rating
+
|href
|decimal
+
|[[#URL|URL]]
|Average review rating in increments of 0.5.
+
|
|}
 
 
 
====tag====
 
{| class="wikitable"
 
! Key !! Type !! Description
 
 
|-
 
|-
| id              || integer      || ID.
+
|url
 +
|[[#URL|URL]]
 +
|
 
|-
 
|-
| parent_id        || integer      || Parent ID, 0 when there is no parent tag.
+
|description
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| name            || string       || Name.
+
|meta_title
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| description      || HTML        || Description.
+
|meta_keywords
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| image            || URL          || Image URL.
+
|meta_description
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| meta_title      || HTML        || Meta title.
+
|seo_text
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| meta_keywords    || HTML        || Meta keywords.
+
|seo_title
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| meta_description || HTML        || Meta description.
+
|extra4
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| children        || list of tags || Child tags.
+
|extra5
|}
+
|[[#string|string]]
 
+
|
==Globals==
 
Globals are accessible anywhere in the templates, including macros.
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|current_page
+
|images
|string
+
|[[#list|list]] of [[#URL|URLs]]
|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
+
|pdfs
|string
+
|[[#list|list]]
|Contains filename of current page
 
|index.php
 
|-
 
|request
 
|dictionary
 
|A dictionary of recieved ''GET'' and ''POST'' data
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 183: Rad 175:
 
!Description
 
!Description
 
|-
 
|-
|get
+
|path||[[#URL|URL]]||PDF link.
|dictionary
 
|Data received from the ''GET'' query string
 
 
|-
 
|-
|post
+
|name||[[#string|string]]||PDF label.
|dictionary
+
|}
|Received ''POST'' data
 
 
|}
 
|}
|-
+
 
|current_customer_id
+
====pagination====
|integer
 
|Returns customer ID if customer is logged in, else None
 
|N/A
 
|-
 
|meta
 
|dictionary
 
|Header meta information for current page.
 
|
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 206: Rad 187:
 
!Description
 
!Description
 
|-
 
|-
|title
+
|page
|HTML
+
|[[#integer|integer]]
|Page title.
+
|The current page.
 
|-
 
|-
|keywords
+
|prev
|string
+
|[[#integer|integer]]
|Page meta keywords.
+
|The previous page.
 
|-
 
|-
|description
+
|next
|HTML
+
|[[#integer|integer]]
|Page meta description.
+
|The next page.
 
|-
 
|-
|language
+
|pages
|string
+
|[[#list|list]] of [[#integers|integer]]s
|Page language.
+
|The pages in the current set.
 
|-
 
|-
|generator
+
|set_prev
|string
+
|[[#integer|integer]]
|Startabutik E-handel.
+
|The last page in the previous set of pages.
 
|-
 
|-
|canonical
+
|set_next
|URL
+
|[[#integer|integer]]
|Canonical URL for current page. Not always available.
+
|The first page in the next set of pages.
|}
 
 
|-
 
|-
|settings
+
|from_row
|dictionary
+
|[[#integer|integer]]
|Contains some of the settings defined in the administration
+
|The first row displayed.
|
+
|-
 +
|to_row
 +
|[[#integer|integer]]
 +
|The last row displayed.
 +
|-
 +
|row_count
 +
|[[#integer|integer]]
 +
|The number of rows paginated.
 +
|}
 +
 
 +
====product====
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 240: Rad 230:
 
!Description
 
!Description
 
|-
 
|-
|ACCOUNT_COMPANY, ACCOUNT_DOB, ACCOUNT_GENDER, ACCOUNT_PERSONNUMMER, ACCOUNT_STATE, ACCOUNT_SUBURB
+
|id
|boolean
+
|[[#string|string]]
|Account fields can be enabled and disabled
+
|Products internal ID
 
|-
 
|-
|CREATE_ACCOUNT_LAYOUT
+
|delivery_time
|integer
+
|[[#string|string]]
|''Internal''
+
|
 
|-
 
|-
|DOWNLOAD_ENABLED
+
|description
|boolean
+
|[[#HTML|HTML]]
|Is the download module enabled
+
|
 
|-
 
|-
|ENTRY_CITY_MIN_LENGTH, ENTRY_DOB_MIN_LENGTH, ENTRY_EMAIL_ADDRESS_MIN_LENGTH, ENTRY_FIRST_NAME_MIN_LENGTH, ENTRY_LAST_NAME_MIN_LENGTH, ENTRY_PASSWORD_MIN_LENGTH, ENTRY_POSTCODE_MIN_LENGTH, ENTRY_STATE_MIN_LENGTH, ENTRY_STREET_ADDRESS_MIN_LENGTH, ENTRY_TELEPHONE_MIN_LENGTH
+
|description_short
|integer
+
|[[#HTML|HTML]]
|Used in form validation
+
|
 
|-
 
|-
|ENTRY_PASSWORD_IN_REGISTRATION
+
|href_buy
|boolean
+
|[[#URL|URL]]
|Is the user allowed to specify a password when registering
+
|
 
|-
 
|-
|FORMS_USE_CAPTCHA
+
|href
|boolean
+
|[[#URL|URL]]
|Is captcha used for forms
+
|
 
|-
 
|-
|HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT
+
|image
|integer
+
|[[#URL|URL]]
|Width and height of heading images
+
|
 +
|-
 +
|images
 +
|[[#dictionary|dictionary]]
 +
|Additional product images.
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|MAX_ADDRESS_BOOK_ENTRIES
+
|href||[[#URL|URL]]||Image thumbnail link.
|integer
 
|Maximum entries in the address book
 
 
|-
 
|-
|PREV_NEXT_BAR_LOCATION
+
|image||[[#URL|URL]]||Image path.
|integer
 
|''Internal''
 
 
|-
 
|-
|SMALL_IMAGE_WIDTH
+
|description||[[#string|string]]||Image description.
|integer
+
|}
|Width of small thumbnails in pixels
 
 
|-
 
|-
|SMALL_IMAGE_HEIGHT
+
|is_package
|integer
+
|[[#boolean|boolean]]
|Height of small thumbnails in pixels
+
|True when the product has packaged products.
 
|-
 
|-
|STATISTICS_GOOGLE_ANALYTICS
+
|has_attributes
|string
+
|[[#boolean|boolean]]
|Google analytics tracking code, if specified
+
|True when the product has any attributes.
 
|-
 
|-
|PRODUCT_PAGE_DESIGN
+
|manufacturer_image
|integer
+
|[[#URL|URL]]
|''Internal''
+
|
|}
 
 
|-
 
|-
|shoppingcart_amount
+
|manufacturer_name
|string
+
|[[#string|string]]
|Amount of products in shopping cart
+
|
|N/A
 
 
|-
 
|-
|shoppingcart_total
+
|model
|string
+
|[[#string|string]]
|Total sum of the content in shopping cart
+
|
|N/A
 
 
|-
 
|-
|random_box_left
+
|name
|string
+
|[[#string|string]]
|Shows boxes at the left side of the store
+
|
|N/A
 
 
|-
 
|-
|random_box_right
+
|price_discount_percentage
|string
+
|[[#HTML|HTML]]
|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===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.categories.tree
+
|price
|list of dictionaries
+
|[[#HTML|HTML]]
|Contains a tree of displayed categories in menu
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|id
+
|price_raw
|integer
+
|[[#HTML|HTML]]
|Id of category
+
|
 
|-
 
|-
|name
+
|price_recommended
|string
+
|[[#HTML|HTML]]
|Name of category in current language
+
|
 
|-
 
|-
|image
+
|price_recommended_raw
|string
+
|[[#HTML|HTML]]
|Path to category image if such exists
+
|
 
|-
 
|-
|href
+
|price_special
|string
+
|[[#HTML|HTML]]
|Link to category's product listing page
+
|
 
|-
 
|-
|child_count
+
|price_special_raw
|integer
+
|[[#HTML|HTML]]
|Number of open child categories
+
|
 
|-
 
|-
|children
+
|price_special_expires
|list of dictionaries
+
|[[#date|date]]
|List of visible child categories. See boxes.categories.tree for format
+
|
 
|-
 
|-
|open
+
|quantity
|boolean
+
|[[#integer|integer]]
|Returns true if the category (or one of its children) is the currently selected one
+
|
 +
|-
 +
|quantity_partner
 +
|[[#integer|integer]]
 +
|Shows up when using get_products and get_associated_product, containing the quantity for the main stock selected from partners.
 
|-
 
|-
|selected
+
|replacement_product
|boolean
+
|[[#string|string]]
|Returns true if the category is the currently selected one
+
|
|}
 
|}
 
 
 
===Category full menu===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.categories_full.tree
+
|seo_link
|list of dictionaries
+
|[[#string|string]]
|Contains a full tree of all available categories in menu
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|id
+
|tax
|integer
+
|[[#decimal|decimal]]
|Id of category
+
|Product tax rate.
 
|-
 
|-
|name
+
|tax_class_id
|string
+
|[[#integer|integer]]
|Name of category in current language
+
|
 
|-
 
|-
|image
+
|type
|string
+
|[[#string|string]]
|Path to category image if such exists
+
|
 
|-
 
|-
|href
+
|parent_id
|string
+
|[[#integer|integer]]
|Link to category's product listing page
+
|The products parent
 
|-
 
|-
 
|child_count
 
|child_count
|integer
+
|[[#integer|integer]]
|Number of open child categories
+
|Counts amount of child products
 
|-
 
|-
|children
+
|rating
|list of dictionaries
+
|[[#decimal|decimal]]
|List of visible child categories. See boxes.categories.tree for format
+
|Average review rating in increments of 0.5.
 +
|-
 +
|price_per_unit
 +
|[[#decimal|decimal]]
 +
|Product price per unit
 +
|-
 +
|unit
 +
|[[#string|string]]
 +
|Product unit. ex. st/cm/m
 +
|-
 +
|price_per_unit_recommended
 +
|[[#decimal|decimal]]
 +
|Recommended price in unit
 +
|-
 +
|price_per_unit_special
 +
|[[#decimal|decimal]]
 +
|Special price in unit
 +
|-
 +
|price_klarna_account
 +
|[[#decimal|decimal]]
 +
|Klarna account price
 +
|-
 +
|tags
 +
|[[#list|list]] of [[#tag|tags]]
 +
|
 +
|-
 +
|extra1||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra2||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra3||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra4||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra5||[[#HTML|HTML]]||Custom product field.
 
|-
 
|-
|open
+
|extended_data_fields||[[#list|list]]||Extended data fields if any data is set for this product
|boolean
 
|Returns true if the category (or one of its children) is the currently selected one
 
 
|-
 
|-
|selected
+
|weight||[[#string|string]]||Product weight.
|boolean
 
|Returns true if the category is the currently selected one
 
|}
 
 
|}
 
|}
  
===Manufacturer select===
+
====tag====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| id              || [[#integer|integer]]      || ID.
!Format
 
 
|-
 
|-
|boxes.manufacturers.list
+
| parent_id        || [[#integer|integer]]      || Parent ID, 0 when there is no parent tag.
|list of dictionaries
 
|Lists all available manufacturers
 
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|name
+
| name             || [[#string|string]]      || Name.
|string
 
|Name of manufacturer
 
 
|-
 
|-
|href
+
| description      || [[#HTML|HTML]]        || Description.
|string
+
|-
|Link to manufacturer page
+
| image            || [[#URL|URL]]          || Image URL.
 +
|-
 +
| meta_title      || [[#HTML|HTML]]        || Meta title.
 +
|-
 +
| meta_keywords    || [[#HTML|HTML]]        || Meta keywords.
 +
|-
 +
| meta_description || [[#HTML|HTML]]        || Meta description.
 +
|-
 +
| children        || [[#list|list]] of [[#tag|tags]] || Child tags.
 +
|-
 +
| used            || [[#boolean|boolean]]      || Indicates if the tag is used by any product in a category listing.
 +
|-
 +
|color||[[#string|string]]||Tag color (HEX).
 
|}
 
|}
 +
 +
====custom field====
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| fields_id              || [[#integer|integer]]      || ID.
 +
|-
 +
| require_in_checkout        || [[#boolean|boolean]]      || Is the field required in the checkout?
 +
|-
 +
| type            || [[#string|string]]      || What was entered in the administration.
 +
|-
 +
| name      || [[#string|string]]        || Field label.
 +
|-
 +
| value            || [[#string|string]]          || Entered value (not always available).
 
|}
 
|}
===Search box===
+
 
 +
====extended data field====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| id              || [[#integer|integer]]      || ID.
!Format
+
|-
 +
| name        || [[#string|strring]]      || Name
 
|-
 
|-
|boxes.search.advanced_href
+
| type        || [[#string|string]]      || Type of data json/binary/text
|string
 
|URL to advanced search page
 
|N/A
 
 
|-
 
|-
|boxes.search.advanced_result_href
+
| language_dependant        || [[#bool|bool]]      || True if one value per language
|string
 
|Action URL for search form
 
|N/A
 
 
|}
 
|}
===Information page list===
+
 
{| class="wikitable"
+
====discount====
!Variable name
+
{|class="wikitable"
 +
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.information_pages.list
+
|id
|list of dictionaries
+
|[[#integer|integer]]
|Lists all active information pages
+
|The unique ID generated for the discount.
|
+
|-
{| class="wikitable"
+
|name
 +
|[[#string|string]]
 +
|The name selected for the discount.
 +
|}
 +
 
 +
Depending on the ''type'' field, there are additional fields:
 +
 
 +
{|class="wikitable"
 
!Key
 
!Key
 
!Type
 
!Type
 
!Description
 
!Description
 
|-
 
|-
|name
+
|type
|string
+
|[[#string|string]]
|Name of information page
+
|"bogo", for buy one get one free discounts.
 +
|-
 +
|required
 +
|[[#integer|integer]]
 +
|If at least ''required'' products are in the shopping cart,
 +
|-
 +
|free
 +
|[[#integer|integer]]
 +
|''free'' of the products will have their prices set to 0 when added to the shopping cart.
 +
|-
 +
|products
 +
|[[#list|list]] of [[#product|products]]
 +
|Products which count for this discount.
 +
|-
 +
|manufacturers
 +
|[[#list|list]] of [[#manufacturer|manufacturers]]
 +
|Manufacturers for which products count for this discount.
 
|-
 
|-
|href
+
|categories
|string
+
|[[#list|list]] of categories
|Link to information page
+
|Categories for which products count for this discount.
 
|-
 
|-
|active
+
|cart_matches
|boolean
+
|[[#integer|integer]]
|Is user currently on this page?
+
|Total count of products in the shopping cart that matches the products, manufacturers, or categories.
 
|-
 
|-
|target
+
|current_matches
|boolean
+
|[[#integer|integer]]
|True if information page expects the attribute target="_blank"
+
|Set to 1 on the product page if the current product matches one of the products, manufacturers, or categories; otherwise 0.
 
|}
 
|}
|}
+
 
===Language list===
+
{|class="wikitable"
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
|-
 
|boxes.languages.list
 
|list of dictionaries
 
|Lists all languages
 
|
 
{| class="wikitable"
 
 
!Key
 
!Key
 
!Type
 
!Type
 
!Description
 
!Description
 
|-
 
|-
|name
+
|type
|string
+
|[[#string|string]]
|Language name
+
|"total", for discounts based on the total cost of the shopping cart.
 +
|-
 +
|product
 +
|[[#product|product]]
 +
|The product to which this discount is applied.
 +
|-
 +
|price
 +
|[[#decimal|decimal]]
 +
|The new price for the selected product.
 +
|-
 +
|total_required
 +
|[[#decimal|decimal]]
 +
|The required cost of the shopping cart, not including tax.
 
|-
 
|-
|href
+
|total_current
|string
+
|[[#decimal|decimal]]
|Link to page that sets language to this one
+
|The current cost of the shopping cart, not including tax.
 
|-
 
|-
|image
+
|current_matches
|string
+
|[[#integer|integer]]
|Image (flag) for language if available
+
|Set to 1 on the product page for the selected product, otherwise 0.
 
|}
 
|}
|}
+
 
===Login box===
+
====partner====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| partners_id  || [[#integer|integer]]      || ID.
!Format
 
 
|-
 
|-
|boxes.login.form_href
+
| company_name  || [[#string|string]]        || Official company name.
|string
 
|Action link for login form
 
|N/A
 
 
|-
 
|-
|boxes.login.password_forgotten_href
+
| working_title || [[#string|string]]        || Used name.
|string
 
|Link to retrieve forgotten password page
 
|N/A
 
 
|-
 
|-
|boxes.login.account_history_href
+
| cin          || [[#string|string]]        || Registered company number.
|string
 
|Link to current customer's account history page. Contains orders and such
 
|N/A
 
 
|-
 
|-
|boxes.login.account_href
+
| address      || [[#string|string]]        || Address.
|string
 
|Link to current customer's account page
 
|N/A
 
 
|-
 
|-
|boxes.login.account_password_href
+
| zip          || [[#string|string]]        || Zip code.
|string
 
|''Unknown''
 
|N/A
 
 
|-
 
|-
|boxes.login.logoff_href
+
| city          || [[#string|string]]        || City.
|string
 
|Link to log off current customer
 
|N/A
 
 
|-
 
|-
|boxes.login.customer_first_name
+
| countries_id  || [[#integer|integer]]      || Country ID.
|string
+
|-
|Current customer's first name
+
| phone        || [[#string|string]]        || Phone number.
|N/A
+
|-
 +
| fax          || [[#string|string]]        || Fax number.
 +
|-
 +
| email        || [[#string|string]]        || Email address.
 +
|-
 +
| comments      || [[#string|string]]        || Internal comments.
 +
|-
 +
| status        || [[#boolean|boolean]]      || Enabled or disabled.
 +
|-
 +
| pickup        || [[#boolean|boolean]]      || Pickup of products.
 +
|-
 +
| reseller      || [[#boolean|boolean]]      || Is a reseller.
 +
|-
 +
| display      || [[#boolean|boolean]]      || Is displayed.
 +
|-
 +
| preferred    || [[#boolean|boolean]]      || The distance in distance calculations will be decreased by a configurable amount, see Inställningar - Leverans/Packning.
 +
|-
 +
| description  || [[#string|string]]        || Description.
 
|-
 
|-
|boxes.login.customer_last_name
+
| contacts      || [[#list|list]] of [[#dictionary|dictionaries]] ||
|string
 
|Current customer's last name
 
|N/A
 
|}
 
===News list===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.news.list
+
|first_name
|list of dictionaries
+
|[[#string|string]]
|Lists recent news. Limit set in administration
+
|Name.
|
+
|-
 +
|last_name
 +
|[[#string|string]]
 +
|Name.
 +
|-
 +
|email
 +
|[[#string|string]]
 +
|Email address.
 +
|}
 +
|-
 +
| images        || [[#list|list]] of [[#string|strings]] || Images.
 +
|-
 +
| open_hours    || [[#dictionary|dictionary]] of [[#integer|days]] to [[#dictionary|dictionaries]] ||
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 583: Rad 615:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|opens
|string
+
|[[#integer|integer]]
|News name
+
|Opening hour.
 
|-
 
|-
|href
+
|closes
|string
+
|[[#integer|integer]]
|Link to news page
+
|Closing hour.
|-
 
|summary
 
|string
 
|News summary
 
 
|}
 
|}
 
|}
 
|}
===Review===
+
===date===
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Method
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.reviews.write_review_href
+
|(treat object as string)
|string
+
|[[#string|string]]
|Link to write review page. Only set if customer is viewing a product page
+
|A string representation of the date, most of the time this is date_long(), otherwise date_short().
|N/A
 
 
|-
 
|-
|boxes.reviews.product
+
|timestamp()
|dictionary
+
|[[#integer|integer]]
|Product and review data
+
|Returns the timestamp represented by this date.
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
|-
 
|product_name
 
|string
 
|Name of product
 
|-
 
|product_image
 
|string
 
|Link to product image
 
|-
 
|review_href
 
|string
 
|Link to full review
 
 
|-
 
|-
|review_rating
+
|date_short()
|string
+
|[[#string|string]]
|Rating
+
|A string representation of the date, formatted using the language string DATE_FORMAT.
 
|-
 
|-
|review_text
+
|date_long()
|string
+
|[[#string|string]]
|Text of review
+
|A string representation of the date, formatted using the language string DATE_FORMAT_LONG.
 
|}
 
|}
|}
+
 
===Shopping cart===
+
==Globals==
 +
Globals are accessible anywhere in the templates, including macros.
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 645: Rad 655:
 
!Format
 
!Format
 
|-
 
|-
|boxes.shopping_cart.list
+
|template
|list of dictionaries
+
|[[#string|string]]
|List of products in shopping cart
+
|Path to active template directory
|
+
|N/A
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|id
+
|current_page
|integer
+
|[[#string|string]]
|ID of product
+
|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
 
|-
 
|-
|model
+
|current_script
|string
+
|[[#string|string]]
|Model number for product
+
|Contains filename of current page
 +
|index.php
 
|-
 
|-
|name
+
|request
|string
+
|[[#dictionary|dictionary]]
|Name of product
+
|A [[#dictionary|dictionary]] of recieved ''GET'' and ''POST'' data
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|image
+
|get
|string
+
|[[#dictionary|dictionary]]
|Link to image of product
+
|Data received from the ''GET'' query string
 
|-
 
|-
|quantity
+
|post
|string
+
|[[#dictionary|dictionary]]
|Number of this product in shopping cart
+
|Received ''POST'' data
 +
|}
 
|-
 
|-
|price
+
|current_customer_id
|string
+
|[[#integer|integer]]
|Price per product before discounts represented as a string with currency symbol
+
|Returns customer ID if customer is logged in, else None
 +
|N/A
 
|-
 
|-
|final_price
+
|customer
|string
+
|[[#dictionary|dictionary]]
|Price per product after discounts represented as a string with currency symbol
+
|Contains information about the logged in customer, or null.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|total_price
+
|id
|string
+
|[[#integer|integer]]
|Total price for all products of this kind before discounts represented as a string with currency symbol
+
|
 
|-
 
|-
|total_final_price
+
|email
|string
+
|[[#string|string]]
|Total price for all products of this kind after discounts represented as a string with currency symbol
+
|
 
|-
 
|-
|href
+
|personnummer
|string
+
|[[#string|string]]
|Link to product's page
+
|
 
|-
 
|-
|new
+
|first_name
|boolean
+
|[[#string|string]]
|''True'' if product was just added to the shopping cart
+
|
|}
 
 
|-
 
|-
|boxes.shopping_cart.total
+
|last_name
|string
+
|[[#string|string]]
|Total value of contents of shopping cart represented as a string with currency symbol
+
|
|N/A
 
|}
 
 
 
===Random special offer===
 
Contains a random special offer.
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.special_offers.product
+
|company
|dictionary
+
|[[#string|string]]
|''True'' if prices are displayed including VAT, else ''false''.
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|name
+
|telephone
|string
+
|[[#string|string]]
|Name of product
+
|
 
|-
 
|-
|href
+
|mobile
|string
+
|[[#string|string]]
|Link to product page
+
|
 +
|-
 +
|country_id
 +
|[[#integer|integer]]
 +
|
 +
|-
 +
|postcode
 +
|[[#string|string]]
 +
|
 +
|-
 +
|city
 +
|[[#string|string]]
 +
|
 
|-
 
|-
|image
+
|street_address
|string
+
|[[#string|string]]
|Link to product image
+
|
 
|-
 
|-
|price
+
|test_customer
|string
+
|[[#boolean|boolean]]
|Product standard price represented with currency symbol
+
|
 
|-
 
|-
|special_price
+
|custom
|string
+
|[[#list|list]] of [[#custom field|custom field]]
|Product price after discounts represented with currency symbol
+
|Custom fields.
 
|}
 
|}
|}
+
|-
===VAT select box===
+
|user_agent
 +
|[[#string|string]]
 +
|The client's user agent string.
 +
|N/A
 +
|-
 +
|meta
 +
|[[#dictionary|dictionary]]
 +
|Header meta information for current page.
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.vat_select.display_with_vat
+
|title
|boolean
+
|[[#HTML|HTML]]
|''True'' if prices are displayed including VAT, else ''false''.
+
|Page title.
|N/A
 
 
|-
 
|-
|boxes.vat_select.with_href
+
|keywords
|string
+
|[[#string|string]]
|URL to page where VAT display is set to ''true''.
+
|Page meta keywords.
|N/A
+
|-
 +
|description
 +
|[[#HTML|HTML]]
 +
|Page meta description.
 +
|-
 +
|language
 +
|[[#string|string]]
 +
|Page language code.
 +
|-
 +
|generator
 +
|[[#string|string]]
 +
|Startabutik E-handel.
 
|-
 
|-
|boxes.vat_select.without_href
+
|canonical
|string
+
|[[#URL|URL]]
|URL to page where VAT display is set to ''false''.
+
|Canonical URL for current page. Not always available.
|N/A
 
 
|}
 
|}
===Custom boxes===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.custom.boxes
+
|session
|dictionary of lists
+
|[[#dictionary|dictionary]]
|Dictionary of boxes, indexed by the box name.
+
|Configurable session variables.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 781: Rad 807:
 
!Description
 
!Description
 
|-
 
|-
|type
+
|market_id
|integer
+
|[[#integer|integer]]
|Type of box.
+
|ID of current market.
 
|-
 
|-
|class
+
|currency
|string
+
|[[#string|string]]
|CSS classes
+
|Code of selected currency.
|}
 
If type is 0:
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|title
+
|country_id
|string
+
|[[#integer|integer]]
|Box title.
+
|ID of selected country.
 
|-
 
|-
|product
+
|language
|product
+
|[[#string|string]]
|Product displayed.
+
|Code of selected language.
 +
|-
 +
|language_id
 +
|[[#integer|integer]]
 +
|ID of selected language.
 +
|-
 +
|vat
 +
|[[#boolean|boolean]]
 +
|Display prices with or without VAT.
 +
|-
 +
|group_id
 +
|[[#integer|integer]]
 +
|ID of active customer group in session
 +
|-
 +
|group_name
 +
|[[#string|string]]
 +
|Name of active customer group in session
 +
|-
 +
| reference_code
 +
|[[#string|string]]
 +
|Either value of query parameter vc och http referrer
 +
|.
 
|}
 
|}
If type is 1:
+
|-
 +
|settings
 +
|[[#dictionary|dictionary]]
 +
|Contains some of the settings defined in the administration
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 809: Rad 854:
 
!Description
 
!Description
 
|-
 
|-
|text
+
|ACCOUNT_COMPANY, ACCOUNT_DOB, ACCOUNT_GENDER, ACCOUNT_PERSONNUMMER, ACCOUNT_STATE, ACCOUNT_SUBURB
|HTML
+
|[[#boolean|boolean]]
|Box contents.
+
|Account fields can be enabled and disabled
|}
 
If type is 2:
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|image
+
|API_ID_FACEBOOK
|URL
+
|[[#string|string]]
|Box image.
+
|General APP id for Facebook
|}
 
|}
 
 
 
==Containboxes==
 
Available in login.html and create_account.html.
 
===Create account box (containboxes/create_account.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|containboxes.create_account.form_action
+
|API_ID_GOOGLE_VERIFICATION
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|Google verification
|N/A
 
 
|-
 
|-
|containboxes.create_account.text
+
|CHARSET
|HTML
+
|[[#string|string]]
|Box text
+
|Charset of page.
|N/A
+
|-
 +
|CREATE_ACCOUNT_LAYOUT
 +
|[[#integer|integer]]
 +
|''Internal''
 
|-
 
|-
|containboxes.create_account.generated_password
+
|DOWNLOAD_ENABLED
|string
+
|[[#boolean|boolean]]
|A randomly generated password
+
|Is the download module enabled
|N/A
 
 
|-
 
|-
|containboxes.create_account.customers_personnummer
+
|ENTRY_CITY_MIN_LENGTH, ENTRY_DOB_MIN_LENGTH, ENTRY_EMAIL_ADDRESS_MIN_LENGTH, ENTRY_FIRST_NAME_MIN_LENGTH, ENTRY_LAST_NAME_MIN_LENGTH, ENTRY_PASSWORD_MIN_LENGTH, ENTRY_POSTCODE_MIN_LENGTH, ENTRY_STATE_MIN_LENGTH, ENTRY_STREET_ADDRESS_MIN_LENGTH, ENTRY_TELEPHONE_MIN_LENGTH
|string
+
|[[#integer|integer]]
|The customer's personnummer
+
|Used in form validation
|N/A
 
 
|-
 
|-
|containboxes.create_account.sms_avisering
+
|ENTRY_PASSWORD_IN_REGISTRATION
|boolean
+
|[[#boolean|boolean]]
|N/A
+
|Is the user allowed to specify a password when registering
|N/A
 
 
|-
 
|-
|containboxes.create_account.countries
+
|FORMS_USE_CAPTCHA
|association list
+
|[[#boolean|boolean]]
|A list of country names mapped to their indices.
+
|Is captcha used for forms
|Array of string to integer mappings.
 
|}
 
===Login box (containboxes/login_box.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|containboxes.login_box.form_action
+
|FACEBOOK_PROFILE_URL
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|URL in format http://url.se/subfolder/
|N/A
 
|}
 
===Password forgotten box (containboxes/password_forgotten_box.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|containboxes.password_forgotten_box.form_action
+
|GOOGLEPLUS_PROFILE_URL
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|URL in format http://url.se/subfolder/
|N/A
 
|}
 
 
 
==Modules==
 
 
 
===associated_products.html===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|modules.associated_products.products
+
|HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT
|list of products
+
|[[#integer|integer]]
|Associated products.
+
|Width and height of heading images
|N/A
 
|}
 
 
 
===downloads.php===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|downloads.downloads
+
|INVOICE_ORG_NUMBER
|list of dictionaries
+
|[[#string|string]]
|Available downloads
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|href
+
|INVOICE_STORE_ADDRESS
|URL
+
|[[#string|string]]
|Download link
+
|
 
|-
 
|-
|expiry
+
|INVOICE_STORE_POST_ADDRESS
|string
+
|[[#string|string]]
|Download expiry date
+
|
 
|-
 
|-
|valid
+
|INVOICE_TELEPHONE
|boolean
+
|[[#string|string]]
|Is the download valid?
+
|
 
|-
 
|-
|download_count
+
|MAX_ADDRESS_BOOK_ENTRIES
|integer
+
|[[#integer|integer]]
|Download count
+
|Maximum entries in the address book
 
|-
 
|-
|product_name
+
|PREV_NEXT_BAR_LOCATION
|string
+
|[[#integer|integer]]
|Product name
+
|''Internal''
|}
+
|-
 +
|SMALL_IMAGE_WIDTH
 +
|[[#integer|integer]]
 +
|Width of small thumbnails in pixels
 +
|-
 +
|SMALL_IMAGE_HEIGHT
 +
|[[#integer|integer]]
 +
|Height of small thumbnails in pixels
 
|-
 
|-
|downloads.account_history_info
+
|STATISTICS_GOOGLE_ANALYTICS
|boolean
+
|[[#string|string]]
|Is this module included from the order info page?
+
|Google analytics tracking code, if specified
|N/A
 
 
|-
 
|-
|downloads.account_href
+
|SHOP_HEADER_TEXT
|URL
+
|[[#string|string]]
|A link to the account page.
+
|Alt text for logo
|N/A
 
|}
 
 
 
===product_attributes.html===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|modules.product_attributes.attributes
+
|SHOP_FAVICON
|list of dictionaries
+
|[[#string|string]]
|Product attributes.
+
|Shop favicon in /images/
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|value
+
|SHOP_LOGO
|string
+
|[[#string|string]]
|Attribute value.
+
|Shop logo in /images/
 
|-
 
|-
|id
+
|SHOP_LOGO_280_80
|integer
+
|[[#string|string]]
|Attribute index.
+
|Shop logo for invoices in /images/
 
|-
 
|-
|name
+
|SHOP_SHARE_IMAGE
|string
+
|[[#string|string]]
|Attribute name.
+
|Shop social media share image in /images/
 
|-
 
|-
|type
+
|STANDARD_SORT_ORDER
|integer
+
|[[#string|string]]
|Attribute type.
+
|Column that the product should be sorted on
 
|-
 
|-
|selected
+
|STOCK_NOTIFY_ON_RESTOCK_LIMIT
|integer
+
|[[#int|int]]
|Selected attribute.
+
|Gränsvärde för bevakning av produkters lagersaldo
 
|-
 
|-
|options
+
|STORE_NAME
|list of index to value mappings
+
|[[#string|string]]
|Attribute options.
+
|
|}
+
|-
|}
+
|POPUP_IMAGE_WIDTH, POPUP_IMAGE_HEIGHT
 
+
|[[#integer|integer]]
===product_specifications.html===
+
|
 +
|-
 +
|PRODUCT_PAGE_DESIGN
 +
|[[#integer|integer]]
 +
|''Internal''
 +
|-
 +
|YOUTUBE_PROFILE_URL
 +
|[[#string|string]]
 +
|URL in format http://url.se/subfolder/
 +
|-
 +
|TWITTER_PROFILE_URL
 +
|[[#string|string]]
 +
|URL in format http://url.se/subfolder/
 +
|-
 +
|TIKTOK_PROFILE_URL
 +
|[[#string|string]]
 +
|URL in format http://url.se/subfolder/
 +
|-
 +
|PRICE_LOG
 +
|[[#list|list]]
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|modules.product_specifications.specifications
+
|DISPLAY_LOGGED_PRICES
|list of dictionaries
+
|[[#boolean|boolean]]
|Product specifications.
+
|Dictates whether logged prices should be shown in the store
 +
|}
 +
|-
 +
|TWEAKWISE
 +
|[[#list|list]]
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 010: Rad 1 011:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|ENABLED
|string
+
|[[#boolean|boolean]]
|Specification name.
+
|If Tweakwise is enabled. Depends on several factors.
|-
 
|value
 
|string
 
|Specification value.
 
 
|}
 
|}
 
|}
 
|}
 
===products_in_package.html===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|modules.products_in_package.products
+
|shoppingcart_amount
|list of products
+
|[[#string|string]]
|Products in product package.
+
|Amount of products in shopping cart
 +
|N/A
 +
|-
 +
|shoppingcart_total
 +
|[[#string|string]]
 +
|Total sum of the content in shopping cart
 
|N/A
 
|N/A
 
|}
 
|}
  
===products_reviews.html===
+
==Boxes==
 +
Boxes are variables used for the side boxes. They are all prefixed with ''boxes''.
 +
===Category menu===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 040: Rad 1 037:
 
!Format
 
!Format
 
|-
 
|-
|modules.products_reviews.form_action
+
|boxes.categories.tree
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Form handler.
+
|Contains a tree of displayed categories in menu
|N/A
 
|-
 
|modules.products_reviews.error
 
|string
 
|Error message.
 
|N/A
 
|-
 
|modules.products_reviews.customer
 
|dictionary
 
|Customer information.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 059: Rad 1 046:
 
!Description
 
!Description
 
|-
 
|-
|firstname
+
|id
|string
+
|[[#integer|integer]]
|First name.
+
|Id of category
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Name of category in current language
 
|-
 
|-
|lastname
+
|image
|string
+
|[[#string|string]]
|Last name.
+
|Path to category image if such exists
|}
 
 
|-
 
|-
|modules.products_reviews.reviews
+
|icon
|list of dictionaries
+
|[[#string|string]]
|Product reviews.
+
|Path to category icon if such exists
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|rating
+
|href
|integer
+
|[[#string|string]]
|Review rating, 1-5.
+
|Link to category's product listing page
 +
|-
 +
|child_count
 +
|[[#integer|integer]]
 +
|Number of open child categories
 +
|-
 +
|children
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|List of visible child categories. See boxes.categories.tree for format
 
|-
 
|-
|author
+
|description
|string
+
|[[#string|string]]
|Review author.
+
|
 
|-
 
|-
|date
+
|open
|string
+
|[[#boolean|boolean]]
|Review date.
+
|Returns true if the category (or one of its children) is the currently selected one
 
|-
 
|-
|text
+
|selected
|HTML
+
|[[#boolean|boolean]]
|Review text.
+
|Returns true if the category is the currently selected one
 
|}
 
|}
 
|}
 
|}
  
===products_variants.html===
+
===Category full menu===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 102: Rad 1 095:
 
!Format
 
!Format
 
|-
 
|-
|modules.products_variants.category
+
|boxes.categories_full.tree
|integer
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Category index.
+
|Contains a full tree of all available categories in menu
|N/A
 
|-
 
|modules.products_variants.variants
 
|list of dictionaries
 
|Variants.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 115: Rad 1 103:
 
!Type
 
!Type
 
!Description
 
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Id of category
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Variant name
+
|Name of category in current language
 
|-
 
|-
|selected
+
|image
|integer
+
|[[#string|string]]
|Selected variant.
+
|Path to category image if such exists
 +
|-
 +
|icon
 +
|[[#string|string]]
 +
|Path to category icon if such exists
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to category's product listing page
 +
|-
 +
|child_count
 +
|[[#integer|integer]]
 +
|Number of open child categories
 
|-
 
|-
|options
+
|children
|list of integer to value mappings
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Variants.
+
|List of visible child categories. See boxes.categories.tree for format
|}
 
 
|-
 
|-
|modules.products_variants.products
+
|description
|list of dictionaries
+
|[[#string|string]]
|Variants.
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|seo_link
+
|open
|URL
+
|[[#boolean|boolean]]
|Variant URL.
+
|Returns true if the category (or one of its children) is the currently selected one
 
|-
 
|-
|name
+
|selected
|string
+
|[[#boolean|boolean]]
|Variant name.
+
|Returns true if the category is the currently selected one
 
|}
 
|}
 
|}
 
|}
  
===tell_a_friend.html===
+
===Best selling products===
 +
Lists the most sold products.
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|modules.tell_a_friend.form_action
+
|boxes.bestsellers.list
|URL
+
|[[#list|list]] of [[#product|product]]
|Form handler.
+
|The most sold products, the most sold first.
|N/A
 
 
|}
 
|}
  
==Page specific==
+
===Manufacturer select===
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)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 171: Rad 1 165:
 
!Format
 
!Format
 
|-
 
|-
|account_edit.form_action
+
|boxes.manufacturers.list
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|A link to the page which handles the form
+
|Lists all available manufacturers
|N/A
 
|-
 
|account_edit.back_href
 
|URL
 
|A link back to the account page
 
|N/A
 
|-
 
|account_edit.account
 
|dictionary
 
|Account data
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 190: Rad 1 174:
 
!Description
 
!Description
 
|-
 
|-
|firstname
+
|id
|string
+
|[[#integer|integer]]
|Account first name
+
|Manufacturer ID.
 
|-
 
|-
|lastname
+
|name
|string
+
|[[#string|string]]
|Account last name
+
|Name of manufacturer
 
|-
 
|-
|personnummer
+
|href
|string
+
|[[#string|string]]
|Account personnummer
+
|Link to manufacturer page
 
|-
 
|-
|dob
+
|link
|string
+
|[[#URL|URL]]
|Account date of birth
+
|Full link to manufacturer page
 +
|
 
|-
 
|-
|email_address
+
|selected
|string
+
|[[#boolean|boolean]]
|Account email address
+
|True if the manufacturer_id GET variable is equal to the ID of this manufacturer.
 +
|}
 +
|}
 +
 
 +
===Country selection===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|telephone
+
|boxes.countries.list
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Account telephone number
+
|Lists all available countries
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Country ID.
 
|-
 
|-
|mobile
+
|name
|string
+
|[[#string|string]]
|Account mobile telephone number
+
|Name of country.
 
|-
 
|-
|fax
+
|href
|string
+
|[[#string|string]]
|Account fax number
+
|Link to current page with country added as a request parameter.
 
|-
 
|-
|gender
+
|image
|string
+
|[[#URL|URL]]
|Account gender ('m' or 'f')
+
|A flag for the country.
 
|}
 
|}
 
|}
 
|}
  
===Account history page (account_history.html)===
+
===Market selection===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 235: Rad 1 238:
 
!Format
 
!Format
 
|-
 
|-
|account_history.account_href
+
|boxes.markets.list
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|A link back to the account page
+
|Lists all available markets
|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
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 260: Rad 1 248:
 
|-
 
|-
 
|id
 
|id
|integer
+
|[[#integer|integer]]
|Order ID
+
|Market ID.
 +
|-
 +
|href
 +
|[[#URL|URL]]
 +
|Link to current page with market_id added as a request parameter.
 
|-
 
|-
|status
+
|standard_country_id
|string
+
|[[#integer|integer]]
|Order status
+
|The standard country selection for the market.
 
|-
 
|-
|date
+
|standard_country_code
|string
+
|[[#string|string]]
|Order date
+
|The code for the standard country selection for the market.
 +
|-
 +
|countries
 +
|[[#array|array]]
 +
|An array containing all the countries connected to the market
 +
|-
 +
|language
 +
|[[#string|string]]
 +
|Code of language selected for market.
 +
|-
 +
|language_id
 +
|[[#integer|integer]]
 +
|Id of language selected for market.
 +
|-
 +
|locale
 +
|[[#string|string]]
 +
|
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|An image for the market.
 +
|-
 +
|domain_name
 +
|[[#string|string]]
 +
|Link to current page at the market domain.
 +
|-
 +
|domain_name_href
 +
|[[#URL|URL]]
 +
|
 +
|-
 +
|url_prefix
 +
|[[#string|string]]
 +
|
 
|-
 
|-
|type
+
|currency_code
|string
+
|[[#string|string]]
|Order type
+
|
 
|-
 
|-
|name
+
|currency_id
|string
+
|[[#integer|integer]]
|Order delivery name
+
|
 
|-
 
|-
|product_count
+
|customer_group_id
|integer
+
|[[#integer|integer]]
|Product count
+
|
 
|-
 
|-
|total
+
|name
|string
+
|[[#string|string]]
|Order total
+
|Name of market.
 
|-
 
|-
|href
+
|description
|URL
+
|[[#string|string]]
|A link to the description of the order
+
|
 
|-
 
|-
 +
|share_customers
 +
|[[#bool|bool]]
 +
|
 
|}
 
|}
 
|}
 
|}
  
===Order info page (account_history_info.html)===
+
===Search box===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 301: Rad 1 328:
 
!Format
 
!Format
 
|-
 
|-
|account_history_info.back_href
+
|boxes.search.advanced_href
|URL
+
|[[#string|string]]
|Link back to the account order history
+
|URL to advanced search page
 
|N/A
 
|N/A
 
|-
 
|-
|account_history_info.order
+
|boxes.search.advanced_result_href
|dictionary
+
|[[#string|string]]
|Order info
+
|Action URL for search form
 +
|N/A
 +
|}
 +
===Information page list===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|boxes.information_pages.list
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Lists all active information pages
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 315: Rad 1 354:
 
!Description
 
!Description
 
|-
 
|-
|id_formatted
+
|id
|string
+
|[[#integer|integer]]
|Order ID
+
|ID.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Name of information page
 
|-
 
|-
|status
+
|href
|string
+
|[[#string|string]]
|Order status
+
|Link to information page
 
|-
 
|-
|date
+
|active
|string
+
|[[#boolean|boolean]]
|Order date
+
|Is user currently on this page?
 
|-
 
|-
|total
+
|target
|string
+
|[[#boolean|boolean]]
|Order total
+
|True if information page expects the attribute target="_blank"
 
|-
 
|-
|shipping_method
+
|parent_id
|string
+
|[[#integer|integer]]
|Order shipping method
+
|Parent page ID
 
|-
 
|-
|payment_method
+
|date
|string
+
|[[#date|date]]
|Order payment method
+
|Last updated date
 
|-
 
|-
|tax_group_count
+
|publish_date_from
|integer
+
|[[#date|date]]
|Number of different tax groups
+
|Publish date start
 +
|-
 +
|publish_date_to
 +
|[[#date|date]]
 +
|Publish date end
 +
|-
 +
|short_description
 +
|[[#string|string]]
 +
|Short page description
 +
|-
 +
|extra1
 +
|[[#string|string]]
 +
|Custom page field
 +
|-
 +
|extra2
 +
|[[#string|string]]
 +
|Custom page field
 +
|-
 +
|extra3
 +
|[[#string|string]]
 +
|Custom page field
 
|-
 
|-
|billing_address
+
|extra4
|string
+
|[[#string|string]]
|Order billing address
+
|Custom page field (language dependent)
 
|-
 
|-
|delivery_address
+
|extra5
|string
+
|[[#string|string]]
|Order delivery address
+
|Custom page field (language dependent)
 
|-
 
|-
|delivery
+
|images
|boolean
+
|[[#list|list]] of [[#URL|URLs]]
|
+
|Images set for this page
 
|-
 
|-
|products
+
|categories
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Products in order
+
|Categories set for this page (only shown if cright 141 is set).
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 1 363: Rad 1 426:
 
!Description
 
!Description
 
|-
 
|-
|qty
+
|id||[[#integer|integer]]||Category index.
|integer
 
|Product quantity
 
|-
 
|id
 
|integer
 
|Product ID
 
|-
 
|name
 
|string
 
|Product name
 
 
|-
 
|-
|model
+
|name||[[#string|string]]||Category name.
|string
 
|Product model
 
 
|-
 
|-
|tax
+
|href||[[#URL|URL]]||Category link.
|decimal
 
|Product tax
 
 
|-
 
|-
|price
+
|seo_link||[[#URL|URL]]||Category relative link.
|decimal
+
|}
|Product price
 
|-
 
|final_price
 
|decimal
 
|Final product price
 
 
|-
 
|-
 +
|tags
 +
|[[#list|list]] of [[#tag|tags]]
 +
|Tags set for this page (only shown if cright 141 is set).
 
|}
 
|}
 
|-
 
|-
|totals
+
|boxes.information_pages.tree
|list of dictionaries
+
|[[#dictionary|dictionaries]]
|Order parts of total
+
|A tree of *all* information pages.
 +
|
 +
This field consists of an entry with the same format as the entries in the information page list, with the addition of two fields:
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 1 401: Rad 1 450:
 
!Description
 
!Description
 
|-
 
|-
|title
+
|open
|string
+
|[[#boolean|boolean]]
|Total part label
+
|True if one of the children is active or open.
 
|-
 
|-
|text
+
|children
|HTML
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Total part value
+
|A list of child galleries, each with the same format as this entry.
 +
|}
 
|}
 
|}
 +
 +
===Language list===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|statuses
+
|boxes.languages.list
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Order statuses
+
|Lists all languages
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 1 419: Rad 1 477:
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Status name
+
|Language name
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to page that sets language to this one
 
|-
 
|-
|date
+
|image
|string
+
|[[#string|string]]
|Status date
+
|Image (flag) for language if available
 
|-
 
|-
|comments
+
|code
|string
+
|[[#string|string]]
|Status comments
+
|Language two-letter code
 +
|}
 
|}
 
|}
|-
+
 
|events
+
===Login box===
|list of dictionaries
 
|Order delivery events
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|date
+
|boxes.login.form_href
|string
+
|[[#string|string]]
|Event date
+
|Action link for login form
 +
|N/A
 
|-
 
|-
|location
+
|boxes.login.password_forgotten_href
|string
+
|[[#string|string]]
|Event location
+
|Link to retrieve forgotten password page
 +
|N/A
 
|-
 
|-
|description
+
|boxes.login.account_history_href
|string
+
|[[#string|string]]
|Event description
+
|Link to current customer's account history page. Contains orders and such
|}
 
|}
 
|}
 
 
 
===Account page (account.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
|-
 
|account.account_history_href
 
|URL
 
|A link to the account history page
 
 
|N/A
 
|N/A
 
|-
 
|-
|account.account_edit_href
+
|boxes.login.account_href
|URL
+
|[[#string|string]]
|A link to the edit account page
+
|Link to current customer's account page
 
|N/A
 
|N/A
 
|-
 
|-
|account.address_book_href
+
|boxes.login.account_password_href
|URL
+
|[[#string|string]]
|A link to the address book page
+
|''Unknown''
 
|N/A
 
|N/A
 
|-
 
|-
|account.account_password_href
+
|boxes.login.logoff_href
|URL
+
|[[#string|string]]
|A link to the password change page
+
|Link to log off current customer
 
|N/A
 
|N/A
 
|-
 
|-
|account.logoff_href
+
|boxes.login.customer_first_name
|URL
+
|[[#string|string]]
|A link to the logoff page
+
|Current customer's first name
 
|N/A
 
|N/A
 
|-
 
|-
|account.account_newsletters_href
+
|boxes.login.customer_last_name
|URL
+
|[[#string|string]]
|A link to the newsletters page
+
|Current customer's last name
 
|N/A
 
|N/A
 +
|}
 +
===New products list===
 +
Lists the most recently added products.
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 
|-
 
|-
|account.account_notifications_href
+
|boxes.products_new.list
|URL
+
|[[#list|list]] of [[#product|product]]
|A link to the notifications page
+
|The most recently added products, the most recent first.
|N/A
+
|}
 +
===News list===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|account.order_history_enabled
+
|boxes.news.list
|boolean
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Is the order history enabled?
+
|Lists recent news. Limit set in administration
|N/A
 
|-
 
|account.order_history
 
|list of dictionaries
 
|Order history
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 509: Rad 1 567:
 
!Type
 
!Type
 
!Description
 
!Description
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|Assigned image
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|News name
 
|-
 
|-
 
|href
 
|href
|URL
+
|[[#string|string]]
|A link to the order description page
+
|Link to news page
 
|-
 
|-
 
|date
 
|date
|string
+
|[[#date|date]]
|The date the order was placed
+
|Date posted.
 
|-
 
|-
|id
+
|summary
|integer
+
|[[#string|string]]
|Order ID
+
|News summary
|-
 
|country
 
|string
 
|Order delivery name and country
 
|-
 
|status
 
|string
 
|Order status
 
|-
 
|total
 
|HTML
 
|Order total
 
 
|}
 
|}
 
|}
 
|}
  
===Account newsletter subscription page (account_newsletters.html)===
+
===Hierarchical news list===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 543: Rad 1 597:
 
!Format
 
!Format
 
|-
 
|-
|account_newsletters.form_action
+
|boxes.news_archive.year_min
|URL
+
|[[#integer|integer]]
|A link to the page which handles the form
+
|Year with first news post.
|N/A
 
|-
 
|account_newsletters.back_href
 
|URL
 
|Link back to the account page
 
 
|N/A
 
|N/A
 
|-
 
|-
|account_newsletters.subscribed
+
|boxes.news_archive.year_max
|boolean
+
|[[#integer|integer]]
|Is the user subscribed to the newsletter
+
|Year with last news post.
 
|N/A
 
|N/A
|}
 
 
===Account notifications page (account_notifications.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|account_notifications.form_action
+
|boxes.news_archive.month_min
|URL
+
|[[#integer|integer]]
|A link to the page which handles the form
+
|Month of first news post.
 
|N/A
 
|N/A
 
|-
 
|-
|account_notifications.account_href
+
|boxes.news_archive.month_max
|URL
+
|[[#integer|integer]]
|A link back to the account page
+
|Month of last news post.
 
|N/A
 
|N/A
 
|-
 
|-
|account_notifications.products
+
|boxes.news_archive.news
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|The products subscribed to
+
|News grouped first by year and then by month, the final array keys have this format:
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 585: Rad 1 626:
 
!Description
 
!Description
 
|-
 
|-
|id
+
|image
|integer
+
|[[#URL|URL]]
|Product ID
+
|Assigned image
 +
|-
 +
|title
 +
|[[#string|string]]
 +
|News name
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to news page
 
|-
 
|-
|name
+
|date
|string
+
|[[#date|date]]
|Product name
+
|Date posted.
 
|-
 
|-
|counter
+
|short
|integer
+
|[[#string|string]]
|List index
+
|News summary
 
|}
 
|}
|-
 
|account_notifications.global_product_notifications
 
|boolean
 
|Has the user enabled the global product notification setting
 
|N/A
 
 
|}
 
|}
  
===Change account password page (account_password.html)===
+
===Review===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 611: Rad 1 655:
 
!Format
 
!Format
 
|-
 
|-
|account_password.form_action
+
|boxes.reviews.write_review_href
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|Link to write review page. Only set if customer is viewing a product page
 
|N/A
 
|N/A
 
|-
 
|-
|account_password.back_href
+
|boxes.reviews.product
|URL
+
|[[#dictionary|dictionary]]
|Link back to the account page
+
|Product and review data
|N/A
+
|
|}
 
 
 
===New account password page (account_password_new.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|account_password_new.form_action
+
|product_name
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|Name of product
|N/A
+
|-
 +
|product_image
 +
|[[#string|string]]
 +
|Link to product image
 +
|-
 +
|review_href
 +
|[[#string|string]]
 +
|Link to full review
 
|-
 
|-
|account_password_new.back_href
+
|review_rating
|URL
+
|[[#string|string]]
|Link back to the account page
+
|Rating
|N/A
 
 
|-
 
|-
|account_password_new.password_provided
+
|review_text
|boolean
+
|[[#string|string]]
|Is a password provided by the user, or the default password
+
|Text of review
|N/A
+
|}
 
|}
 
|}
 
+
===Shopping cart===
===Address book page (address_book.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 652: Rad 1 697:
 
!Format
 
!Format
 
|-
 
|-
|address_book.back_href
+
|boxes.shopping_cart.list
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|A link back to the account page
+
|List of products in shopping cart
|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
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 681: Rad 1 706:
 
!Description
 
!Description
 
|-
 
|-
|default
+
|id
|boolean
+
|[[#integer|integer]]
|Is this the default address book entry
+
|ID of product
 
|-
 
|-
|edit_href
+
|data
|URL
+
|[[#dictionary|dictionary]]
|A link to edit the entry
+
|Custom data stored on the shopping cart entry.
 
|-
 
|-
|delete_href
+
|model
|URL
+
|[[#string|string]]
|A link to delete the entry
+
|Model number for product
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Associated name
+
|Name of product
 
|-
 
|-
|address
+
|image
|HTML
+
|[[#string|string]]
|The address
+
|Link to image of product
|}
 
|}
 
 
 
===Address book modification page (address_book_process.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|address_book_process.editing
+
|quantity
|boolean
+
|[[#string|string]]
|Is the page in the editing mode?
+
|Number of this product in shopping cart
|N/A
 
 
|-
 
|-
|address_book_process.deleting
+
|unit
|boolean
+
|
|Is the page in the deletion mode?
+
|
|N/A
 
 
|-
 
|-
|address_book_process.edit_form_action
+
|type
|URL
+
|[[#string|string]]
|A link to a page which handles the editing form
+
|
|N/A
 
 
|-
 
|-
|address_book_process.delete_form_action
+
|price
|URL
+
|[[#string|string]]
|A link to a page which handles the deletion form
+
|Price per product before discounts represented as a string with currency symbol
|N/A
 
 
|-
 
|-
|address_book_process.address_label
+
|final_price
|HTML
+
|[[#string|string]]
|The address
+
|Price per product after discounts represented as a string with currency symbol
|N/A
 
 
|-
 
|-
|address_book_process.back_href
+
|total_price
|URL
+
|[[#string|string]]
|A back link
+
|Total price for all products of this kind before discounts represented as a string with currency symbol
|N/A
 
 
|-
 
|-
|address_book_process.address_book_href
+
|total_final_price
|URL
+
|[[#string|string]]
|A link to the address_book
+
|Total price for all products of this kind after discounts represented as a string with currency symbol
|N/A
 
 
|-
 
|-
|address_book_process.process
+
|href
|boolean
+
|[[#string|string]]
|Is the page in the processing mode?
+
|Link to product's page
|N/A
 
 
|-
 
|-
|address_book_process.default_address
+
|new
|boolean
+
|[[#boolean|boolean]]
|Is this the default address?
+
|''True'' if product was just added to the shopping cart
|N/A
 
 
|-
 
|-
|address_book_process.entry
+
|discounts
|dictionary
+
|[[#list|list]] of [[#discount|discounts]]
|The fields in the current entry
+
|
 +
|}
 +
|-
 +
|boxes.shopping_cart.total
 +
|[[#string|string]]
 +
|Total value of contents of shopping cart represented as a string with currency symbol
 +
|N/A
 +
|-
 +
|boxes.shopping_cart.total_items
 +
|[[#integer|integer]]
 +
|Sum of product quantities.
 +
|N/A
 +
|}
 +
 
 +
===Random special offer===
 +
Contains a random special offer.
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|boxes.special_offers.product
 +
|[[#dictionary|dictionary]]
 +
|''True'' if prices are displayed including VAT, else ''false''.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 764: Rad 1 795:
 
!Description
 
!Description
 
|-
 
|-
|male
+
|name
|boolean
+
|[[#string|string]]
|Male gender?
+
|Name of product
 
|-
 
|-
|firstname
+
|href
|string
+
|[[#string|string]]
|First name
+
|Link to product page
 
|-
 
|-
|lastname
+
|image
|string
+
|[[#string|string]]
|Last name
+
|Link to product image
 
|-
 
|-
|company
+
|price
|string
+
|[[#string|string]]
|Company
+
|Product standard price represented with currency symbol
 
|-
 
|-
|street_address
+
|special_price
|string
+
|[[#string|string]]
|Street address
+
|Product price after discounts represented with currency symbol
|-
+
|}
|suburb
 
|string
 
|Suburb
 
|-
 
|postcode
 
|string
 
|Post code
 
|-
 
|city
 
|string
 
|City
 
|-
 
|country_list
 
|HTML
 
|A drop-down list with countries
 
|-
 
|state_has_zones
 
|boolean
 
|Does the state have zones?
 
|-
 
|state
 
|string
 
|State
 
|-
 
|states
 
|association list
 
|A list of zones in the state
 
 
|}
 
|}
|}
+
===VAT select box===
 
 
===Advanced search page (advanced_search.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 821: Rad 1 823:
 
!Format
 
!Format
 
|-
 
|-
|advanced_search.form_action
+
|boxes.vat_select.display_with_vat
|string
+
|[[#boolean|boolean]]
|A link to the page which handles the form.
+
|''True'' if prices are displayed including VAT, else ''false''.
 
|N/A
 
|N/A
 
|-
 
|-
|advanced_search.categories
+
|boxes.vat_select.with_href
|association list
+
|[[#string|string]]
|A list of category names mapped to their indices.
+
|URL to page where VAT display is set to ''true''.
|Array of string to integer mappings.
+
|N/A
 
|-
 
|-
|advanced_search.manufacturers
+
|boxes.vat_select.without_href
|association list
+
|[[#string|string]]
|A list of manufacturer names mapped to their indices.
+
|URL to page where VAT display is set to ''false''.
|Array of string to integer mappings.
+
|N/A
 
|}
 
|}
 
+
===Custom boxes===
===Search results page (advanced_search_results.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                       !! Type             !! Description !! Format
+
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
| advanced_search_results.results    || list of products || The search results. ||N/A
+
|boxes.custom.boxes
 +
|[[#dictionary|dictionary]] of lists
 +
|Dictionary of boxes, indexed by the box name.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
| advanced_search_results.num_results || integer         || The number of search results. || N/A
+
|type
 +
|[[#integer|integer]]
 +
|Type of box.
 
|-
 
|-
| advanced_search_results.back_href  || URL              || A link for returning to the search page. || N/A
+
|class
|}
+
|[[#string|string]]
 
+
|CSS classes
===Campaign page (campaign.html)===
 
{| class="wikitable"
 
!Variable name                  !! Type            !! Description !! Format
 
 
|-
 
|-
| campaign.campaign_name        || HTML            || Title of campaign. ||N/A
+
|extra_field_1
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| campaign.campaign_description || HTML            || Description of campaign. ||N/A
+
|extra_field_2
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| campaign.campaign_image      || URL              || Selected campaign image. ||N/A
+
|extra_field_3
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| campaign.products            || list of products || Products included in campaign. ||N/A
+
|sort_order
 +
|[[#integer|integer]]
 +
|Sort order.
 +
|
 
|}
 
|}
 
+
If type is 0:
===Product list (categories_listing.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                            !! Type                 !! Description !! Format
+
!Key
 +
!Type
 +
!Description
 
|-
 
|-
| categories_listing.header                || dictionary          || Attributes for the top of the page. It is either a manufacturer or a category ||
+
|title
{| class="wikitable"
+
|[[#string|string]]
! Key !! Type !! Description
+
|Box title.
 
|-
 
|-
| name  || string || Name of category/manufacturer
+
|product
|-
+
|product
| image || string || Image URL for category/manufacturer
+
|Product displayed.
|-
 
| text  || HTML  || Description of category/manufacturer
 
 
|}
 
|}
 +
If type is 1:
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
| categories_listing.header                || dictionary          || Page header attributes: image, description and title ||
+
|text
|-
+
|[[#HTML|HTML]]
| categories_listing.page_limit            || integer              || Maximum number of products per page || N/A
+
|Box contents.
|-
 
| 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.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 || [[Templating:Variables#product|Product list]]
 
|-
 
| categories_listing.product_count        || integer              || Total number of products using current filters || 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_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
 
|-
 
| categories_listing.default_list_style    || integer              || By default this layout for the listing is selected || N/A
 
|-
 
| categories_listing.tags                  || list of tags        || Root tags for which at least one subtag is used by one of the listed products. || N/A
 
 
|}
 
|}
 
+
If type is 2:
===Checkout success (checkout_success.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|checkout_success.update_action
+
|image
|URL
+
|[[#URL|URL]]
|A link to the page which handles the form
+
|Box image.
 +
|}
 +
|}
 +
 
 +
==Modules==
 +
 
 +
===last_viewed_products===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|modules.last_viewed_products.register
 +
|[[#HTML|HTML]]
 +
|Contains either the empty string, or a script element with code for updating the cookie containing the list of the last viewed products. Should be included on product pages.
 +
|-
 +
|modules.last_viewed_products.products
 +
|[[#list|list]] of [[#product|products]]
 +
|The products the customer last viewed, the most recently viewed product first, the current product is excluded. Contains up to 30 products.
 +
|}
 +
 
 +
===product_parent===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|modules.product_parent.name
 +
|[[#string|string]]
 +
|Parent product name.
 
|N/A
 
|N/A
 
|-
 
|-
|checkout_success.heading
+
|modules.product_parent.description
|string
+
|[[#string|string]]
|Page heading
+
|Parent product description.
 
|N/A
 
|N/A
 
|-
 
|-
|checkout_success.text
+
|modules.product_parent.image
|HTML
+
|[[#string|string]]
|Page content
+
|Parent product image.
 
|N/A
 
|N/A
 
|-
 
|-
|checkout_success.order_id
+
|modules.product_parent.images
|integer
+
|[[#string|string]]
|Order ID
+
|Parent product additional images.
 
|N/A
 
|N/A
|-
+
|}
|checkout_success.survey_questions
+
 
|list of dictionaries
+
===associated_products.html===
|Survey questions
 
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|id
+
|modules.associated_products.products
|integer
+
|[[#list|list]] of products
|Question ID
+
|Associated products.
|-
+
|N/A
|question
+
|}
|string
+
 
|Question
+
===random_products.html===
|-
 
|alternatives
 
|list of dictionaries
 
|Question alternatives
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|type
+
|modules.random_products.products
|integer
+
|[[#list|list]] of products
|Alternative type, 1 for a radio button, an input field otherwise
+
|Random products.
|-
+
|N/A
|id
 
|integer
 
|Alternative ID
 
|-
 
|answer
 
|string
 
|Alternative text
 
|-
 
|}
 
|}
 
 
|}
 
|}
  
===Contact us page (contact.html)===
+
===product_attributes.html===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 982: Rad 1 993:
 
!Format
 
!Format
 
|-
 
|-
|contact.form_href
+
|modules.product_attributes.attributes
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|URL with target of form for handling user input data
+
|Product attributes.
|N/A
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|contact.captcha
+
|value
|boolean
+
|[[#string|string]]
|Determines whether Captcha should be used or not
+
|Attribute value.
|N/A
+
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Attribute index.
 
|-
 
|-
|contact.name
+
|name
|String
+
|[[#string|string]]
|Contains customer name if customer is logged in or validation if validation of a field failed
+
|Attribute name.
|N/A
 
 
|-
 
|-
|contact.email
+
|type
|string
+
|[[#integer|integer]]
|Contains customer e-mail if customer is logged in or validation if validation of a field failed
+
|Attribute type.
|N/A
 
 
|-
 
|-
|contact.heading
+
|selected
|string
+
|[[#integer|integer]]
|Contains heading text
+
|Selected attribute.
|N/A
 
 
|-
 
|-
|contact.text
+
|options
|string
+
|[[#list|list]] of index to value mappings
|Contains a descriptive text of what the contact us page is. It most certainly contains HTML so the [http://www.twig-project.org/doc/templates.html#raw raw] filter may be appropriate to use
+
|Attribute options.
|N/A
+
|}
 
|}
 
|}
  
===Cookie usage page (cookie_usage.html)===
+
===product_specifications.html===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 020: Rad 2 035:
 
!Format
 
!Format
 
|-
 
|-
|cookie_usage.continue_href
+
|modules.product_specifications.grouped
|string
+
|[[#list|list]] of categories
|A link to the next page (index.php)
+
|Specifications with multiple values per specification grouped into a values variable.
|N/A
+
|
 +
|-
 +
|modules.product_specifications.hierarchy
 +
|[[#list|list]] of categories
 +
|The hierarchy of specifications used for this product.
 +
|
 +
|-
 +
|modules.product_specifications.specifications
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Product specifications.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Specification name.
 +
|-
 +
|value
 +
|[[#string|string]]
 +
|Specification value.
 +
|}
 
|}
 
|}
  
===Gallery pages (gallery.html, galleries/)===
+
===products_in_package.html===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 033: Rad 2 071:
 
!Format
 
!Format
 
|-
 
|-
|gallery.title
+
|modules.products_in_package.products
|string
+
|[[#list|list]] of products
|Gallery title.
+
|Products in product package.
 
|N/A
 
|N/A
 +
|}
 +
 +
===products_reviews.html===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|gallery.description
+
|modules.products_reviews.captcha_href
|string
+
|[[#URL|URL]]
|Gallery description or content.
+
|Link to the captcha image.
 
|N/A
 
|N/A
 
|-
 
|-
|gallery.date
+
|modules.products_reviews.error
|string
+
|[[#string|string]]
|Last modification date.
+
|Error message.
 
|N/A
 
|N/A
 
|-
 
|-
|gallery.type
+
|modules.products_reviews.customer
|string
+
|[[#dictionary|dictionary]]
|Type of gallery.
+
|Customer information.
|N/A
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|gallery.upload_data_action
+
|firstname
|URL
+
|[[#string|string]]
|Form action for uploading.
+
|First name.
|N/A
 
 
|-
 
|-
|gallery.upload_data_check
+
|lastname
|boolean
+
|[[#string|string]]
|True.
+
|Last name.
|N/A
+
|}
 
|-
 
|-
|gallery.upload_data_type
+
|modules.products_reviews.reviews
|HTML
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Form field.
+
|Product reviews.
|N/A
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|gallery.page_title
+
|rating
|string
+
|[[#integer|integer]]
|Edited page title.
+
|Review rating, 1-5.
|N/A
 
 
|-
 
|-
|gallery.page_description
+
|author
|HTML
+
|[[#string|string]]
|Edited page description.
+
|Review author.
|N/A
 
 
|-
 
|-
|gallery.form_page_description
+
|date
|string
+
|[[#string|string]]
|Edited page description, escaped.
+
|Review date.
|N/A
 
 
|-
 
|-
|gallery.gallery_owned
+
|text
|boolean
+
|[[#HTML|HTML]]
|Set if the gallery is owned by the logged-in user.
+
|Review text.
|N/A
+
|}
 +
|}
 +
 
 +
===products_variants.html===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|gallery.edit_content_link
+
|modules.products_variants.category
|URL
+
|[[#integer|integer]]
|Link for editing the gallery.
+
|Category index.
 
|N/A
 
|N/A
 
|-
 
|-
|gallery.remove_content_link
+
|modules.products_variants.variants
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Link for removing the gallery.
+
|Variants.
|N/A
 
|-
 
|gallery.edit_mode
 
|boolean
 
|Set when editing, otherwise adding.
 
|N/A
 
|-
 
|gallery.gallery_fields
 
|list of dictionaries
 
|Gallery fields.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 112: Rad 2 160:
 
!Description
 
!Description
 
|-
 
|-
|label
+
|name
|string
+
|[[#string|string]]
|Field label.
+
|Variant name
 
|-
 
|-
|output
+
|selected
|HTML
+
|[[#integer|integer]]
|Form field.
+
|Selected variant.
 +
|-
 +
|options
 +
|[[#list|list]] of [[#integer|integer]] to value mappings
 +
|Variants.
 
|}
 
|}
 
|-
 
|-
|gallery.children
+
|modules.products_variants.products
|list of string to dictionary mappings
+
|[[#list|list]] of [[#product|products]]
|Child galleries.
+
|Variant products.
 +
|N/A
 +
|-
 +
|modules.products_variants.combinations
 +
|[[#list|list]] of lists of [[#integers|integer]]s
 +
|Available combinations of options.
 +
|N/A
 +
|-
 +
|modules.products_variants.combination
 +
|[[#list|list]] of [[#integers|integer]]s
 +
|Currently selected combination.
 +
|N/A
 +
|-
 +
|modules.products_variants.combined
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Variant choices associated with products.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 130: Rad 2 197:
 
!Description
 
!Description
 
|-
 
|-
|title
+
|combination
|string
+
|[[#dictionary|dictionary]]
|Gallery title.
+
|Keys are variant types and values are variant choices.
 
|-
 
|-
|description
+
|product
|HTML
+
|[[#integer|integer]]
|Gallery description.
+
|Product ID, or null.
|-
 
|link
 
|URL
 
|Child gallery link.
 
|-
 
|date
 
|string
 
|Last modification date.
 
 
|}
 
|}
 
|}
 
|}
  
===Index page (index.html)===
+
===tell_a_friend.html===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 155: Rad 2 214:
 
!Format
 
!Format
 
|-
 
|-
|index.text
+
|modules.tell_a_friend.form_action
|HTML
+
|[[#URL|URL]]
|Page text
+
|Form handler.
 
|N/A
 
|N/A
|-
+
|}
|index.header_products
+
 
|products
+
==Page specific==
|A random selection of products.
+
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''.
|list of products
+
 
|-
+
===Token action - invalid (token_action/invalid.html)===
|index.featured_products
+
No variables.
|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)===
+
===Reservations - accept (token_action/reservations/accept.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 188: Rad 2 233:
 
!Format
 
!Format
 
|-
 
|-
|kolli.heading
+
|reservation.customer_id
|string
+
|[[#integer|integer]]
|Page heading
+
|Id of customer who placed the reservation.
 +
|N/A
 +
|-
 +
|reservation.name
 +
|[[#string|string]]
 +
|Customer's name from reservation form
 +
|N/A
 +
|-
 +
|reservation.email
 +
|[[#string|string]]
 +
|Customer's email from reservation form
 
|N/A
 
|N/A
 
|-
 
|-
|kolli.text
+
|reservation.phone
|HTML
+
|[[#string|string]]
|Page text
+
|Customer's phone number from reservation form
 
|N/A
 
|N/A
 
|}
 
|}
  
===Login page (login.html)===
+
===Reservations - reject (token_action/reservations/reject.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 206: Rad 2 261:
 
!Format
 
!Format
 
|-
 
|-
|login.heading
+
|reservation.customer_id
|string
+
|[[#integer|integer]]
|Page heading
+
|Id of customer who placed the reservation.
 +
|N/A
 +
|-
 +
|reservation.name
 +
|[[#string|string]]
 +
|Customer's name from reservation form
 +
|N/A
 +
|-
 +
|reservation.email
 +
|[[#string|string]]
 +
|Customer's email from reservation form
 +
|N/A
 +
|-
 +
|reservation.phone
 +
|[[#string|string]]
 +
|Customer's phone number from reservation form
 
|N/A
 
|N/A
 
|}
 
|}
  
===Log off page (logoff.html)===
+
===Account edit page (account_edit.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 219: Rad 2 289:
 
!Format
 
!Format
 
|-
 
|-
|logoff.continue_href
+
|account_edit.form_action
|string
+
|[[#URL|URL]]
|Link presented to the user after logging off.
+
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|account_edit.back_href
 +
|[[#URL|URL]]
 +
|A link back to the account page
 
|N/A
 
|N/A
|}
+
|-
 
+
|account_edit.account
===Manufacturers page (manufacturers.html)===
+
|[[#dictionary|dictionary]]
 +
|Account data
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|id
+
|firstname
|string
+
|[[#string|string]]
|N/A
+
|Account first name
|N/A
 
 
|-
 
|-
|name
+
|lastname
|string
+
|[[#string|string]]
|N/A
+
|Account last name
|N/A
 
 
|-
 
|-
|image
+
|personnummer
|string
+
|[[#string|string]]
|N/A
+
|Account personnummer
|N/A
 
 
|-
 
|-
|address
+
|dob
|string
+
|[[#string|string]]
|N/A
+
|Account date of birth
|N/A
 
 
|-
 
|-
|postcode
+
|email_address
|string
+
|[[#string|string]]
|N/A
+
|Account email address
|N/A
+
|-
 +
|telephone
 +
|[[#string|string]]
 +
|Account telephone number
 +
|-
 +
|mobile
 +
|[[#string|string]]
 +
|Account mobile telephone number
 
|-
 
|-
|postal_address
+
|fax
|string
+
|[[#string|string]]
|N/A
+
|Account fax number
|N/A
 
 
|-
 
|-
|visitational_address
+
|gender
|string
+
|[[#string|string]]
|N/A
+
|Account gender ('m' or 'f')
|N/A
 
 
|-
 
|-
|country
+
|custom
|string
+
|[[#list|list]] of [[#custom field|custom field]]
|N/A
+
|Custom fields.
|N/A
 
 
|-
 
|-
|telephone1
+
|customer_type
|string
+
|[[#integer|integer]]
|N/A
+
|(-1 = all, 0 = individual, 1 = company)
|N/A
+
|}
 +
|}
 +
 
 +
===Account history page (account_history.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|telephone2
+
|account_history.account_href
|string
+
|[[#URL|URL]]
|N/A
+
|A link back to the account page
 
|N/A
 
|N/A
 
|-
 
|-
|fax
+
|account_history.pagination
|string
+
|[[#pagination|pagination]]
|N/A
+
|Pagination info
 
|N/A
 
|N/A
 
|-
 
|-
|email_address
+
|account_history.page_href_format
|string
+
|[[#URL|URL]]
|N/A
+
|Pagination link format
 
|N/A
 
|N/A
 
|-
 
|-
|orgno
+
|account_history.order_history
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|N/A
+
|Order history
|N/A
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|vat
+
|id
|string
+
|[[#integer|integer]]
|N/A
+
|Order ID
|N/A
 
 
|-
 
|-
|note
+
|status
|string
+
|[[#string|string]]
|N/A
+
|Order status
|N/A
 
 
|-
 
|-
|postgiro
+
|date
|string
+
|[[#string|string]]
|N/A
+
|Order date
|N/A
 
 
|-
 
|-
|bankgiro
+
|type
|string
+
|[[#string|string]]
|N/A
+
|Order type
|N/A
 
 
|-
 
|-
|contact
+
|name
|string
+
|[[#string|string]]
|N/A
+
|Order delivery name
|N/A
 
 
|-
 
|-
|payment_conditions
+
|product_count
|string
+
|[[#integer|integer]]
|N/A
+
|Product count
|N/A
 
 
|-
 
|-
|customers_no
+
|total
|string
+
|[[#string|string]]
|N/A
+
|Order total
|N/A
 
 
|-
 
|-
|homepage
+
|href
|string
+
|[[#URL|URL]]
|N/A
+
|A link to the description of the order
|N/A
 
|-
 
|link
 
|string
 
|N/A
 
|N/A
 
 
|-
 
|-
 +
|order
 +
|[[#dictionary|dictionary]]
 +
|Order information, see <tt>checkout success.order</tt>.
 +
|}
 
|}
 
|}
  
===News archive page (news_archive.html)===
+
===Order info page (account_history_info.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 351: Rad 2 430:
 
!Format
 
!Format
 
|-
 
|-
|news_archive.news
+
|account_history_info.back_href
|list of dictionaries
+
|[[#URL|URL]]
|News articles
+
|Link back to the account order history
 +
|N/A
 +
|-
 +
|account_history_info.order
 +
|[[#dictionary|dictionary]]
 +
|Order info
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 360: Rad 2 444:
 
!Description
 
!Description
 
|-
 
|-
|id
+
|id_formatted
|integer
+
|[[#string|string]]
|News article ID
+
|Order ID
 
|-
 
|-
|title
+
|status
|string
+
|[[#string|string]]
|News article title
+
|Order status
 
|-
 
|-
 
|date
 
|date
|string
+
|[[#date|date]]
|News article publishing date
+
|Order date
 
|-
 
|-
|content
+
|total
|string
+
|[[#string|string]]
|News article content
+
|Order total
|}
 
|}
 
 
 
===News article page (news.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|news.title
+
|shipping_method
|string
+
|[[#string|string]]
|News article title
+
|Order shipping method
|N/A
 
 
|-
 
|-
|news.date
+
|payment_method
|string
+
|[[#string|string]]
|Date of publishing
+
|Order payment method
|N/A
 
 
|-
 
|-
|news.content
+
|tax_group_count
|string
+
|[[#integer|integer]]
|News article content
+
|Number of different tax groups
|N/A
 
 
|-
 
|-
|news.blog_enabled
+
|billing_address
|boolean
+
|[[#string|string]]
|Is the blog functionality enabled?
+
|Order billing address
|N/A
 
 
|-
 
|-
|news.form_action
+
|delivery_address
|URL
+
|[[#string|string]]
|A link to the page which handles the new comment form
+
|Order delivery address
|N/A
+
|-
 +
|delivery
 +
|[[#boolean|boolean]]
 +
|
 
|-
 
|-
|news.comments
+
|partner
|list of dictionaries
+
|[[#partner|partner]]
|Comments to the news article
 
 
|
 
|
 +
|-
 +
|products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Products in order
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
 
!Type
 
!Type
 
!Description
 
!Description
 +
|-
 +
|qty
 +
|[[#integer|integer]]
 +
|Product quantity
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Product ID
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Comment author
+
|Product name
 
|-
 
|-
|date
+
|model
|string
+
|[[#string|string]]
|Comment posting date
+
|Product model
 
|-
 
|-
|comment
+
|tax
|string
+
|[[#decimal|decimal]]
|Comment text
+
|Product tax
|}
 
|}
 
 
 
===Newsletter page (newsletter.html)===
 
{| class="wikitable"
 
!Variable name    !! Type !! Description !! Format
 
 
|-
 
|-
| newsletter.text || HTML || The newsletter. ||N/A
+
|price
|}
+
|[[#decimal|decimal]]
 
+
|Product price
===Password forgotten page (password_forgotten.html)===
 
{| class="wikitable"
 
!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
+
|final_price
|string
+
|[[#decimal|decimal]]
|A link to the parent page (login.php)
+
|Final product price
|N/A
 
|}
 
 
 
===Product page (product.html)===
 
{| class="wikitable"
 
!Variable name                !! Type    !! Description !! Format
 
 
|-
 
|-
| product.form_href || URL || Add to cart handler. || N/A
+
|image
 +
|[[#string|string]]
 +
|Address to image
 
|-
 
|-
| product.reviews_href || URL || Link to product reviews. || N/A
+
|href
 +
|[[#string|string]]
 +
|Link address to product
 
|-
 
|-
| product.invalid_name || string || Invalid product name page title. || N/A
+
|status
 +
|[[#string|string]]
 +
|Products status. 0 = inactive, 1 = active
 +
|}
 
|-
 
|-
| product.invalid_text || string || Invalid product name page text. || N/A
+
|totals
|-
+
|[[#list|list]] of [[#dictionary|dictionaries]]
| product.inactive_name || string || Inactive product name page title. || N/A
+
|Order parts of total
|-
 
| 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.
 
|
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 2 484: Rad 2 546:
 
!Description
 
!Description
 
|-
 
|-
|id||integer||Product index.
+
|title
 +
|[[#string|string]]
 +
|Total part label
 
|-
 
|-
|image||URL||Product image.
+
|text
|-
+
|[[#HTML|HTML]]
|name||string||Product name.
+
|Total part value
|-
 
|href||URL||Product link
 
 
|}
 
|}
 
|-
 
|-
| product.category_path || list of dictionaries || Information about the current category path.
+
|statuses
|
+
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Order statuses
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 2 500: Rad 2 563:
 
!Description
 
!Description
 
|-
 
|-
|id||integer||Category index.
+
|name
 +
|[[#string|string]]
 +
|Status name
 
|-
 
|-
|name||string||Category name.
+
|date
 +
|[[#date|date]] (short)
 +
|Status date
 
|-
 
|-
|image||URL||Category image.
+
|comments
|-
+
|[[#string|string]]
|seo_link||URL||Category link.
+
|Status comments
 
|}
 
|}
 
|-
 
|-
|product.product || dictionary || Product information
+
|events
|  
+
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Order delivery events
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 2 516: Rad 2 584:
 
!Description
 
!Description
 
|-
 
|-
|id || integer || Product index.
+
|date
 +
|[[#date|date]]
 +
|Event date
 
|-
 
|-
|parent_id||integer||Parent product index.
+
|location
 +
|[[#string|string]]
 +
|Event location
 
|-
 
|-
|categories||list of lists of dictionaries||Information for all product categories.||See product.category_path.
+
|description
 +
|[[#string|string]]
 +
|Event description
 +
|}
 
|-
 
|-
|tags||list of tags||Tags set for this product.
+
|order
 +
|[[#dictionary|dictionary]]
 +
|Order information, see <tt>checkout success.order</tt>.
 +
|}
 +
|}
 +
 
 +
===Account page (account.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|date_added||string||Date product was added.
+
|account.account_history_href
 +
|[[#URL|URL]]
 +
|A link to the account history page
 +
|N/A
 
|-
 
|-
|date_available||string||Date product will be available.
+
|account.account_edit_href
 +
|[[#URL|URL]]
 +
|A link to the edit account page
 +
|N/A
 
|-
 
|-
|delivery_time||string||Product delivery time.
+
|account.address_book_href
 +
|[[#URL|URL]]
 +
|A link to the address book page
 +
|N/A
 
|-
 
|-
|description||HTML||Product description.
+
|account.account_password_href
 +
|[[#URL|URL]]
 +
|A link to the password change page
 +
|N/A
 
|-
 
|-
|description_short||HTML||Short product description.
+
|account.logoff_href
 +
|[[#URL|URL]]
 +
|A link to the logoff page
 +
|N/A
 
|-
 
|-
|disabled||boolean||Product disabled status.
+
|account.account_newsletters_href
|-
+
|[[#URL|URL]]
|ean1||string||Product EAN.
+
|A link to the newsletters page
 +
|N/A
 
|-
 
|-
|external_url||URL||Product link.
+
|account.account_notifications_href
 +
|[[#URL|URL]]
 +
|A link to the notifications page
 +
|N/A
 
|-
 
|-
|extra1||HTML||Custom product field.
+
|account.order_history_enabled
 +
|[[#boolean|boolean]]
 +
|Is the order history enabled?
 +
|N/A
 
|-
 
|-
|extra2||HTML||Custom product field.
+
|account.order_history
|-
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|extra3||HTML||Custom product field.
+
|Order history
|-
 
|extra4||HTML||Custom product field.
 
|-
 
|extra5||HTML||Custom product field.
 
|-
 
|featured||boolean||Featured product.
 
|-
 
|file||URL||Product file 1.
 
|-
 
|file2||URL||Product file 2.
 
|-
 
|image||URL||Product image.
 
|-
 
|image_href||URL||Link to full product image.
 
|-
 
|additional_images||Additional product images.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 567: Rad 2 659:
 
!Description
 
!Description
 
|-
 
|-
|href||URL||Image thumbnail link.
+
|href
 +
|[[#URL|URL]]
 +
|A link to the order description page
 
|-
 
|-
|image||URL||Image path.
+
|date
 +
|[[#date|date]] (short)
 +
|The date the order was placed
 
|-
 
|-
|description||string||Image description.
+
|id
|}
+
|[[#integer|integer]]
 +
|Order ID
 
|-
 
|-
|last_modified||string||Product last modified date.
+
|country
 +
|[[#string|string]]
 +
|Order delivery name and country
 
|-
 
|-
|lowest_number||integer||Minimum required order size.
+
|status
 +
|[[#string|string]]
 +
|Order status
 
|-
 
|-
|manufacturer_model||string||Product manufacturer model.
+
|total
 +
|[[#HTML|HTML]]
 +
|Order total
 
|-
 
|-
|model||string||Product model.
+
|order
|-
+
|[[#dictionary|dictionary]]
|name||string||Product name.
+
|Order information, see <tt>checkout success.order</tt>.
|-
+
|}
|next_delivery_date||string||Next delivery date.
+
|}
 +
 
 +
===Account newsletter subscription page (account_newsletters.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|next_delivery_quantity||string||Next delivery quantity.
+
|account_newsletters.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 
|-
 
|-
|price||string||Product price.
+
|account_newsletters.back_href
 +
|[[#URL|URL]]
 +
|Link back to the account page
 +
|N/A
 
|-
 
|-
|price_rek||string||Recommended product price.
+
|account_newsletters.subscribed
 +
|[[#boolean|boolean]]
 +
|Is the user subscribed to the newsletter
 +
|N/A
 +
|}
 +
 
 +
===Account notifications page (account_notifications.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|price_special||string||Special product price.
+
|account_notifications.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 
|-
 
|-
|rating||decimal||Average review rating in increments of 0.5.
+
|account_notifications.account_href
 +
|[[#URL|URL]]
 +
|A link back to the account page
 +
|N/A
 
|-
 
|-
|seo_link||URL||Product link.
+
|account_notifications.products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|The products subscribed to
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|stock||integer||Products in stock.
+
|id
 +
|[[#integer|integer]]
 +
|Product ID
 
|-
 
|-
|type||string||Product quantity type.
+
|name
 +
|[[#string|string]]
 +
|Product name
 
|-
 
|-
|weight||string||Product weight.
+
|counter
 +
|[[#integer|integer]]
 +
|List index
 +
|}
 
|-
 
|-
|reorder_stock||string||
+
|account_notifications.global_product_notifications
 +
|[[#boolean|boolean]]
 +
|Has the user enabled the global product notification setting
 +
|N/A
 +
|}
 +
 
 +
===Change account password page (account_password.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|stock_place||string||Product location.
+
|account_password.form_action
|-
+
|[[#URL|URL]]
|viewed||integer||Product view count.
+
|A link to the page which handles the form
|-
+
|N/A
|ordered||integer||Product order count.
 
|-
 
|note||string||Product note.
 
|-
 
|lead_time||string||
 
|-
 
|price_in||string||
 
|-
 
|price_purchase||string||
 
|-
 
|price_rek||string||
 
 
|-
 
|-
 +
|account_password.back_href
 +
|[[#URL|URL]]
 +
|Link back to the account page
 +
|N/A
 
|}
 
|}
|-
+
 
|product.manufacturer || dictionary || Product manufacturer information
+
===Address book page (address_book.html)===
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|name||string||Manufacturer name.
+
|address_book.back_href
|-
+
|[[#URL|URL]]
|href||URL||Manufacturer URL.
+
|A link back to the account page
 +
|N/A
 
|-
 
|-
|image||URL||Manufacturer image.
+
|address_book.add_href
 +
|[[#URL|URL]]
 +
|A link to a form which adds a new entry to the address book
 +
|N/A
 
|-
 
|-
|address||string||
+
|address_book.entries_count
 +
|[[#integer|integer]]
 +
|Number of entries
 +
|N/A
 
|-
 
|-
|postcode||string||
+
|address_book.address_label
 +
|[[#HTML|HTML]]
 +
|Address label
 +
|N/A
 
|-
 
|-
|postal_address||string||
+
|address_book.addresses
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|The addresses in the address book
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|visitational_address||string||
+
|id
 +
|[[#integer|integer]]
 +
|Id of the default address book entry
 
|-
 
|-
|country||string||
+
|default
 +
|[[#boolean|boolean]]
 +
|Is this the default address book entry
 
|-
 
|-
|telephone1||string||
+
|edit_href
 +
|[[#URL|URL]]
 +
|A link to edit the entry
 
|-
 
|-
|telephone2||string||
+
|delete_href
 +
|[[#URL|URL]]
 +
|A link to delete the entry
 
|-
 
|-
|fax||string||
+
|name
|-
+
|[[#string|string]]
|email_address||string||Manufacturer email address.
+
|Associated name
|-
 
|orgno||string||
 
|-
 
|vat||string||
 
|-
 
|note||string||Manufacturer note.
 
|-
 
|postgiro||string||
 
|-
 
|bankgiro||string||
 
|-
 
|contact||string||
 
|-
 
|payment_conditions||string||
 
|-
 
|customers_no||string||
 
 
|-
 
|-
 +
|address
 +
|[[#HTML|HTML]]
 +
|The address
 
|}
 
|}
 
|}
 
|}
  
===Product added to shopping cart page (product_added.html)===
+
===Address book modification page (address_book_process.html)===
{| class="wikitable"
 
!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.
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
|-
 
|quantity_added
 
|integer
 
|The quantity of the product added to the shopping cart
 
|}
 
|}
 
 
 
===New products page (products_new.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 700: Rad 2 844:
 
!Format
 
!Format
 
|-
 
|-
|products_new.pagination
+
|address_book_process.editing
|pagination
+
|[[#boolean|boolean]]
|Pagination info
+
|Is the page in the editing mode?
 
|N/A
 
|N/A
 
|-
 
|-
|products_new.page_href_format
+
|address_book_process.deleting
|URL
+
|[[#boolean|boolean]]
|Pagination link format
+
|Is the page in the deletion mode?
 
|N/A
 
|N/A
 
|-
 
|-
|products_new.products
+
|address_book_process.edit_form_action
|products
+
|[[#URL|URL]]
|A list of recently added products.
+
|A link to a page which handles the editing form
|list of products
+
|N/A
|}
 
 
 
===Product reviews page (product_reviews.html)===
 
{| class="wikitable"
 
!Variable name                    !! Type                !! Description !! Format
 
 
|-
 
|-
| product_reviews.back_href        || URL                 || Link to the product page. || N/A
+
|address_book_process.delete_form_action
 +
|[[#URL|URL]]
 +
|A link to a page which handles the deletion form
 +
|N/A
 +
|-
 +
|address_book_process.address_label
 +
|[[#HTML|HTML]]
 +
|The address
 +
|N/A
 
|-
 
|-
| product_reviews.write_href      || URL                 || Link to the write review page. || N/A
+
|address_book_process.back_href
 +
|[[#URL|URL]]
 +
|A back link
 +
|N/A
 
|-
 
|-
| product_reviews.product          || product              || The product. || N/A
+
|address_book_process.address_book_href
 +
|[[#URL|URL]]
 +
|A link to the address_book
 +
|N/A
 
|-
 
|-
| product_reviews.pagination      || pagination          || Pagination object for the reviews. || N/A
+
|address_book_process.process
 +
|[[#boolean|boolean]]
 +
|Is the page in the processing mode?
 +
|N/A
 
|-
 
|-
| product_reviews.page_href_format || URL                  || Page format for the pagination. || N/A
+
|address_book_process.default_address
 +
|[[#boolean|boolean]]
 +
|Is this the default address?
 +
|N/A
 
|-
 
|-
| product_reviews.reviews          || list of dictionaries || The displayed reviews.
+
|address_book_process.entry
 +
|[[#dictionary|dictionary]]
 +
|The fields in the current entry
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
!Key !! Type !! Description
+
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|href      || URL    || Link to the review page
+
|male
 +
|[[#boolean|boolean]]
 +
|Male gender?
 
|-
 
|-
|author    || string || Author of the review
+
|firstname
 +
|[[#string|string]]
 +
|First name
 
|-
 
|-
|date      || string || The date the review was written
+
|lastname
 +
|[[#string|string]]
 +
|Last name
 
|-
 
|-
|text      || string || The first 100 characters of the review text, lines broken at every 40 characters
+
|company
 +
|[[#string|string]]
 +
|Company
 
|-
 
|-
|full_text || string || The first 100 characters of the review text
+
|street_address
 +
|[[#string|string]]
 +
|Street address
 
|-
 
|-
|rating    || integer || Review rating, 1-5.
+
|suburb
|}
+
|[[#string|string]]
|}
+
|Suburb
 
 
===Review page (product_reviews_info.html)===
 
{| class="wikitable"
 
!Variable name                    !! Type      !! Description !! Format
 
 
|-
 
|-
| product_reviews_info.back_href  || URL        || Link to the product reviews page. || N/A
+
|postcode
 +
|[[#string|string]]
 +
|Post code
 
|-
 
|-
| product_reviews_info.write_href || URL        || Link to the write review page. || N/A
+
|city
 +
|[[#string|string]]
 +
|City
 
|-
 
|-
| product_reviews_info.product    || product    || The product. || N/A
+
|country_list
 +
|[[#HTML|HTML]]
 +
|A drop-down list with countries
 
|-
 
|-
| product_reviews_info.review    || dictionary || The displayed review.
+
|state_has_zones
|
+
|[[#boolean|boolean]]
{| class="wikitable"
+
|Does the state have zones?
!Key !! Type !! Description
 
 
|-
 
|-
|author    || string || Author of the review
+
|state
 +
|[[#string|string]]
 +
|State
 
|-
 
|-
|date      || string  || The date the review was written
+
|states
|-
+
|association list
|text      || string  || The review text, lines broken at every 60 characters
+
|A list of zones in the state
|-
 
|rating    || integer || Review rating, 1-5.
 
 
|}
 
|}
 
|}
 
|}
  
===Write review page (product_reviews_write.html)===
+
===Advanced search page (advanced_search.html)===
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                     !! Type       !! Description !! Format
+
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
| product_reviews_write.form_href  || URL        || Form handler. || N/A
+
|advanced_search.form_action
 +
|[[#string|string]]
 +
|A link to the page which handles the form.
 +
|N/A
 
|-
 
|-
| product_reviews_write.back_href  || URL        || Link to the product reviews page. || N/A
+
|advanced_search.categories
 +
|association list
 +
|A list of category names mapped to their indices.
 +
|[[#dictionary|dictionary]] of [[#string|string]] to [[#integer|integer]] mappings.
 
|-
 
|-
| product_reviews_write.product    || product    || The product. || N/A
+
|advanced_search.manufacturers
 +
|association list
 +
|A list of manufacturer names mapped to their indices.
 +
|[[#dictionary|dictionary]] of [[#string|string]] to [[#integer|integer]] mappings.
 +
|}
 +
 
 +
===Search results page (advanced_search_result.html)===
 +
{| class="wikitable"
 +
!Variable name                        !! Type            !! Description !! Format
 +
|-
 +
| advanced_search_result.results    || [[#list|list]] of products || The search results. ||N/A
 +
|-
 +
| advanced_search_result.num_results || [[#integer|integer]]          || The number of search results. || N/A
 +
|-
 +
| advanced_search_result.back_href  || [[#URL|URL]]              || A link for returning to the search page. || N/A
 +
|-
 +
| advanced_search_result.page_limit            || [[#integer|integer]]              || Maximum number of products per page || N/A
 +
|-
 +
| advanced_search_result.page_limits          || [[#list|list]] of [[#integers|integer]]s    || List of available page limits. 0 means all products on one page || N/A
 +
|-
 +
| advanced_search_result.page_index            || [[#integer|integer]]              || Current page number || N/A
 +
|-
 +
| advanced_search_result.page_count            || [[#integer|integer]]              || Number of pages || N/A
 
|-
 
|-
| product_reviews_write.customer  || dictionary || Customer information.
+
| advanced_search_result.sort_by        || [[#string|string]]              || Current sorting key. || N/A
|
 
{| class="wikitable"
 
!Key !! Type !! Description
 
 
|-
 
|-
|firstname || string || First name of the customer writing the review.
+
| advanced_search_result.sort_order        || [[#string|string]]              || Current sorting order, "ASC" or "DESC". || N/A
 
|-
 
|-
|lastname  || string || Last name of the customer writing the review.
+
| index.featured_products          || [[#list|list]] of [[#product|products]] ||A list of featured products. || N/A
|}
 
 
|}
 
|}
  
===Question about product page (question_about_product.html)===
+
===Campaign page (campaign.html)===
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Variable name                 !! Type             !! Description !! Format
!Type
+
|-
!Description
+
| campaign.campaign_name        || [[#HTML|HTML]]            || Title of campaign. ||N/A
!Format
 
 
|-
 
|-
|question_about_product.form_action
+
| campaign.campaign_description || [[#HTML|HTML]]            || Description of campaign. ||N/A
|URL
 
|A link to the page which handles the form
 
|N/A
 
 
|-
 
|-
|question_about_product.back_href
+
| campaign.campaign_image      || [[#URL|URL]]              || Selected campaign image. ||N/A
|URL
 
|Link back to the product page
 
|N/A
 
 
|-
 
|-
|question_about_product.product
+
| campaign.products            || [[#list|list]] of products || Products included in campaign. ||N/A
|product
 
|Product information.
 
|N/A
 
 
|}
 
|}
  
===Product reviews page (reviews.html)===
+
===Product list (categories_listing.html)===
 +
====GET variables====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Variable name                             !! Type                 !! Description !! Format
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|reviews.pagination
+
|}
|pagination
+
====Available data====
|Pagination info
+
{| class="wikitable"
|N/A
+
!Variable name                            !! Type                !! Description !! Format
 
|-
 
|-
|reviews.page_href_format
+
| categories_listing.header                || [[#dictionary|dictionary]]          || Attributes for the top of the page. It is either a manufacturer or a category ||
|URL
+
{| class="wikitable"
|Pagination link format
+
! Key !! Type !! Description
|N/A
 
 
|-
 
|-
|reviews.reviews
+
| name  || [[#string|string]] || Name of category/manufacturer
|list of dictionaries
 
|Product reviews
 
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|href
+
| alternative_name || [[#string|string]] || An alternative category name.  (SEO name.)
|URL
 
|A link to the review page
 
 
|-
 
|-
|product
+
| image || [[#string|string]] || Image [[#URL|URL]] for category/manufacturer
|string
 
|Product name
 
 
|-
 
|-
|author
+
| images || [[#list|list]] of [[#URL|URLs]] || The additional images for the category.
|string
 
|Review author
 
 
|-
 
|-
|date
+
| text  || [[#HTML|HTML]]  || Description of category/manufacturer
|string
 
|Review date
 
 
|-
 
|-
|image
+
| alternative_text  || [[#HTML|HTML]]  || An alternative category description.  (SEO text.)
|string
 
|Product image
 
 
|-
 
|-
|text
+
| template  || [[#string|string]]  || Template name chosen for the category, empty by default.
|HTML
 
|Abbreviated review text
 
 
|-
 
|-
|full_text
+
| extra1  || [[#string|string]]  || Category extra field.
|string
 
|Unabbreviated review text
 
 
|-
 
|-
|rating
+
| extra2  || [[#string|string]]  || Category extra field.
|HTML
+
|-
|Product rating
+
| extra3  || [[#string|string]]  || Category extra field.
 +
|-
 +
| extra4  || [[#string|string]]  || Category extra field.
 +
|-
 +
| extra5  || [[#string|string]]  || Category extra field.
 
|}
 
|}
|}
 
 
===Specials page (specials.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|specials.pagination
+
| categories_listing.header                || [[#dictionary|dictionary]]          || Page header attributes: image, description and title || For manufacturer pages the dictionary is a [[#manufacturer|manufacturer]], it also has a parent key with another [[#manufacturer|manufacturer]] dictionary, and a children key with a [[#list|list]] of [[#manufacturer|manufacturers]].
|pagination
+
|-
|Pagination info
+
| 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
|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
 
|-
 
|-
|specials.page_href_format
+
| categories_listing.subcategory_list || [[#list|list]] of [[#dictionary|dictionaries]] || Subcategories for the current category || N/A
|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)===
+
====Display variables====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Variable name                             !! Type                 !! Description !! Format
!Type
+
|-
!Description
+
| categories_listing.default_list_style    || [[#integer|integer]]              || By default this layout for the listing is selected || N/A
!Format
+
|-
 +
| categories_listing.page_limit            || [[#integer|integer]]              || Maximum number of products per page || N/A
 
|-
 
|-
|tell_a_friend.form_action
+
| categories_listing.page_limits          || [[#list|list]] of [[#integers|integer]]s    || List of available page limits. 0 means all product on one page || N/A
|URL
 
|A link to the page which handles the form
 
|N/A
 
 
|-
 
|-
|tell_a_friend.back_href
+
| categories_listing.page_index            || [[#integer|integer]]              || Current page number || N/A
|URL
 
|Link back to the product page
 
|N/A
 
 
|-
 
|-
|tell_a_friend.product
+
| categories_listing.page_count            || [[#integer|integer]]              || Number of pages || N/A
|product
+
|-
|Product information.
+
| categories_listing.sort_by        || [[#string|string]]              || Current sorting key. || N/A
|N/A
+
|-
 +
| categories_listing.sort_order        || [[#string|string]]              || Current sorting order, "ASC" or "DESC". || 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_form_href        || [[#string|string]]              || Link to the same page. || N/A
 +
|-
 +
| categories_listing.sort_name_href        || [[#string|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|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|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|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.used_tag_ids          || [[#list|list]] of [[#integers|integer]]s    || The tags used by at least one product in the filtered set of products.|| N/A
 +
|-
 +
| categories_listing.used_spec_values          || [[#dictionary|dictionary]] of [[#integers|integer]]s to [[#list|lists]] of [[#integer|integers]]    || The specification values used by the value specifications for the filtered products.|| N/A
 +
|-
 +
| categories_listing.used_spec_texts          || [[#dictionary|dictionary]] of [[#integers|integer]]s to [[#list|lists]] of [[#string|strings]]    || The specification values used by the text specifications for the filtered products.|| N/A
 +
|-
 +
| categories_listing.used_manufacturers_ids          || [[#list|list]] of [[#integers|integer]]s    || The manufacturers used by at least one product in the filtered set of products.|| N/A
 +
|-
 +
| categories_listing.manufacturers        || [[#list|list]] of [[#dictionary|dictionaries]] || Manufacturers used by products in current category tree. ||
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| id  || [[#string|string]] || Manufacturer ID.
 +
|-
 +
| name || [[#string|string]] || Manufacturer name.
 +
|-
 +
| image || [[#URL|URL]] || Manufacturer image.
 +
|}
 +
|-
 +
| categories_listing.filters || [[#list|list]] of [[#dictionary|dictionaries]] || Configured filters for this category. ||
 +
For the price filter and value specifications:
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| id || [[#string|string]] || "price" or a specification ID.
 +
|-
 +
| name || [[#string|string]] || Filter name.
 +
|-
 +
| type || [[#integer|integer]] || 2
 +
|-
 +
| min || [[#float|float]] || Minimum price/value for a product in this category.
 +
|-
 +
| max || [[#float|float]] || Maximum price/value for a product in this category.
 +
|-
 +
| unit || [[#string|string]] || Currency name or specification unit.
 
|}
 
|}
 +
For the manufacturers filter:
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| id || [[#string|string]] || "manufacturers"
 +
|-
 +
| name || [[#string|string]] || Manufacturer name.
 +
|-
 +
| image || [[#URL|URL]] || Manufacturer image.
 +
|-
 +
| children || [[#dictionary|dictionary]] || Manufacturer collections, same format as this dictionary, excluding children.
 +
|}
 +
For the category, tag, and specification category filters:
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| id || [[#integer|integer]] || ID.
 +
|-
 +
| name || [[#string|string]] || Name.
 +
|-
 +
| type || [[#integer|integer]] || 0 for categories, 1 for tags, 3 for specification categories.
 +
|-
 +
| children || [[#dictionary|dictionary]] || Manufacturer collections, same format as this dictionary, excluding children.
 +
|-
 +
| options || [[#list|list]] of [[#dictionary|dictionaries]] || Subcategories, keys are id and name.
 +
|}
 +
For the text specification filters:
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| id || [[#integer|integer]] || ID.
 +
|-
 +
| name || [[#string|string]] || Name.
 +
|-
 +
| type || [[#integer|integer]] || 4
 +
|-
 +
| options || [[#list|list]] of [[#dictionary|dictionaries]] || Subcategories, the dictionaries only have the key name.
 +
|}
 +
|}
 +
 +
===Checkout success (checkout_success.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|google_analytics_order.products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|products_id
 +
|[[#integer|integer]]
 +
|
 +
|-
 +
|model_number
 +
|
 +
|
 +
|-
 +
|product_title
 +
|
 +
|
 +
|-
 +
|category_title
 +
|
 +
|
 +
|-
 +
|price
 +
|
 +
|
 +
|-
 +
|quantity
 +
|[[#integer|integer]]
 +
|
 +
|}
 +
|-
 +
|checkout_success.update_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|checkout_success.heading
 +
|[[#string|string]]
 +
|Page heading
 +
|N/A
 +
|-
 +
|checkout_success.text
 +
|[[#HTML|HTML]]
 +
|Page content
 +
|N/A
 +
|-
 +
|checkout_success.order_id
 +
|[[#integer|integer]]
 +
|Order ID
 +
|N/A
 +
|-
 +
|checkout_success.survey_questions
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Survey questions
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Question ID
 +
|-
 +
|question
 +
|[[#string|string]]
 +
|Question
 +
|-
 +
|alternatives
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Question alternatives
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|type
 +
|[[#integer|integer]]
 +
|Alternative type, 1 for a radio button, an input field otherwise
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Alternative ID
 +
|-
 +
|answer
 +
|[[#string|string]]
 +
|Alternative text
 +
|-
 +
|}
 +
|}
 +
|-
 +
|checkout_success.order
 +
|[[#dictionary|dictionary]]
 +
|Order information
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|order_id
 +
|[[#integer|integer]]
 +
|Order ID
 +
|-
 +
|info
 +
|[[#dictionary|dictionary]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|comments
 +
|
 +
|
 +
|-
 +
|coupon_code
 +
|
 +
|
 +
|-
 +
|currency
 +
|
 +
|
 +
|-
 +
|currency_value
 +
|
 +
|
 +
|-
 +
|date_purchased
 +
|
 +
|
 +
|-
 +
|extra
 +
|
 +
|
 +
|-
 +
|languages_id
 +
|
 +
|
 +
|-
 +
|last_modified
 +
|
 +
|
 +
|-
 +
|manual_order_edit
 +
|
 +
|
 +
|-
 +
|market_id
 +
|
 +
|
 +
|-
 +
|order_status
 +
|
 +
|
 +
|-
 +
|orders_package_id
 +
|
 +
|
 +
|-
 +
|orders_shipping_date
 +
|
 +
|
 +
|-
 +
|orders_state
 +
|
 +
|
 +
|-
 +
|orders_status
 +
|
 +
|
 +
|-
 +
|orders_status_id
 +
|
 +
|
 +
|-
 +
|parcel_id
 +
|
 +
|
 +
|-
 +
|payment_cost
 +
|
 +
|
 +
|-
 +
|payment_method
 +
|
 +
|
 +
|-
 +
|payment_method_code
 +
|
 +
|
 +
|-
 +
|pickup_location_id
 +
|
 +
|
 +
|-
 +
|pickup_location_type
 +
|
 +
|
 +
|-
 +
|reference_code
 +
|
 +
|
 +
|-
 +
|shipping_cost
 +
|
 +
|
 +
|-
 +
|shipping_method
 +
|
 +
|
 +
|-
 +
|shipping_method_code
 +
|
 +
|
 +
|-
 +
|subtotal
 +
|
 +
|
 +
|-
 +
|subtotal_ex_tax
 +
|
 +
|
 +
|-
 +
|tax
 +
|
 +
|
 +
|-
 +
|tax_group_totals
 +
|
 +
|
 +
|-
 +
|tax_groups
 +
|
 +
|
 +
|-
 +
|total
 +
|
 +
|
 +
|-
 +
|total_ex_tax
 +
|
 +
|
 +
|-
 +
|vat
 +
|
 +
|
 +
|-
 +
|voucher
 +
|
 +
|
 +
|}
 +
|-
 +
|customer
 +
|[[#dictionary|dictionary]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|city
 +
|
 +
|
 +
|-
 +
|company
 +
|
 +
|
 +
|-
 +
|country
 +
|
 +
|
 +
|-
 +
|country_id
 +
|
 +
|
 +
|-
 +
|customers_group_id
 +
|
 +
|
 +
|-
 +
|email_address
 +
|
 +
|
 +
|-
 +
|firstname
 +
|
 +
|
 +
|-
 +
|format_id
 +
|
 +
|
 +
|-
 +
|gln
 +
|
 +
|
 +
|-
 +
|id
 +
|
 +
|
 +
|-
 +
|lastname
 +
|
 +
|
 +
|-
 +
|login_id
 +
|
 +
|
 +
|-
 +
|mobile
 +
|
 +
|
 +
|-
 +
|name
 +
|
 +
|
 +
|-
 +
|personnummer
 +
|
 +
|
 +
|-
 +
|personnummer_validated
 +
|
 +
|
 +
|-
 +
|personnummer_validated_ip
 +
|
 +
|
 +
|-
 +
|postcode
 +
|
 +
|
 +
|-
 +
|state
 +
|
 +
|
 +
|-
 +
|street_address
 +
|
 +
|
 +
|-
 +
|street_address2
 +
|
 +
|
 +
|-
 +
|suburb
 +
|
 +
|
 +
|-
 +
|telephone
 +
|
 +
|
 +
|-
 +
|vat_identification_number
 +
|
 +
|
 +
|-
 +
|zone_id
 +
|
 +
|
 +
|}
 +
|-
 +
|delivery
 +
|[[#dictionary|dictionary]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|city
 +
|
 +
|
 +
|-
 +
|company
 +
|
 +
|
 +
|-
 +
|country
 +
|
 +
|
 +
|-
 +
|country_id
 +
|
 +
|
 +
|-
 +
|email_address
 +
|
 +
|
 +
|-
 +
|firstname
 +
|
 +
|
 +
|-
 +
|format_id
 +
|
 +
|
 +
|-
 +
|gln
 +
|
 +
|
 +
|-
 +
|lastname
 +
|
 +
|
 +
|-
 +
|name
 +
|
 +
|
 +
|-
 +
|postcode
 +
|
 +
|
 +
|-
 +
|state
 +
|
 +
|
 +
|-
 +
|street_address
 +
|
 +
|
 +
|-
 +
|street_address2
 +
|
 +
|
 +
|-
 +
|suburb
 +
|
 +
|
 +
|-
 +
|zone_id
 +
|
 +
|
 +
|}
 +
|-
 +
|billing
 +
|[[#dictionary|dictionary]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|city
 +
|
 +
|
 +
|-
 +
|company
 +
|
 +
|
 +
|-
 +
|country
 +
|
 +
|
 +
|-
 +
|country_id
 +
|
 +
|
 +
|-
 +
|email_address
 +
|
 +
|
 +
|-
 +
|firstname
 +
|
 +
|
 +
|-
 +
|format_id
 +
|
 +
|
 +
|-
 +
|gln
 +
|
 +
|
 +
|-
 +
|lastname
 +
|
 +
|
 +
|-
 +
|name
 +
|
 +
|
 +
|-
 +
|postcode
 +
|
 +
|
 +
|-
 +
|state
 +
|
 +
|
 +
|-
 +
|street_address
 +
|
 +
|
 +
|-
 +
|street_address2
 +
|
 +
|
 +
|-
 +
|suburb
 +
|
 +
|
 +
|-
 +
|zone_id
 +
|
 +
|
 +
|}
 +
|-
 +
|totals
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|orders_total_id
 +
|
 +
|
 +
|-
 +
|orders_id
 +
|
 +
|
 +
|-
 +
|title
 +
|
 +
|
 +
|-
 +
|text
 +
|
 +
|
 +
|-
 +
|value
 +
|
 +
|
 +
|-
 +
|tax_class_id
 +
|
 +
|
 +
|-
 +
|tax_rate
 +
|
 +
|
 +
|-
 +
|class
 +
|
 +
|
 +
|-
 +
|sort_order
 +
|
 +
|
 +
|}
 +
|-
 +
|products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|_discounted
 +
|
 +
|
 +
|-
 +
|_from_product_configuration
 +
|
 +
|
 +
|-
 +
|_quotation_id
 +
|
 +
|
 +
|-
 +
|attributes
 +
|
 +
|
 +
|-
 +
|collection_id
 +
|
 +
|
 +
|-
 +
|data
 +
|
 +
|
 +
|-
 +
|final_price
 +
|
 +
|
 +
|-
 +
|href
 +
|
 +
|
 +
|-
 +
|id
 +
|
 +
|
 +
|-
 +
|image
 +
|
 +
|
 +
|-
 +
|manufacturers_id
 +
|
 +
|
 +
|-
 +
|model
 +
|
 +
|
 +
|-
 +
|name
 +
|
 +
|
 +
|-
 +
|name_default_language
 +
|
 +
|
 +
|-
 +
|op_id
 +
|
 +
|
 +
|-
 +
|package_content
 +
|
 +
|
 +
|-
 +
|parent_id
 +
|
 +
|
 +
|-
 +
|parent_model
 +
|
 +
|
 +
|-
 +
|parent_name_default_language
 +
|
 +
|
 +
|-
 +
|price
 +
|
 +
|
 +
|-
 +
|qty
 +
|
 +
|
 +
|-
 +
|quantity
 +
|
 +
|
 +
|-
 +
|seo_link
 +
|
 +
|
 +
|-
 +
|status
 +
|
 +
|
 +
|-
 +
|stock_allow_checkout
 +
|
 +
|
 +
|-
 +
|tax
 +
|
 +
|
 +
|-
 +
|tax_class_id
 +
|
 +
|
 +
|-
 +
|tax_description
 +
|
 +
|
 +
|-
 +
|units_id
 +
|
 +
|
 +
|-
 +
|weight
 +
|
 +
|
 +
|}
 +
|-
 +
|upsell()
 +
|method
 +
|Returns a [[#dictionary|dictionary]] with information about upsell for the order.  Documented below.
 +
|-
 +
|}
 +
|}
 +
 +
====upsell() dictionary====
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|errors
 +
|optional [[#list|list]] of [[#dictionary|dictionaries]]
 +
|Present only if there are any errors.  See format documentation below.
 +
 +
The following error codes can be returned:
 +
* CHECKOUT_UPSELL_DISABLED: Returned is upsell is disabled.
 +
* CHECKOUT_UPSELL_ORDER_MISSING: Returned if the order is missing, or if the order doesn't belong to the customer.
 +
* CHECKOUT_UPSELL_ORDER_INVALID_STATE: Returned if the order is not in the UPSELL state.
 +
* CHECKOUT_UPSELL_DURATION_MISSING: Returned if the order lacks the upsell duration field.
 +
* CHECKOUT_UPSELL_DURATION_EXPIRED: Returned if the upsell duration has passed.
 +
* CHECKOUT_UPSELL_REMOTE_ORDER_MISSING: Returned if the order was not found at the payment processor.
 +
* CHECKOUT_UPSELL_UNAVAILABLE: Returned for orders not possible to update due to selected payment method.
 +
|-
 +
|get_prices_url
 +
|[[#URL|URL]]
 +
|An URL to an endpoint used for querying product prices for upsell.
 +
 +
Send a JSON object in the following format:
 +
<pre>
 +
{
 +
  "order_id": ORDER_ID,
 +
  "products": [
 +
    {
 +
      "id": PRODUCT_ID,
 +
      "quantity": PRODUCT_QUANTITY
 +
    },
 +
  ]
 +
}
 +
</pre>
 +
 +
The response will contain the products for valid products, a status field indicating if the product can be purchased, and the prices.  If there were any errors a top-level errors key will be added.
 +
<pre>
 +
{
 +
  "products": [
 +
    {
 +
      "id": INT,
 +
      "quantity": INT,
 +
      "status": BOOL,
 +
      "priceIncl": NUMBER,
 +
      "priceExcl": NUMBER
 +
    },
 +
  ]
 +
}
 +
</pre>
 +
 +
The following error codes can be returned:
 +
* CHECKOUT_UPSELL_INVALID_INPUT: Returned if the input JSON did not follow the specified format.
 +
* CHECKOUT_UPSELL_INVALID_PRODUCT: Returned for product ids not found in the database.
 +
* CHECKOUT_UPSELL_PRICE_CALCULATION_ERROR: Returned in case a price could not be calculated.
 +
|-
 +
|update_order_url
 +
|[[#URL|URL]]
 +
|An URL to an endpoint used for adding products to the order.
 +
 +
Send a JSON object in the following format:
 +
<pre>
 +
{
 +
  "order_id": ORDER_ID,
 +
  "products": [
 +
    {
 +
      "id": PRODUCT_ID,
 +
      "quantity": PRODUCT_QUANTITY
 +
    },
 +
  ]
 +
}
 +
</pre>
 +
 +
The response is an empty JSON object, with an optional top-level errors key if there were any errors.
 +
<pre>
 +
{}
 +
</pre>
 +
 +
The following error codes can be returned:
 +
* CHECKOUT_UPSELL_INVALID_INPUT: Returned if the input JSON did not follow the specified format.
 +
* CHECKOUT_UPSELL_PARAMETER_MISSING: Returned if the products JSON did not follow the specified format.
 +
* CHECKOUT_UPSELL_INVALID_PRODUCT: Returned for product ids not found in the database.
 +
* CHECKOUT_UPSELL_OUT_OF_STOCK: Returned if a product did not have the stock requested.
 +
* CHECKOUT_UPSELL_PRICE_CALCULATION_ERROR: Returned in case a price could not be calculated.
 +
* CHECKOUT_UPSELL_PAYMENT_ERROR: Returned if the calls to the external payment provider failed.
 +
|-
 +
|finalize_url
 +
|[[#URL|URL]]
 +
|An URL to an endpoint used to manually finalize an upsell order without waiting for the timer to expire.
 +
 +
Send a JSON object in the following format:
 +
<pre>
 +
{
 +
  "order_id": ORDER_ID
 +
}
 +
</pre>
 +
 +
The response is an empty JSON object, with an optional top-level errors key if there were any errors.
 +
<pre>
 +
{}
 +
</pre>
 +
 +
The following error codes can be returned:
 +
* CHECKOUT_UPSELL_INVALID_INPUT: Returned if the input JSON did not follow the specified format.
 +
* CHECKOUT_UPSELL_ORDER_MISSING: Returned if an invalid order id was provided.
 +
* CHECKOUT_UPSELL_DURATION_EXPIRED: Returned if the upsell duration has passed or if the order was already finalized.
 +
|}
 +
 +
====error dictionary====
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|
 +
|
 +
|-
 +
|status
 +
|
 +
|
 +
|-
 +
|code
 +
|
 +
|
 +
|-
 +
|public
 +
|
 +
|
 +
|-
 +
|title
 +
|
 +
|
 +
|-
 +
|detail
 +
|
 +
|
 +
|-
 +
|source
 +
|
 +
|
 +
|}
 +
 +
===Contact us page (contact.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|contact.form_href
 +
|[[#string|string]]
 +
|URL with target of form for handling user input data
 +
|N/A
 +
|-
 +
|contact.captcha
 +
|[[#boolean|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|string]]
 +
|Contains customer e-mail if customer is logged in or validation if validation of a field failed
 +
|N/A
 +
|-
 +
|contact.heading
 +
|[[#string|string]]
 +
|Contains heading text
 +
|N/A
 +
|-
 +
|contact.text
 +
|[[#string|string]]
 +
|Contains a descriptive text of what the contact us page is. It most certainly contains [[#HTML|HTML]] so the [http://www.twig-project.org/doc/templates.html#raw raw] filter may be appropriate to use
 +
|N/A
 +
|}
 +
 +
===Cookie usage page (cookie_usage.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|cookie_usage.continue_href
 +
|[[#string|string]]
 +
|A link to the next page (index.php)
 +
|N/A
 +
|}
 +
 +
===Gallery pages (gallery.html, galleries/)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|gallery.id
 +
|[[#integer|integer]]
 +
|Gallery ID.
 +
|N/A
 +
|-
 +
|gallery.title
 +
|[[#string|string]]
 +
|Gallery title.
 +
|N/A
 +
|-
 +
|gallery.description
 +
|[[#string|string]]
 +
|Gallery description or content.
 +
|N/A
 +
|-
 +
|gallery.short_description
 +
|[[#string|string]]
 +
|Gallery short description or content.
 +
|N/A
 +
|-
 +
|gallery.date
 +
|[[#string|string]]
 +
|Last modification date.
 +
|N/A
 +
|-
 +
|gallery.publish_date_from
 +
|[[#string|string]]
 +
|Publication start date.
 +
|N/A
 +
|-
 +
|gallery.publish_date_to
 +
|[[#string|string]]
 +
|Publication end date.
 +
|N/A
 +
|-
 +
|gallery.type
 +
|[[#string|string]]
 +
|Type of gallery.
 +
|N/A
 +
|-
 +
|gallery.upload_data_action
 +
|[[#URL|URL]]
 +
|Form action for uploading.
 +
|N/A
 +
|-
 +
|gallery.upload_data_check
 +
|[[#boolean|boolean]]
 +
|True.
 +
|N/A
 +
|-
 +
|gallery.upload_data_type
 +
|[[#HTML|HTML]]
 +
|Form field.
 +
|N/A
 +
|-
 +
|gallery.page_title
 +
|[[#string|string]]
 +
|Edited page title.
 +
|N/A
 +
|-
 +
|gallery.page_description
 +
|[[#HTML|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|string]]
 +
|Edited page description, escaped.
 +
|N/A
 +
|-
 +
|gallery.gallery_owned
 +
|[[#boolean|boolean]]
 +
|Set if the gallery is owned by the logged-in user.
 +
|N/A
 +
|-
 +
|gallery.edit_content_link
 +
|[[#URL|URL]]
 +
|Link for editing the gallery.
 +
|N/A
 +
|-
 +
|gallery.remove_content_link
 +
|[[#URL|URL]]
 +
|Link for removing the gallery.
 +
|N/A
 +
|-
 +
|gallery.edit_mode
 +
|[[#boolean|boolean]]
 +
|Set when editing, otherwise adding.
 +
|N/A
 +
|-
 +
|gallery.gallery_fields
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Gallery fields.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|label
 +
|[[#string|string]]
 +
|Field label.
 +
|-
 +
|output
 +
|[[#HTML|HTML]]
 +
|Form field.
 +
|}
 +
|-
 +
|gallery.children
 +
|[[#list|list]] of [[#string|string]] to [[#dictionary|dictionary]] mappings
 +
|Child galleries indexed by gallery type.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|title
 +
|[[#string|string]]
 +
|Gallery title.
 +
|-
 +
|description
 +
|[[#HTML|HTML]]
 +
|Gallery description.
 +
|-
 +
|link
 +
|[[#URL|URL]]
 +
|Child gallery link.
 +
|-
 +
|date
 +
|[[#string|string]]
 +
|Last modification date.
 +
|}
 +
|-
 +
|gallery.siblings
 +
|[[#list|list]] of [[#string|string]] to [[#dictionary|dictionary]] mappings
 +
|Sibling galleries indexed by gallery type.
 +
|See gallery.children.
 +
|-
 +
|gallery.parents
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Parent galleries with the bottommost first.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Gallery ID.
 +
|-
 +
|title
 +
|[[#string|string]]
 +
|Gallery title.
 +
|}
 +
|-
 +
|gallery.extra1
 +
|[[#string|string]]
 +
|Custom page field.
 +
|N/A
 +
|-
 +
|gallery.extra2
 +
|[[#string|string]]
 +
|Custom page field.
 +
|N/A
 +
|-
 +
|gallery.extra3
 +
|[[#string|string]]
 +
|Custom page field.
 +
|N/A
 +
|-
 +
|gallery.extra4
 +
|[[#string|string]]
 +
|Custom page field (language dependent).
 +
|N/A
 +
|-
 +
|gallery.extra5
 +
|[[#string|string]]
 +
|Custom page field (language dependent).
 +
|N/A
 +
|-
 +
|gallery.images
 +
|[[#list|list]] of [[#URL|URLs]]
 +
|Images set for this page
 +
|N/A
 +
|-
 +
|categories
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Categories set for this page (only shown if cright 141 is set).
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id||[[#integer|integer]]||Category index.
 +
|-
 +
|name||[[#string|string]]||Category name.
 +
|-
 +
|href||[[#URL|URL]]||Category link.
 +
|-
 +
|seo_link||[[#URL|URL]]||Category relative link.
 +
|}
 +
|-
 +
|tags
 +
|[[#list|list]] of [[#tag|tags]]
 +
|Tags set for this page (only shown if cright 141 is set).
 +
|N/A
 +
|}
 +
 +
===Index page (index.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|index.text
 +
|[[#HTML|HTML]]
 +
|Page text
 +
|N/A
 +
|-
 +
|index.header_products
 +
|products
 +
|A random selection of products.
 +
|[[#list|list]] of products
 +
|-
 +
|index.featured_products
 +
|products
 +
|A list of featured products.
 +
|[[#list|list]] of products
 +
|-
 +
|index.new_products
 +
|products
 +
|A list of recently added products.
 +
|[[#list|list]] of products
 +
|-
 +
|index.specials_products
 +
|products
 +
|A list of products with special prices.
 +
|[[#list|list]] of products
 +
|}
 +
 +
===Kolli page (kolli.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|kolli.heading
 +
|[[#string|string]]
 +
|Page heading
 +
|N/A
 +
|-
 +
|kolli.text
 +
|[[#HTML|HTML]]
 +
|Page text
 +
|N/A
 +
|}
 +
 +
===Login page (create_account.html, login.html, password_forgotten.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|create_account.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|create_account.heading
 +
|[[#string|string]]
 +
|Page heading.
 +
|N/A
 +
|-
 +
|create_account.text
 +
|[[#string|string]]
 +
|Page text.
 +
|N/A
 +
|-
 +
|create_account.generated_password
 +
|[[#string|string]]
 +
|A randomly generated password suitable for the new account.
 +
|N/A
 +
|-
 +
|create_account.customers_personnummer
 +
|[[#string|string]]
 +
|
 +
|N/A
 +
|-
 +
|create_account.countries
 +
|association list
 +
|A list of country indices mapped to their names.
 +
|[[#dictionary|dictionary]] of [[#integer|integer]] to [[#string|string]] mappings.
 +
|}
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|login.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|login.heading
 +
|[[#string|string]]
 +
|Page heading
 +
|N/A
 +
|-
 +
|login.page_name
 +
|[[#string|string]]
 +
|
 +
|N/A
 +
|}
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|password_forgotten.form_action
 +
|[[#string|string]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|password_forgotten.back_href
 +
|[[#string|string]]
 +
|A link to the parent page (login.php)
 +
|N/A
 +
|}
 +
 +
 +
====Create account box (containboxes/create_account.html)====
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|containboxes.create_account.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|containboxes.create_account.text
 +
|[[#HTML|HTML]]
 +
|Box text
 +
|N/A
 +
|-
 +
|containboxes.create_account.generated_password
 +
|[[#string|string]]
 +
|A randomly generated password suitable for the new account.
 +
|N/A
 +
|-
 +
|containboxes.create_account.customers_personnummer
 +
|[[#string|string]]
 +
|The customer's personnummer
 +
|N/A
 +
|-
 +
|containboxes.create_account.countries
 +
|association list
 +
|A list of country indices mapped to their names.
 +
|[[#dictionary|dictionary]] of [[#integer|integer]] to [[#string|string]] mappings.
 +
|}
 +
 +
====Login box (containboxes/login_box.html)====
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|containboxes.login_box.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|}
 +
 +
====Password forgotten box (containboxes/password_forgotten_box.html)====
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|containboxes.password_forgotten_box.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|}
 +
 +
===Log off page (logoff.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|logoff.continue_href
 +
|[[#string|string]]
 +
|Link presented to the user after logging off.
 +
|N/A
 +
|}
 +
 +
===Manufacturers page (manufacturers.html)===
 +
manufacturers.list is a [[#list|list]] of [[#dictionary|dictionaries]] with these fields:
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|N/A
 +
|N/A
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|N/A
 +
|N/A
 +
|-
 +
|address
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|postcode
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|postal_address
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|visitational_address
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|country
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|telephone1
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|telephone2
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|fax
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|email_address
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|orgno
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|vat
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|note
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|plusgiro
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|bankgiro
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|postgiro
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|contact
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|payment_conditions
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|customers_no
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|video_1
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|video_2
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|extra1
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|extra2
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|extra3
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|homepage
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|link
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|seo_link
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|url
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|description
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|meta_title
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|meta_keywords
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|meta_description
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|seo_text
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|seo_title
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|extra4
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|extra5
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|date_added
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|last_modified
 +
|[[#string|string]]
 +
|N/A
 +
|N/A
 +
|-
 +
|number_of_products
 +
|[[#integer|integer]]
 +
|N/A
 +
|N/A
 +
|-
 +
|parent_id
 +
|[[#integer|integer]]
 +
|N/A
 +
|N/A
 +
|-
 +
|children
 +
|[[#list|list]] of [[#manufacturer|manufacturers]]
 +
|
 +
|
 +
|-
 +
|}
 +
 +
===News archive page (news_archive.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|news_archive.news
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|News articles
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|News article ID
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|Assigned image
 +
|-
 +
|title
 +
|[[#string|string]]
 +
|News article title
 +
|-
 +
|date
 +
|[[#string|string]]
 +
|News article publishing date
 +
|-
 +
|content
 +
|[[#string|string]]
 +
|News article content
 +
|-
 +
|short
 +
|[[#string|string]]
 +
|News article content, short version
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to news page
 +
|}
 +
|}
 +
 +
===News article page (news.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|Assigned image
 +
|N/A
 +
|-
 +
|news.title
 +
|[[#string|string]]
 +
|News article title
 +
|N/A
 +
|-
 +
|news.date
 +
|[[#string|string]]
 +
|Date of publishing
 +
|N/A
 +
|-
 +
|news.content
 +
|[[#string|string]]
 +
|News article content
 +
|N/A
 +
|-
 +
|news.short
 +
|[[#string|string]]
 +
|News article content, short version
 +
|N/A
 +
|}
 +
 +
===Newsletter page (newsletter.html)===
 +
{| class="wikitable"
 +
!Variable name    !! Type !! Description !! Format
 +
|-
 +
| newsletter.text || [[#HTML|HTML]] || The newsletter. ||N/A
 +
|}
 +
 +
===Product page (product.html)===
 +
{| class="wikitable"
 +
!Variable name                !! Type    !! Description !! Format
 +
|-
 +
| product.form_href || [[#URL|URL]] || Add to cart handler. || N/A
 +
|-
 +
| product.reviews_href || [[#URL|URL]] || Link to product reviews. || N/A
 +
|-
 +
| product.invalid_name || [[#string|string]] || Invalid product name page title. || N/A
 +
|-
 +
| product.invalid_text || [[#string|string]] || Invalid product name page text. || N/A
 +
|-
 +
| product.inactive_name || [[#string|string]] || Inactive product name page title. || N/A
 +
|-
 +
| product.inactive_text || [[#string|string]] || Inactive product name page text. || N/A
 +
|-
 +
|product.product_prev
 +
product.product_next
 +
|[[#dictionary|dictionary]]
 +
|Previous and next products in the current category.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id||[[#integer|integer]]||Product index.
 +
|-
 +
|image||[[#URL|URL]]||Product image.
 +
|-
 +
|name||[[#string|string]]||Product name.
 +
|-
 +
|href||[[#URL|URL]]||Product link
 +
|}
 +
|-
 +
| product.category_path || [[#list|list]] of [[#dictionary|dictionaries]] || Information about the current category path.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id||[[#integer|integer]]||Category index.
 +
|-
 +
|name||[[#string|string]]||Category name.
 +
|-
 +
|image||[[#URL|URL]]||Category image.
 +
|-
 +
|seo_link||[[#URL|URL]]||Category link.
 +
|}
 +
|-
 +
|product.product || [[#dictionary|dictionary]] || Product information
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id || [[#integer|integer]] || Product index.
 +
|-
 +
|parent_id||[[#integer|integer]]||Parent product index.
 +
|-
 +
|category || [[#tag|category]] || Product main category.
 +
|-
 +
|categories||[[#list|list]] of lists of [[#dictionary|dictionaries]]||Information for all product categories. See product.category_path.
 +
|-
 +
|tags||[[#list|list]] of [[#tag|tags]]||Tags set for this product.
 +
|-
 +
|attributes||[[#dictionary|dictionary]] with attribute options and choices. The key is the option ID.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id||[[#integer|integer]]||Type ID.
 +
|-
 +
|type||[[#integer|integer]]||Attribute option type.
 +
|-
 +
|name||[[#string|string]]||Option name.
 +
|-
 +
|values||[[#dictionary|dictionary]] of attribute values. The key is the value ID.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id||[[#integer|integer]]||Choice ID.
 +
|-
 +
|text||[[#string|string]]||Choice name including price.
 +
|-
 +
|text_clean||[[#string|string]]||Choice name without price.
 +
|-
 +
|image||[[#URL|URL]]||Choice image.
 +
|-
 +
|selected||[[#boolean|boolean]]||True is the attribute is selected for the current product.
 +
|-
 +
|price||[[#string|string]]||Attribute price.
 +
|-
 +
|price_raw||[[#string|string]]||Attribute price without currency formatting.
 +
|-
 +
|price_prefix||[[#string|string]]||Price prefix (+ or -).
 +
|}
 +
|}
 +
|-
 +
|date_added||[[#date|date]]||Date product was added.
 +
|-
 +
|date_available||[[#date|date]]||Date product will be available.
 +
|-
 +
|delivery_time||[[#string|string]]||Product delivery time.
 +
|-
 +
|description||[[#HTML|HTML]]||Product description.
 +
|-
 +
|description_short||[[#HTML|HTML]]||Short product description.
 +
|-
 +
|disabled||[[#boolean|boolean]]||Product disabled status.
 +
|-
 +
|ean1||[[#string|string]]||Product EAN.
 +
|-
 +
|external_url||[[#URL|URL]]||Product link.
 +
|-
 +
|extra1||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra2||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra3||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra4||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|extra5||[[#HTML|HTML]]||Custom product field.
 +
|-
 +
|video_url||[[#string|string]]||Link to Youtube or Vimeo video (video will be automatically embedded)
 +
|-
 +
|video_embed_code||[[#HTML|HTML]]||Custom video embed code snippet. Used instead of video_url if provided.
 +
|-
 +
|featured||[[#boolean|boolean]]||Featured product.
 +
|-
 +
|file||[[#URL|URL]]||Product file 1.
 +
|-
 +
|file2||[[#URL|URL]]||Product file 2.
 +
|-
 +
|full_products_id||[[#integer|integer]]||Requested product ID (including attributes).
 +
|-
 +
|image||[[#URL|URL]]||Product image.
 +
|-
 +
|image_href||[[#URL|URL]]||Link to full product image.
 +
|-
 +
|additional_images||Additional product images.
 +
|
 +
Requires setting EXPORT_ALLOW_ADDITIONAL_IMAGES to be enabled.
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|href||[[#URL|URL]]||Image thumbnail link.
 +
|-
 +
|image||[[#URL|URL]]||Image path.
 +
|-
 +
|description||[[#string|string]]||Image description.
 +
|}
 +
|-
 +
|files||Attached files.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|name||[[#string|string]]||File name.
 +
|-
 +
|path||[[#URL|URL]]||File link.
 +
|-
 +
|size||[[#integer|integer]]||Size in bytes.
 +
|}
 +
|-
 +
|last_modified||[[#date|date]]||Product last modified date.
 +
|-
 +
|lowest_number||[[#integer|integer]]||Minimum required order size.
 +
|-
 +
|manufacturer_model||[[#string|string]]||Product manufacturer model.
 +
|-
 +
|model||[[#string|string]]||Product model.
 +
|-
 +
|name||[[#string|string]]||Product name.
 +
|-
 +
|new_until||[[#date|date]]||Product is considered new until this date. Used in category filtering, twig functions etc.
 +
|-
 +
|next_delivery_date||[[#date|date]]||Next delivery date.
 +
|-
 +
|next_delivery_quantity||[[#string|string]]||Next delivery quantity.
 +
|-
 +
|tax||[[#decimal|decimal]]||Product tax rate.
 +
|-
 +
|price||[[#string|string]]||Product price.
 +
|-
 +
|price_raw||[[#string|string]]||Product price without currency formatting.
 +
|-
 +
|price_recommended||[[#string|string]]||Recommended product price.
 +
|-
 +
|price_recommended_raw||[[#string|string]]||Recommended product price without currency formatting.
 +
|-
 +
|price_special||[[#string|string]]||Special product price.
 +
|-
 +
|price_special_raw||[[#string|string]]||Special product price without currency formatting.
 +
|-
 +
|price_special_expires||[[#date|date]]||Expire date of the special product price.
 +
|-
 +
|price_log_price||[[#string|string]]||Lowest matching product price from price log. Only set if product has logged price changes.
 +
|-
 +
|price_log_price_raw||[[#string|string]]||Lowest matching product price from price log, without currency formatting. Only set if product has logged price changes.
 +
|-
 +
|price_log_price_ex_vat_raw||[[#string|string]]||Lowest matching product price from price log, without currency formatting and without vat. Only set if product has logged price changes.
 +
|-
 +
|price_discount_percentage||[[#integer|integer]]||Discount in percent for product.
 +
|-
 +
|rating||[[#decimal|decimal]]||Average review rating in increments of 0.5.
 +
|-
 +
|replacement_product||[[#string|string]]||Replacement product article number.
 +
|-
 +
|seo_link||[[#URL|URL]]||Product link.
 +
|-
 +
|stock||[[#integer|integer]]||Products in stock.
 +
|-
 +
|stock_allow_checkout||[[#boolean|boolean]]||Allow orders when stock is empty
 +
|-
 +
|type||[[#string|string]]||Product quantity type.
 +
|-
 +
|weight||[[#string|string]]||Product weight.
 +
|-
 +
|reorder_stock||[[#string|string]]||
 +
|-
 +
|stock_place||[[#string|string]]||Product location.
 +
|-
 +
|viewed||[[#integer|integer]]||Product view count.
 +
|-
 +
|ordered||[[#integer|integer]]||Product order count.
 +
|-
 +
|note||[[#string|string]]||Product note.
 +
|-
 +
|lead_time||[[#string|string]]||
 +
|-
 +
|price_in||[[#string|string]]||
 +
|-
 +
|shipping_class||int||Product shipping class. 1-10
 +
|-
 +
|discounts||[[#list|list]] of [[#discount|discounts]]||All discounts, with ''current_matches'' set.
 +
|-
 +
|}
 +
|-
 +
|product.manufacturer || [[#manufacturer|manufacturer]] || Product brand information
 +
|The manufacturer dictionary has an additional key named 'model' containing the manufacturer model for the product.
 +
|-
 +
|product.collection || [[#manufacturer|manufacturer]] || Product collection information
 +
|The collection dictionary has an additional key named 'model' containing the manufacturer model for the product.
 +
|}
 +
 +
===Product added to shopping cart page (product_added.html)===
 +
{| class="wikitable"
 +
!Variable name                !! Type    !! Description !! Format
 +
|-
 +
| product_added.checkout_href || [[#URL|URL]]    || A link to the checkout page. || N/A
 +
|-
 +
| product_added.product      || product || The product added.
 +
| The product has two additional keys.
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|quantity_added
 +
|[[#integer|integer]]
 +
|The quantity of the product added to the shopping cart
 +
|-
 +
|cart
 +
|[[#dictionary|dictionary]]
 +
|The data for a product in the shopping cart (see box or page).
 +
|}
 +
|}
 +
 +
===New products page (products_new.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|products_new.pagination
 +
|[[#pagination|pagination]]
 +
|Pagination info
 +
|N/A
 +
|-
 +
|products_new.page_href_format
 +
|[[#URL|URL]]
 +
|Pagination link format
 +
|N/A
 +
|-
 +
|products_new.products
 +
|products
 +
|A list of recently added products.
 +
|[[#list|list]] of products
 +
|}
 +
 +
===Product reviews page (product_reviews.html)===
 +
{| class="wikitable"
 +
!Variable name                    !! Type                !! Description !! Format
 +
|-
 +
| product_reviews.back_href        || [[#URL|URL]]                  || Link to the product page. || N/A
 +
|-
 +
| product_reviews.write_href      || [[#URL|URL]]                  || Link to the write review page. || N/A
 +
|-
 +
| product_reviews.product          || product              || The product. || N/A
 +
|-
 +
| product_reviews.pagination      || [[#pagination|pagination]]          || Pagination object for the reviews. || N/A
 +
|-
 +
| product_reviews.page_href_format || [[#URL|URL]]                  || Page format for the pagination. || N/A
 +
|-
 +
| product_reviews.reviews          || [[#list|list]] of [[#dictionary|dictionaries]] || The displayed reviews.
 +
|
 +
{| class="wikitable"
 +
!Key !! Type !! Description
 +
|-
 +
|href      || [[#URL|URL]]    || Link to the review page
 +
|-
 +
|author    || [[#string|string]]  || Author of the review
 +
|-
 +
|date      || [[#date|date]]  || The date the review was written
 +
|-
 +
|text      || [[#string|string]]  || The first 100 characters of the review text, lines broken at every 40 characters
 +
|-
 +
|full_text || [[#string|string]]  || The first 100 characters of the review text
 +
|-
 +
|rating    || [[#integer|integer]] || Review rating, 1-5.
 +
|}
 +
|}
 +
 +
===Review page (product_reviews_info.html)===
 +
{| class="wikitable"
 +
!Variable name                    !! Type      !! Description !! Format
 +
|-
 +
| product_reviews_info.back_href  || [[#URL|URL]]        || Link to the product reviews page. || N/A
 +
|-
 +
| product_reviews_info.write_href || [[#URL|URL]]        || Link to the write review page. || N/A
 +
|-
 +
| product_reviews_info.product    || product    || The product. || N/A
 +
|-
 +
| product_reviews_info.review    || [[#dictionary|dictionary]] || The displayed review.
 +
|
 +
{| class="wikitable"
 +
!Key !! Type !! Description
 +
|-
 +
|author    || [[#string|string]]  || Author of the review
 +
|-
 +
|date      || [[#date|date]]  || The date the review was written
 +
|-
 +
|text      || [[#string|string]]  || The review text, lines broken at every 60 characters
 +
|-
 +
|rating    || [[#integer|integer]] || Review rating, 1-5.
 +
|}
 +
|}
 +
 +
===Write review page (product_reviews_write.html)===
 +
{| class="wikitable"
 +
!Variable name                    !! Type      !! Description !! Format
 +
|-
 +
| product_reviews_write.form_href  || [[#URL|URL]]        || Form handler. || N/A
 +
|-
 +
| product_reviews_write.back_href  || [[#URL|URL]]        || Link to the product reviews page. || N/A
 +
|-
 +
| product_reviews_write.product    || product    || The product. || N/A
 +
|-
 +
| product_reviews_write.customer  || [[#dictionary|dictionary]] || Customer information.
 +
|
 +
{| class="wikitable"
 +
!Key !! Type !! Description
 +
|-
 +
|firstname || [[#string|string]] || First name of the customer writing the review.
 +
|-
 +
|lastname  || [[#string|string]] || Last name of the customer writing the review.
 +
|}
 +
|}
 +
 +
===Question about product page (question_about_product.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|question_about_product.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|question_about_product.back_href
 +
|[[#URL|URL]]
 +
|Link back to the product page
 +
|N/A
 +
|-
 +
|question_about_product.product
 +
|product
 +
|Product information.
 +
|N/A
 +
|}
 +
 +
===Product reviews page (reviews.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|reviews.pagination
 +
|[[#pagination|pagination]]
 +
|Pagination info
 +
|N/A
 +
|-
 +
|reviews.page_href_format
 +
|[[#URL|URL]]
 +
|Pagination link format
 +
|N/A
 +
|-
 +
|reviews.reviews
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Product reviews
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|href
 +
|[[#URL|URL]]
 +
|A link to the review page
 +
|-
 +
|product
 +
|[[#string|string]]
 +
|Product name
 +
|-
 +
|author
 +
|[[#string|string]]
 +
|Review author
 +
|-
 +
|date
 +
|[[#date|date]]
 +
|Review date
 +
|-
 +
|image
 +
|[[#string|string]]
 +
|Product image
 +
|-
 +
|text
 +
|[[#HTML|HTML]]
 +
|Abbreviated review text
 +
|-
 +
|full_text
 +
|[[#string|string]]
 +
|Unabbreviated review text
 +
|-
 +
|rating
 +
|[[#HTML|HTML]]
 +
|Product rating
 +
|}
 +
|}
 +
 +
===Shopping cart page (shopping_cart.html)===
 +
 +
These variables are available on shopping_cart.php only.
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|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
 +
|
 +
|
 +
|}
 +
 +
These variables are available in <tt>pages/checkout/shopping_cart.html</tt> through <tt>ajax_include.php?page=loadcart</tt>, <tt>pages/checkout.html</tt> through <tt>checkout.php</tt> and <tt>pages/shopping_cart.html</tt> through <tt>shopping_cart.php</tt>:
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|shopping_cart.list
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Products in the shopping cart.
 +
|-
 +
|shopping_cart.products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Same as ''shopping_cart.list''.
 +
|-
 +
|shopping_cart.any_out_of_stock
 +
|[[#integer|integer]]
 +
|1 if any product in the shopping cart is out of stock, 0 otherwise.
 +
|-
 +
|shopping_cart.total
 +
|[[#string|string]]
 +
|The currency formatted total cost of the shopping cart, tax included unless tax display inactivated.
 +
|-
 +
|shopping_cart.discounts
 +
|[[#list|list]] of [[#discount|discounts]]
 +
|
 +
|}
 +
 +
Each product has the following format:
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|
 +
|
 +
|-
 +
|parent_id
 +
|
 +
|
 +
|-
 +
|final_price
 +
|
 +
|
 +
|-
 +
|final_price_raw
 +
|
 +
|
 +
|-
 +
|image
 +
|
 +
|
 +
|-
 +
|manufacturers_id
 +
|
 +
|
 +
|-
 +
|collection_id
 +
|
 +
|
 +
|-
 +
|model
 +
|
 +
|
 +
|-
 +
|name
 +
|
 +
|
 +
|-
 +
|package_content
 +
|
 +
|
 +
|-
 +
|price
 +
|
 +
|
 +
|-
 +
|price_raw
 +
|
 +
|
 +
|-
 +
|quantity
 +
|
 +
|
 +
|-
 +
|weight
 +
|
 +
|
 +
|-
 +
|href
 +
|
 +
|
 +
|-
 +
|unit
 +
|
 +
|
 +
|-
 +
|type
 +
|
 +
|
 +
|-
 +
|total_price
 +
|
 +
|
 +
|-
 +
|total_price_raw
 +
|
 +
|
 +
|-
 +
|total_final_price
 +
|
 +
|
 +
|-
 +
|total_final_price_raw
 +
|
 +
|
 +
|-
 +
|final_price_difference
 +
|
 +
|
 +
|-
 +
|final_price_difference_raw
 +
|
 +
|
 +
|-
 +
|total_final_price_difference
 +
|
 +
|
 +
|-
 +
|total_final_price_difference_raw
 +
|
 +
|
 +
|-
 +
|final_price_discount_percent
 +
|
 +
|
 +
|-
 +
|price_per_unit
 +
|
 +
|
 +
|-
 +
|final_price_per_unit
 +
|
 +
|
 +
|-
 +
|quantity_in_unit
 +
|
 +
|
 +
|-
 +
|stock_quantity
 +
|
 +
|
 +
|-
 +
|discounts
 +
|[[#list|list]]
 +
|
 +
{|class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|
 +
|
 +
|-
 +
|required_count_min
 +
|
 +
|
 +
|-
 +
|required_count_max
 +
|
 +
|
 +
|-
 +
|required_total_min
 +
|
 +
|
 +
|-
 +
|required_total_max
 +
|
 +
|
 +
|-
 +
|discount_percent
 +
|
 +
|
 +
|-
 +
|discount_price
 +
|
 +
|
 +
|-
 +
|discount_count
 +
|
 +
|
 +
|}
 +
|-
 +
|variants
 +
|[[#list|list]]
 +
|
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
| id ||
 +
|-
 +
| name ||
 +
|-
 +
| choice || [[#dictionary|dictionary]] ||
 +
{| class="wikitable"
 +
! Key !! Description
 +
|-
 +
| id ||
 +
|-
 +
| name ||
 +
|}
 +
|}
 +
|-
 +
|attributes
 +
|[[#dictionary|dictionary]]
 +
|
 +
{|class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|type
 +
|
 +
|
 +
|-
 +
|id
 +
|
 +
|
 +
|-
 +
|name
 +
|
 +
|
 +
|-
 +
|value_id
 +
|
 +
|
 +
|-
 +
|value
 +
|
 +
|
 +
|-
 +
|price
 +
|
 +
|
 +
|-
 +
|price_prefix
 +
|
 +
|
 +
|}
 +
|-
 +
|data
 +
|[[#dictionary|dictionary]]
 +
|Custom data stored on the shopping cart entry.
 +
|}
 +
 +
===Specials page (specials.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|specials.pagination
 +
|[[#pagination|pagination]]
 +
|Pagination info
 +
|N/A
 +
|-
 +
|specials.page_href_format
 +
|[[#URL|URL]]
 +
|Pagination link format
 +
|N/A
 +
|-
 +
|specials.specials
 +
|products
 +
|A list of products with special prices.
 +
|[[#list|list]] of products
 +
|}
 +
 +
===Tell a friend page (tell_a_friend.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|tell_a_friend.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 +
|-
 +
|tell_a_friend.back_href
 +
|[[#URL|URL]]
 +
|Link back to the product page
 +
|N/A
 +
|-
 +
|tell_a_friend.product
 +
|product
 +
|Product information.
 +
|N/A
 +
|}
 +
 +
=Extensions=
 +
==Functions==
 +
===build(string, array, array)===
 +
Creates the target file as the concatenation of the list of source files.
 +
SCSS-files are compiled to CSS.
 +
The target file is updated when any of the source files have a modified date later than that of the target file.
 +
 +
Relative paths in CSS-files are not updated, take care that the information referenced is reachable from the output directory.
 +
If the generated file is put in the same directory as the source files, it should work as paths relative to the generated URL will still work.
 +
 +
JavaScript-files can also be built.
 +
<nowiki><link rel="stylesheet" href="{{ build('output/out.css',
 +
  ['input/a.css', 'input/b.css', 'input/test.scss']) }}"></nowiki>
 +
The returned string could look like this:
 +
/static/9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08/template/output/out.css
 +
 +
The third parameter is an optional list of options. The currently supported options are "dry-run" and "force".  "dry-run" causes the function to return the URL to the output file without generating or regerenrating it.  "force" causes the function to always regenerate the output file.
 +
<nowiki><link rel="stylesheet" href="{{ build('output/out.css',
 +
  ['input/a.css', 'input/b.css', 'input/test.scss'],
 +
  ['dry-run', 'force']) }}"></nowiki>
 +
 +
===is_numeric(variable)===
 +
true/false to see if a variable is a number (float or int). Same as the PHP function.
 +
 +
<nowiki>{{ is_numeric(variable) }}</nowiki>
 +
 +
===check_customer_exists(value, field)===
 +
 +
Returns true/false if customer exists.
 +
 +
Will check if a customer exists based on field. Current accepted fields are 'id' (default) and 'personnummer'
 +
 +
<nowiki>check_customer_exists('900805-2122', 'personnummer')</nowiki>
 +
 +
===file_exists(file)===
 +
 +
Returns true/false if template file found.
 +
 +
===product_has_associated_products(products_id [, associations_type = 0])===
 +
Returns a boolean indicating if the product has associated products of the requested type.
 +
 +
===get_associated_products(products_id [, associations_type = 0 [, order_by = 'association_priority' [, replace_variants = false]]])===
 +
Returns a product listing of associated products for the given product.
 +
 +
Use type = -1 for "customers who bought this also bought...".
 +
 +
<nowiki>{% import 'helpers/html.html' as html %}
 +
{% for p in get_associated_products(product.product.id) %}
 +
  {{ html.listed_product(p) }}
 +
{% endfor %}</nowiki>
 +
 +
To get the priority of the associated product use the field associated_priority.
 +
 +
If order_by is omitted, the associated product priority (products_associations.priority) is used as default.
 +
 +
'''Valid values for order_by'''
 +
 +
* <tt>date_added:asc</tt>
 +
* <tt>date_added</tt> (evaluates to <tt>date_added:desc</tt>)
 +
* <tt>date_added:desc</tt>
 +
* <tt>new_until:asc</tt>
 +
* <tt>new_until:desc</tt>
 +
* <tt>rand</tt>
 +
* <tt>sort_order</tt>
 +
* <tt>products_ordered_recent</tt> (DESC is default order)
 +
* <tt>products_name:asc</tt>
 +
* <tt>products_name:desc</tt>
 +
* <tt>products_model:asc</tt>
 +
* <tt>products_model:desc</tt>
 +
* <tt>products_price:asc</tt>
 +
* <tt>products_price:desc</tt>
 +
 +
The parameter replace_variants replaces the associated products with their parent products.
 +
 +
===get_associated_product_types()===
 +
Returns an indexed listing of all associated product types.
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|The association type's id.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|The association type's name.
 +
|}
 +
 +
The default associated product types are:
 +
 +
{| class="wikitable"
 +
!id
 +
!name
 +
|-
 +
| -1
 +
|Andra som köpte denna köpte även
 +
|-
 +
|0
 +
|Associerade produkter
 +
|}
 +
 +
Example syntax:
 +
 +
<nowiki>{{ get_associated_product_types() }}</nowiki>
 +
 +
===get_categories(products_id)===
 +
Returns the categories for the given product.
 +
 +
<nowiki><ul>
 +
{% for c in get_categories(product.product.id) %}
 +
  <li><a href="{{ c.id }}">{{ c.name }}</a></li>
 +
{% endfor %}
 +
</ul></nowiki>
 +
 +
===get_category_tree(categories_id, [options])===
 +
Returns a category tree starting from the requested ID.  Using 0 for the ID is not possible.
 +
 +
<nowiki>{{ get_category_tree(123, ['inactive']) }}</nowiki>
 +
 +
===get_coupon_codes_by_category(category_input)===
 +
Returns active coupon codes by category. The input parameter may be a category id or an array of category ids. Only valid coupon codes for the currently logged in customer are returned.
 +
 +
<nowiki>{{ get_coupon_codes_by_category(11) }}</nowiki>
 +
<nowiki>{{ get_coupon_codes_by_category([11, 164, 182]) }}</nowiki>
 +
 +
===get_coupon_codes_by_manufacturer(manufacturer_input)===
 +
Returns active coupon codes by manufacturer. The input parameter may be a manufacturer id or an array of manufacturer ids. Only valid coupon codes for the currently logged in customer are returned.
 +
 +
<nowiki>{{ get_coupon_codes_by_manufacturer(12) }}</nowiki>
 +
<nowiki>{{ get_coupon_codes_by_manufacturer([12, 18, 64]) }}</nowiki>
 +
 +
===get_customer_address_book()===
 +
Returns the customer's address book based on session customer id.
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#int|int]]
 +
|
 +
|-
 +
|type_id
 +
|[[#string|string]]
 +
|
 +
|-
 +
|type_name
 +
|[[#string|string]]
 +
|
 +
|-
 +
|firstname
 +
|[[#string|string]]
 +
|
 +
|-
 +
|lastname
 +
|[[#string|string]]
 +
|
 +
|-
 +
|company
 +
|[[#string|string]]
 +
|
 +
|-
 +
|street_address
 +
|[[#string|string]]
 +
|
 +
|-
 +
|street_address2
 +
|[[#string|string]]
 +
|
 +
|-
 +
|suburb
 +
|[[#string|string]]
 +
|
 +
|-
 +
|city
 +
|[[#string|string]]
 +
|
 +
|-
 +
|postcode
 +
|[[#string|string]]
 +
|
 +
|-
 +
|state
 +
|[[#string|string]]
 +
|
 +
|-
 +
|zone_id
 +
|[[#string|string]]
 +
|
 +
|-
 +
|country
 +
|[[#string|string]]
 +
|
 +
|}
 +
 +
===get_customer_country_by_ip()===
 +
Returns an array with information about country based on users IP.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Country name (e.g. ''Sverige'')
 +
|-
 +
|country_id
 +
|[[#integer|integer]]
 +
|Country ID
 +
|-
 +
|iso2
 +
|[[#string|string]]
 +
|Two letter country code (e.g. ''SE'')
 +
|-
 +
|iso3
 +
|[[#string|string]]
 +
|Three letter country code (e.g. ''SWE'')
 +
|-
 +
|}
 +
 +
===get_customer_logins()===
 +
Returns an array containing all the customer logins.
 +
<nowiki>{{ get_customer_logins() | json_encode }}</nowiki>
 +
 +
===get_customer_order(order_id)===
 +
Returns a customer order with the same data structure as on Order Info Page ([[Templating:Variables#Order_info_page_.28account_history_info.html.29|account_history_info]]), with the exception of returning <code>parcel_id</code> instead of <code>events</code> (order delivery events), <code>id</code> instead of <code>id_formatted</code>, and <code>status_id</code> in addition to <code>status</code>.
 +
 +
===get_customer_orders()===
 +
Returns the customer's orders with the highest order id first.
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|The order's id.
 +
|}
 +
 +
===get_product_extended_data_fields(product_id)===
 +
Returns extended data field information
 +
 +
===get_customer_subscription_info()===
 +
Returns information about subscriptions.
 +
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 +
|-
 +
|shopping_cart_subscriptions
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Subscriptions that would be generated from the shopping cart contents.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|
 +
|-
 +
|status
 +
|[[#boolean|boolean]]
 +
|False if the subscription has been inactivated.
 +
|-
 +
|created_at
 +
|[[#date|date]]
 +
|
 +
|-
 +
|period
 +
|[[#string|string]]
 +
|The subscription period in the subscription period string format.  1m1d -- 12m31d, 1W1w -- 52W7w, 1d --.
 +
|-
 +
|period_description
 +
|[[#string|string]]
 +
|The subscription period in a textual format, for example "var 3:e vecka".
 +
|-
 +
|payment_method_code
 +
|[[#string|string]]
 +
|
 +
|-
 +
|payment_method_title
 +
|[[#string|string]]
 +
|Current title for the selected payment method.
 +
|-
 +
|shipping_method_code
 +
|[[#string|string]]
 +
|
 +
|-
 +
|shipping_method_code
 +
|[[#string|string]]
 +
|Current title for the selected shipping method.
 +
|-
 +
|delivery_firstname
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_lastname
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_company
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_street_address
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_street_address2
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_city
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_postcode
 +
|[[#string|string]]
 +
|
 +
|-
 +
|delivery_country
 +
|[[#string|string]]
 +
|
 +
|-
 +
|orders
 +
|[[#list|list]] of orders
 +
|Previously created orders.
 +
|-
 +
|undelivered_orders
 +
|[[#list|list]] of orders
 +
|Previously created orders, for which the shipping date has not yet passed.
 +
|-
 +
|products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|-
 +
|quantity
 +
|[[#integer|integer]]
 +
|-
 +
|product
 +
|[[#product|product]]
 +
|-
 +
|}
 +
|-
 +
|changes
 +
|[[#dictionary|dictionary]] of [[#list|lists]] of [[#dictionary|dictionaries]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
|-
 +
|date
 +
|[[#date|date]]
 +
|-
 +
|products_index
 +
|[[#integer|integer]] or null
 +
|-
 +
|id
 +
|[[#integer|integer]] or null
 +
|-
 +
|quantity
 +
|[[#integer|integer]] or null
 +
|-
 +
|product
 +
|[[#product|product]] or null
 +
|-
 +
|}
 +
If products_index is null it is a new product row, otherwise it is an index into the products list.  If id is null the indicated product is removed.
 +
|-
 +
|pauses
 +
|[[#list|list]] of [[#date|date]]
 +
|Subscription-specific pauses.
 +
|-
 +
|next_deliveries
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
|-
 +
|creation_date
 +
|[[#date|date]]
 +
|-
 +
|delivery_date
 +
|[[#date|date]]
 +
|-
 +
|paused
 +
|[[#bool|bool]]
 +
|-
 +
|paused_globally
 +
|[[#bool|bool]]
 +
|-
 +
|paused_customer
 +
|[[#bool|bool]]
 +
|-
 +
|changes
 +
|[[#list|list]] of [[#dictionary|dictionaries]]; refer to the changes format
 +
|-
 +
|}
 +
The next 20 deliveries, pauses not taken into account.
 +
|-
 +
|next_creation_dates
 +
|[[#list|list]] of [[#date|date]]
 +
|The next 10 order creation dates, paused orders skipped.
 +
|-
 +
|next_delivery_dates
 +
|[[#list|list]] of [[#date|date]]
 +
|The delivery dates for the orders in next_creation_orders, paused orders skipped.
 +
|-
 +
|}
 +
|-
 +
|subscriptions
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Previous subscriptions.
 +
|The format is the same as for shopping_cart_subscriptions.
 +
|-
 +
|pauses
 +
|[[#list|list]] of [[#date|date]]
 +
|Global pauses in deliveries.
 +
|N/A
 +
|-
 +
|delivery_minimum_days
 +
|[[#integer|integer]]
 +
|Minimum number of days from an automatic subscription order creation to a delivery.
 +
|N/A
 +
|-
 +
|}
 +
===get_delivery_status()===
 +
Returns an array containing an array with the history from Unifaun and the order_status from Admin.
 +
<nowiki>{{ get_delivery_status() | json_encode }}</nowiki>
 +
 +
===get_discounts()===
 +
Returns the active discounts.
 +
 +
<nowiki>{{ get_discounts() | json_encode }}</nowiki>
 +
 +
===get_discounted_product_discount(product_id, [customers_group_id])===
 +
Returns the active discounts matching a product.
 +
 +
<nowiki>{
 +
    "when": {
 +
        {"name": "Ta 3 betala för 2"}
 +
    },
 +
    "what": {
 +
        {"name": "Ta 3 betala för 2"},
 +
        {"name": "Köp över 699kr, få ett hårband på köpet"}
 +
    }
 +
}</nowiki>
 +
 +
===get_download_link(download_url)===
 +
Returnss a download link for the given URL.  null is returned for errors, such as for invalid URLs.
 +
 +
Example:
 +
 +
<nowiki>{{ get_download_link('https://www.example.com/test.pdf') }}</nowiki>
 +
 +
Output:
 +
 +
<nowiki>https://www.example.org/ajax.php?mode=download&key=p6dNyTcma5BpinFPOBPbGAx-ItgdhKP0WZz_b66PBoHfCd1Tqk52skjHyyKWvQponX6THYOQdAkTaAZA2CcVj9sR0ZjeYiFMLib_ndk32g9Z19VBMsZ65eaKchUfsvqE-MKGkb77v1EleUWDGSsJV3Zb12lEep8DMZaglavF3iSVEg4FcWOl</nowiki>
 +
 +
===get_information_page_tree(page_id, [options])===
 +
Returns a page tree starting from the requested page_id. The tree has the same structure as boxes.information_pages.tree (see above). Using 0 for the ID *is* possible and returns a tree of all pages. Omitting the page_id will yield the same result as setting page_id to 0. The only options supported are "inactive" (include inactive pages) and "hidden" (include hidden pages).
 +
 +
<nowiki>{{ get_information_page_tree() }}</nowiki>
 +
<nowiki>{{ get_information_page_tree(30) }}</nowiki>
 +
<nowiki>{{ get_information_page_tree(30, ['inactive']) }}</nowiki>
 +
 +
Remember it doesn't return an array straight, so you can do this:
 +
 +
<nowiki>{% for c in [get_information_page_tree(id)] %}</nowiki>
 +
 +
Unless you go for children example:
 +
 +
<nowiki>{% for c in get_information_page_tree(81, ['hidden']).children %}</nowiki>
 +
 +
You can also access key values directly like:
 +
 +
<nowiki>{{ get_information_page_tree(id).name }}</nowiki>
 +
 +
===get_manufacturer(manufacturers_id)===
 +
Returns a specific manufacturer.
 +
 +
<nowiki>{{ get_manufacturer(123) }}</nowiki>
 +
 +
===get_manufacturer_category_tree(manufacturer_id)===
 +
Returns a simple category tree filtered by manufacturer. Only the categories containing active products with the selected manufacturer are returned. Also returns a count of those products for each section of the category tree.
 +
 +
<nowiki>{{ get_manufacturer_category_tree(123 }}</nowiki>
 +
 +
Result item structure:
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Category ID
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Category name
 +
|-
 +
|href
 +
|[[#URL|URL]]
 +
|Absolute url path to the category
 +
|-
 +
|seo_link
 +
|[[#URL|URL]]
 +
|Relative url path to the category
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|Category image url
 +
|-
 +
|children
 +
|[[#array|array]]
 +
|Category children
 +
|-
 +
|product_count
 +
|[[#integer|integer]]
 +
|Number of products matching the manufacturer in the category and all child categories
 +
|-
 +
|}
 +
 +
===get_markets_for_countries([countries_id])===
 +
Returns an array containing the countries selected. In the array for a country are the markets that it's connected to and information about that market.
 +
 +
===get_unit(unit_id)===
 +
Returns an array with information about a unit.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|title
 +
|[[#string|string]]
 +
|Title of unit (e.g. ''Styck'')
 +
|-
 +
|abbr
 +
|[[#string|string]]
 +
|Abbreviation of title (e.g. ''st'')
 +
|-
 +
|relation_id
 +
|[[#integer|integer]]
 +
|ID of unit it's connected to
 +
|-
 +
|calculation_value
 +
|[[#integer|integer]]
 +
|Value in relation to connected unit
 +
|-
 +
|}
 +
 +
===get_page_content_block_history([filterByLanguageId = 0 [, groupByDate = true [, pageId = 0]]])===
 +
 +
Returns a list of all content block changes in descending chronological order. If filterByLanguageId is not sent, then all language changed will be included. Same with pageId.
 +
 +
NOTE: The function will return a maximum of 250 results.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|page_id
 +
|[[#integer|integer]]
 +
|Page ID
 +
|-
 +
|page_title
 +
|[[#string|string]]
 +
|Page title
 +
|-
 +
|date_changed
 +
|[[#date|date]]
 +
|Date for the change
 +
|-
 +
|changed_by
 +
|[[#string|string]]
 +
|Name of the admin who saved the page, if super admin then this will only return "Vendre"
 +
|-
 +
|language_id
 +
|[[#int|int]]
 +
|Language id of the change
 +
|-
 +
|language_name
 +
|[[#string|string]]
 +
|Language name
 +
|-
 +
|language_code
 +
|[[#string|string]]
 +
|Two letter ISO language code
 +
|-
 +
|}
 +
 +
===get_partners([options])===
 +
Returns all partners. The only options supported are
 +
 +
* "active", which filters out inactive partners
 +
* "visible", which filters out partners hidden from listing
 +
* "stocked", which filters out unstocked partners
 +
* "translate", which translates worktitle and description
 +
 +
NB: The default options are "translate", "active" and "visible" (used when the function is called without an options array).
 +
 +
<nowiki>{{ get_partners() }}</nowiki>
 +
<nowiki>{{ get_partners(["translate"]) }}</nowiki>
 +
<nowiki>{{ get_partners(["translate", "active", "stocked"]) }}</nowiki>
 +
 +
===get_partners_stock(product_id)===
 +
Returns an array with all partner stock for a chosen product. The key for each row is the partner id.
 +
 +
Example response:
 +
 +
<nowiki>{
 +
    "1": {
 +
        "products_quantity": 2
 +
    },
 +
    "2": {
 +
        "products_quantity": 12
 +
    },
 +
    "3": {
 +
        "products_quantity": 0
 +
    },
 +
    "9": {
 +
        "products_quantity": 4
 +
    }
 +
}</nowiki>
 +
 +
===get_product(search, mode, [options])===
 +
Returns a single product. Valid search modes are product <tt>id</tt> (default), <tt>model</tt>, <tt>manufacturer_model</tt> or <tt>ean</tt>. When searching by product id, mode should be omitted or included as empty string.
 +
 +
<nowiki>{{ get_product(10) }}</nowiki>
 +
<nowiki>{{ get_product("ve4875", "model") }}</nowiki>
 +
<nowiki>{{ get_product("7313222320034", "ean") }}</nowiki>
 +
<nowiki>{{ get_product("ve4875", "model", ["inactive"]) }}</nowiki>
 +
 +
By default only active products are returned. The only options supported are "inactive" (return both active and inactive products) and "inactive_only" (include only inactive products).
 +
 +
===get_product_attributes(product_id)===
 +
Returns the product's attributes as a dictionary where the attribute id is used as the key and the elements have the below structure.
 +
The passed product id can be a product id string, including selected attributes.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Attribute ID.
 +
|-
 +
|type
 +
|[[#integer|integer]]
 +
|Attribute type.  0 for regular multi-choice attributes, 1 for attributes where a text can be entered, 2 for image attributes.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Attribute name.
 +
|-
 +
|values
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|Option ID.
 +
|-
 +
|text
 +
|[[#string|string]]
 +
|Option name with price.
 +
|-
 +
|text_clean
 +
|[[#string|string]]
 +
|Option name.
 +
|-
 +
|comment
 +
|[[#string|string]]
 +
|
 +
|-
 +
|image
 +
|[[#URL|URL]]
 +
|
 +
|-
 +
|selected
 +
|[[#boolean|boolean]]
 +
|If the passed product id has attributes included, this is set to true for the selected options.
 +
|-
 +
|price
 +
|[[#string|string]]
 +
|Formatted price.
 +
|-
 +
|price_raw
 +
|[[#float|float]]
 +
|Raw price.
 +
|-
 +
|price_prefix
 +
|[[#string|string]]
 +
| + or -.
 +
|}
 +
|}
 +
 +
===get_product_files(product_id)===
 +
Returns an array with links and info relating to attached product files.
 +
 +
'''''Note that this function is resource intensive (due to looking up and confirming the files by accessing the system each time), so use it sparingly and be aware that it may adversely affect site performance.'''''
 +
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|name||[[#string|string]]||File name.
 +
|-
 +
|path||[[#URL|URL]]||File link.
 +
|-
 +
|size||[[#integer|integer]]||Size in bytes.
 +
|}
 +
 +
===get_product_units(product_id, [load_unit])===
 +
Returns multidimensional array with the product's configured units indexed by Unit ID. The array will be sorted by the amount value (ascending). If load_unit is true, a unit array will be included in the returned array.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|unitId
 +
|[[#integer|integer]]
 +
|Unit ID
 +
|-
 +
|amount
 +
|[[#integer|integer]]
 +
|Amount relative to the products primary unit.
 +
|-
 +
|unit
 +
|[[#array|array]]
 +
|Array with unit info (as returned from get_unit). NOTE: Available only if load_unit is true.
 +
|-
 +
|}
 +
 +
===get_product_customer_group_prices(product_id)===
 +
Returns the available prices for a product as an array of dictionaries with the keys quantity, active_from, active_to, price and price_incl.  price_rek_incl is also returned with the function activated.  The prices are returned as raw prices.
 +
 +
<nowiki>{{ get_product_customer_group_prices(10) }}</nowiki>
 +
 +
===get_product_variants(product_id[, parent_id])===
 +
Returns information about variants for the given product. The information returned is the same as is stored in modules.products_variants, except that category is not included.
 +
 +
===get_product_variant_choices(product_id)===
 +
Returns information about the selected variant choices for the given product. The information returned is the same as is stored in modules.products_variants.{choices}, except only the choices that match the selected product are returned.
 +
 +
===get_products(limit, [search], order_by, mode, [options])===
 +
Returns all products which match the values in the search array.
 +
 +
<nowiki>{{ get_products(6, [157, 164, 182]) }}</nowiki>
 +
<nowiki>{{ get_products(6, [157, 164, 182], "rand") }}</nowiki>
 +
<nowiki>{{ get_products(6, ["ve4875", "ve5299", "ve6988"], "sort_order", "model")  }}</nowiki>
 +
<nowiki>{{ get_products(6, ["ve4875", "ve5299", "ve6988"], "sort_order", "model", ["inactive"])  }}</nowiki>
 +
 +
([[#int|int]]) limit - maximum amount of products to return
 +
 +
([[#array|array]]) search
 +
* on default mode: array of product ids
 +
* on mode "model": array of models
 +
* on mode "extra_field_X" (1-5): array of values to match with extra field
 +
([[#string|string]]) order_by (required if mode is <tt>"model"</tt>)
 +
* <tt>"brand"</tt>, <tt>"brand:asc"</tt>, <tt>"manufacturer"</tt>, <tt>"manufacturer:asc"</tt>:  Sort products by manufacturer name, ascending.
 +
* <tt>"brand:desc"</tt>, <tt>"manufacturer:desc"</tt>:  Sort products by manufacturer name, descending.
 +
* <tt>"date_added:asc"</tt>:  Sort products by date added and order added, the oldest products first.
 +
* <tt>"date_added"</tt>, <tt>"date_added:desc"</tt>:  Sort products by date added and order added, the newest products first.
 +
* <tt>"model"</tt>, <tt>"model:asc"</tt>, <tt>"products_model"</tt>, <tt>"products_model:asc"</tt>:  Sort products by model/article number, ascending.
 +
* <tt>"model:desc"</tt>, <tt>"products_model:desc"</tt>:  Sort products by model/article number, descending.
 +
* <tt>"name"</tt>, <tt>"name:asc"</tt>, <tt>"products_name"</tt>, <tt>"products_name:asc"</tt>:  Sort products by product name, ascending.
 +
* <tt>"name:desc"</tt>, <tt>"products_name:desc"</tt>:  Sort products by product name, descending.
 +
* <tt>"ordered_recent"</tt>, <tt>"ordered_recent:desc"</tt>, <tt>"products_ordered_recent"</tt>, <tt>"products_ordered_recent:desc"</tt>:  Sort products by recently ordered, the latest ordered products first.
 +
* <tt>"ordered_total"</tt>, <tt>"ordered_total:desc"</tt>:  Sort products by total amount ordered, the highest totals first.
 +
* <tt>"price:asc"</tt>, <tt>"producs_price:asc"</tt>:  Sort products by price, ascending.
 +
* <tt>"price:desc"</tt>, <tt>"producs_price:desc"</tt>:  Sort products by price, descending.
 +
* <tt>"price_recommended:asc"</tt>:  Sort products by recommended price, ascending.
 +
* <tt>"price_recommended:desc"</tt>:  Sort products by recommended price, descending.
 +
* <tt>"rand"</tt>, <tt>"random"</tt>:  Sort products by number of tag matches, then randomly.
 +
* <tt>"sort_order"</tt>:  Sort products by sort order.
 +
* <tt>"tags+date_added:asc"</tt>:  Sort products by number of tag matches, then by date added and order added, the oldest products first.
 +
* <tt>"tags+date_added"</tt>, <tt>"tags+date_added:desc"</tt>:  Sort products by number of tag matches, then by date added and order added, the newest products first.
 +
* <tt>"weight:asc"</tt>:  Sort products by weight, ascending.
 +
* <tt>"weight:desc"</tt>:  Sort products by weight, descending.
 +
* Any other string:  Sort products by order added, the first added products first.
 +
([[#string|string]]) mode
 +
* empty string (default): array of product ids
 +
* <tt>"model"</tt>: array of models
 +
* <tt>"extra_field_X"</tt> (1-5): array of values to match with extra field
 +
([[#array|array]]) options (only active products are returned by default)
 +
* <tt>"inactive"</tt>: return both active and inactive products
 +
* <tt>"inactive_only"</tt>: return only inactive products
 +
* <tt>"new_only"</tt>: return only new products
 +
 +
===get_products_with_specials([page_limit = 10[, page_index = 1[, order_by = 'sort_order'[, sort_order = 'ASC']]]])===
 +
Returns products who have an active special price. Only active products shown in listing are returned. The function uses page_limit and page_index to paginate the query result and only return the matching subset. The "pagination" data set in the return data contains all data necessary for creating pagination controls in the storefront.
 +
 +
To use the function without pagination, simply treat page_limit as a standard hard limit and leave page_index as 1. The "pagination" data set in the return data may be ignored in this case.
 +
 +
N.B. This function was created as a replacement for specials.php
 +
 +
<nowiki>{{ get_products_with_specials() }}</nowiki>
 +
<nowiki>{{ get_products_with_specials(100) }}</nowiki>
 +
<nowiki>{{ get_products_with_specials(10, 2) }}</nowiki>
 +
<nowiki>{{ get_products_with_specials(15, 3, 'name', 'DESC') }}</nowiki>
 +
 +
([[#int|int]]) page_limit - maximum amount of products to return for the selected page_index (if not using pagination, page_index should always be 1)
 +
([[#int|int]]) page_index - current page, minimum is 1. Used when paginating results.
 +
 +
([[#string|string]]) order_by
 +
* <tt>"brand"</tt>: sort products by brand.
 +
* <tt>"date_added"</tt>: sort products by date_added.
 +
* <tt>"extra_field_2"</tt>: sort products by extra_field_2.
 +
* <tt>"model"</tt>: sort products by model.
 +
* <tt>"new_until"</tt>: sort products by new_until.
 +
* <tt>"ordered_recent"</tt>: sort products by ordered_recent (also know as best selling products since x days).
 +
* <tt>"ordered_total"</tt>: sort products by ordered_total (also know as best selling products since beginning of time).
 +
* <tt>"price"</tt>: sort products by price.
 +
* <tt>"price_recommended"</tt>: sort products by price_recommended.
 +
* <tt>"random"</tt>: sort products by random.
 +
* <tt>"sort_order"</tt>: sort products by sort_order.
 +
* <tt>"weight"</tt>: sort products by weight.
 +
 +
([[#string|string]]) sort_order
 +
* <tt>"ASC"</tt>: sort products in ascending order.
 +
* <tt>"DESC"</tt>: sort products in descending order.
 +
 +
===get_specification_values_by_id(specification_id)===
 +
Returns unique specification values by specification id (category id of type specification). Retrieved values are sorted alphabetically the way a human would sort them (uses strnatcmp for consistency with specification filter sorting).
 +
 +
<nowiki>{{ get_specification_values_by_id(30) }}</nowiki>
 +
 +
See below for expected return value structure.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|The ID belonging to the specification.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|The name of the specification.
 +
|-
 +
|type
 +
|[[#string|string]]
 +
|Either "text" or "value".
 +
|-
 +
|unit
 +
|[[#string|string]]
 +
|Currency name or specification unit (Provided only if type is "value" and specification unit is set).
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|The ID belonging to the unit.
 +
|}
 +
|-
 +
|short_value
 +
|[[#string|string]]
 +
|If type is "text", this contains the short value.
 +
|-
 +
|value
 +
|[[#string|string]]
 +
|The value of the specification
 +
|}
 +
 +
===get_specifications(product_id)===
 +
Returns all specifications by product id (and filtered by session language).
 +
 +
<nowiki>{{ get_specifications(24) }}</nowiki>
 +
 +
See below for expected return value structure.
 +
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|The ID belonging to the specification.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|The name of the specification.
 +
|-
 +
|type
 +
|[[#string|string]]
 +
|Either "text" or "value".
 +
|-
 +
|unit
 +
|[[#string|string]]
 +
|Currency name or specification unit (Provided only if type is "value" and specification unit is set).
 +
{|class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 +
|-
 +
|id
 +
|[[#integer|integer]]
 +
|The ID belonging to the unit.
 +
|}
 +
|-
 +
|short_value
 +
|[[#string|string]]
 +
|If type is "text", this contains the short value.
 +
|-
 +
|value
 +
|[[#string|string]]
 +
|The value of the specification
 +
|}
 +
 +
===get_store_design_button_class===
 +
Returns the standard (and configured) CSS classes for buttons used in the standard templates.
 +
 +
===get_tag_tree(tag_id)===
 +
Returns a tag tree starting from the requested tag_id. Using 0 for the ID *is* possible and returns a tree of all tags. Omitting the tag_id will yield the same result as setting tag_id to 0.
 +
 +
<nowiki>{{ get_tag_tree() }}</nowiki>
 +
<nowiki>{{ get_tag_tree(30) }}</nowiki>
 +
 +
===get_package_per_unique_product_details(product_id)===
 +
Returns one product for each product-id with the total sum of the quantity on the package.
 +
The array will be empty if it's not a package.
 +
<nowiki>{{ get_package_per_unique_product_details(746) }}</nowiki>
 +
 +
===get_product_with_package_info(product_id)===
 +
Returns all products in the package together with the package quantity.
 +
The array will be empty if it's not a package. This function works almost like "modules.products_in_package.products" on the products page with one exception; It works on every page.
 +
<nowiki>{{ get_product_with_package_info(746) }}</nowiki>
 +
 +
===get_external_pricelists([product_ids])===
 +
Uses Pull Api to fetch pricelists from external API, matching current customer_group/product. Updates the current pricelist at the same time.
 +
Returns null if no pricelist exists, or an json-string if it did exist.
 +
 +
<nowiki>{{ get_external_pricelists([267,14,222]) }}</nowiki>
 +
 +
===get_external_orderhistory_list([order_id, dateFrom, dateTo, offset])===
 +
Uses Pull Api to fetch a list of orders from an external API, matching current customer.
 +
Returns null if no order exists, or an json-string if it did exist. All arguments are optional.
 +
 +
<nowiki>{{ get_external_orderhistory_list("ABC123", "2022-11-12", "2022-12-12", "10") }}</nowiki>
 +
 +
===get_external_orderhistory_item([order_id])===
 +
Uses Pull Api to fetch an order from an external API, matching current customer with specified order id.
 +
Returns null if no order exists, or an json-string if it did exist.
 +
 +
<nowiki>{{ get_external_orderhistory_item("AB123") }}</nowiki>
 +
 +
===get_multiaccounts_list()===
 +
Example syntax,
 +
<nowiki>
 +
{% set accounts = get_multiaccounts_list() %}
 +
{% if accounts %}
 +
  {% for account in accounts %}
 +
    ID {{ account.account.id }}<br>
 +
    Currently logged in {{ account.current }}<br>
 +
    Type {{ account.account.type }}<br>
 +
    Name {{ account.account.full_name }}<br>
 +
    Company {{ account.customer.company }}<br>
 +
    Login URL {{ account.login_url }}<br>
 +
    <hr>
 +
  {% endfor %}
 +
{% else %}
 +
  Nah
 +
{% endif %}
 +
</nowiki>
 +
 +
{| class="wikitable"
 +
|-
 +
! colspan="3" style="text-align:center; font-weight:bold;" | get_multiaccounts_list() (numeric array, zero indexed)
 +
|- style="font-weight:bold;"
 +
| Field
 +
| Type
 +
| Description
 +
|-
 +
| current
 +
| bool
 +
| True, for the logged in user
 +
|-
 +
| email
 +
| string
 +
| Email address
 +
|-
 +
| token
 +
| string
 +
| Logintoken
 +
|-
 +
| token_valid_date
 +
| date YY-MM-DD
 +
| Date the logintoken is valid
 +
|-
 +
| account
 +
| style="font-style:italic;" | associative array [account]
 +
| Loginaccount data
 +
|-
 +
| customer
 +
| style="font-style:italic;" | associative array [customer]
 +
| Customer data
 +
|}
 +
 +
{| class="wikitable"
 +
|-
 +
! colspan="3" style="text-align:center; font-weight:bold;" | account (associative array)
 +
|- style="font-weight:bold;"
 +
| Field
 +
| Type
 +
| Description
 +
|-
 +
| id
 +
| int
 +
|
 +
|-
 +
| encoded_id
 +
| string
 +
| ID encoded in Base64
 +
|-
 +
| external_id
 +
| string
 +
|
 +
|-
 +
| active
 +
| bool
 +
|
 +
|-
 +
| type
 +
| int
 +
| Account type (1=User, 0=Admin)
 +
|-
 +
| firstname
 +
| string
 +
| Firstname
 +
|-
 +
| lastname
 +
| string
 +
| Lastname
 +
|-
 +
| full_name
 +
| string
 +
| Firstname and Lastname combined with a space
 +
|}
 +
 +
{| class="wikitable"
 +
|-
 +
! colspan="3" style="text-align:center; font-weight:bold;" | customer (associative array)
 +
|- style="font-weight:bold;"
 +
| Field
 +
| Type
 +
| Description
 +
|-
 +
| id
 +
| int
 +
|
 +
|-
 +
| external_id
 +
| string
 +
|
 +
|-
 +
| active
 +
| bool
 +
|
 +
|-
 +
| type
 +
| int
 +
| Customer type
 +
|-
 +
| image_id
 +
| int
 +
|
 +
|-
 +
| group_id
 +
| int
 +
|
 +
|-
 +
| market_id
 +
| int
 +
|
 +
|-
 +
| language_id
 +
| int
 +
|
 +
|-
 +
| company
 +
| string
 +
| Company name (from address book)
 +
|-
 +
| firstname
 +
| string
 +
| Firstname
 +
|-
 +
| lastname
 +
| string
 +
| Lastname
 +
|-
 +
| full_name
 +
| string
 +
| Firstname and Lastname combined with a space
 +
|}
 +
 +
===langimg(image, width, height)===
 +
If the image exists, returns the HTML needed to display it.
 +
<nowiki>{{ langimg("imagename.jpg") }}</nowiki>
 +
===langstr(name)===
 +
Returns a language string.
 +
<nowiki>{{ langstr("LANGUAGE_STRING") }}</nowiki>
 +
===search_information_pages(keywords, [options])===
 +
Searches through the informations pages for the keywords (separeted by whitespace). 
 +
 +
Options are: 
 +
 +
* pages_only bool (if true only regular information pages will be searched)
 +
* hide_disabled_listings bool (if true, hides pages not set to show_in_listing)
 +
 +
==Plugins==
 +
===getByTags(limit, tags, fill, order_by, new_only, replace_variants)===
 +
Get products by categories or tags.
 +
 +
<nowiki>{% set products = get_plugin('product_query').getByTags(4, [120, 130, 140]) %}</nowiki>
 +
 +
Limit is the maximum amount of products to return, tags are the tags from which products are selected, fill controls if products which do not match any of the tags are also returned, order_by controls how the products are sorted and new_only only returns new products (if true).
 +
 +
order_by can be one of these strings:
 +
 +
* <tt>"brand"</tt>, <tt>"brand:asc"</tt>, <tt>"manufacturer"</tt>, <tt>"manufacturer:asc"</tt>:  Sort products by manufacturer name, ascending.
 +
* <tt>"brand:desc"</tt>, <tt>"manufacturer:desc"</tt>:  Sort products by manufacturer name, descending.
 +
* <tt>"date_added:asc"</tt>:  Sort products by date added and order added, the oldest products first.
 +
* <tt>"date_added"</tt>, <tt>"date_added:desc"</tt>:  Sort products by date added and order added, the newest products first.
 +
* <tt>"model"</tt>, <tt>"model:asc"</tt>, <tt>"products_model"</tt>, <tt>"products_model:asc"</tt>:  Sort products by model/article number, ascending.
 +
* <tt>"model:desc"</tt>, <tt>"products_model:desc"</tt>:  Sort products by model/article number, descending.
 +
* <tt>"name"</tt>, <tt>"name:asc"</tt>, <tt>"products_name"</tt>, <tt>"products_name:asc"</tt>:  Sort products by product name, ascending.
 +
* <tt>"name:desc"</tt>, <tt>"products_name:desc"</tt>:  Sort products by product name, descending.
 +
* <tt>"ordered_recent"</tt>, <tt>"ordered_recent:desc"</tt>, <tt>"products_ordered_recent"</tt>, <tt>"products_ordered_recent:desc"</tt>:  Sort products by recently ordered, the latest ordered products first.
 +
* <tt>"ordered_total"</tt>, <tt>"ordered_total:desc"</tt>:  Sort products by total amount ordered, the highest totals first.
 +
* <tt>"price:asc"</tt>, <tt>"producs_price:asc"</tt>:  Sort products by price, ascending.
 +
* <tt>"price:desc"</tt>, <tt>"producs_price:desc"</tt>:  Sort products by price, descending.
 +
* <tt>"price_recommended:asc"</tt>:  Sort products by recommended price, ascending.
 +
* <tt>"price_recommended:desc"</tt>:  Sort products by recommended price, descending.
 +
* <tt>"rand"</tt>, <tt>"random"</tt>:  Sort products by number of tag matches, then randomly.
 +
* <tt>"sort_order"</tt>:  Sort products by sort order.
 +
* <tt>"tags+date_added:asc"</tt>:  Sort products by number of tag matches, then by date added and order added, the oldest products first.
 +
* <tt>"tags+date_added"</tt>, <tt>"tags+date_added:desc"</tt>:  Sort products by number of tag matches, then by date added and order added, the newest products first.
 +
* <tt>"weight:asc"</tt>:  Sort products by weight, ascending.
 +
* <tt>"weight:desc"</tt>:  Sort products by weight, descending.
 +
* Any other string:  Sort products by order added, the first added products first.
 +
 +
replace_variants is optional and can be true/false, default false.
 +
 +
===getAllByTags(limit, tags, fill, order_by, new_only, replace_variants)===
 +
Get products by categories or tags, this includes subcategories and subtags. The function calls the getByTags for each iteration, so the parameters match the above function definition.
 +
 +
<nowiki>{% set products = get_plugin('product_query').getAllByTags(12, [164], false, "sort_order", false) %}</nowiki>
 +
 +
==Filters==
 +
 +
===bool===
 +
Casts value to boolean, if value is a scalar (i.e. string, int, float or bool). Otherwise returns null.
 +
1|bool
 +
 +
===bool_filter===
 +
Casts value to boolean in an intelligent (but non-standard) way. See below for details:
 +
 +
* Returns true for "1", "true", "on" and "yes".
 +
* Returns false for "0", "false", "off", "no", and "".
 +
* Returns null for all non-boolean values.
 +
 +
"false"|bool
 +
 +
===chain(array)===
 +
Chain two iterable values.
 +
[1, 2]|chain([3, 4])
 +
===choose(number)===
 +
Choose random entries from an array or dictionary.
 +
[1, 2, 3, 4, 5]|choose(3)
 +
 +
===currency_format===
 +
Formats raw number with store currency.
 +
float|currency_format
 +
 +
===currency_calculate===
 +
Calculates raw number with store currency.
 +
float|currency_calculate
 +
 +
===currency_round===
 +
Rounds raw number according to settings for store and active session.
 +
float|currency_round
 +
 +
===float===
 +
Casts value to float, if value is numeric (using php's is_numeric function). Otherwise returns null.
 +
"123,456"|float
 +
 +
===image_button_url===
 +
Looks up an image button image for the current language.
 +
"filename.jpg"|image_button_url
 +
 +
===int===
 +
Casts value to integer, if value is either numeric (using php's is_numeric function) or a boolean. Otherwise returns null.
 +
"123"|int
 +
 +
===link(query_string)===
 +
Create a link.
 +
"filename.php"|link(query_string)
 +
 +
===md5===
 +
Creates an MD5 hash from a string.
 +
"string"|md5
 +
 +
===query_string===
 +
Converts a dictionary to a valid query string.
 +
dict|query_string
 +
 +
===sort_by_property(sort_key [, sort_order = 'ASC'])===
 +
Sort an array consisting of objects or associative arrays by selected property (sort_key).
 +
array_of_objects|sort_by_property('name')
 +
 +
{% for object in array_of_objects|sort_by_property('name', 'DESC') %}
 +
 +
===string===
 +
Casts value to string, if value is a scalar (i.e. string, int, float or bool) or if value is an object that can be stringified (has a __toString method). Otherwise returns null.
 +
123|string
 +
 +
===strip===
 +
Strips whitespace from the begnning and end of strings.
 +
string|strip
 +
===strip_tags(allowed_tags)===
 +
Strips tags.
 +
|strip_tags("<allowed><tags>")
 +
===thumbnail(width, height)===
 +
Return thumbnail path, width and height for thumbnailed image.
 +
image|thumbnail([width[, height]])
 +
===truncate(limit, append)===
 +
Truncate string to given limit and append string
 +
string|truncate(limit[, append = "..."])
 +
 +
===truncate_html(limit, append)===
 +
Truncate string to given limit and append string after stripping HTML and expanding HTML entities.
 +
string|truncate(limit[, append = "..."])
 +
 +
===type===
 +
Returns the type of the value/variable (uses php's function gettype).
 +
"text"|type
 +
 +
===unique(array)===
 +
Remove duplicates from array
 +
[1, 1, 2]|unique
 +
Optional parameter sort_flags may be used. Valid values are 'string' (default), 'regular', 'locale_string' and 'numeric' and correspond to the PHP constants SORT_STRING, SORT_REGULAR, SORT_LOCALE_STRING and SORT_NUMERIC. See https://www.php.net/manual/en/function.array-unique.php.
 +
[1, 1, 2]|unique('string')
 +
 +
 +
[[Category:Templating]]

Nuvarande version från 14 oktober 2025 kl. 16.39

See also Templating:Emails.

Innehåll

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

manufacturer

Key Type Description
id integer
name string
image URL
address string
postcode string
postal_address string
visitational_address string
country string
telephone1 string
telephone2 string
fax string
email_address string
orgno string
vat string
note string
postgiro string
plusgiro string
bankgiro string
contact string
payment_conditions string
customers_no string
video_1 string
video_2 string
extra1 string
extra2 string
extra3 string
href URL
url URL
description string
meta_title string
meta_keywords string
meta_description string
seo_text string
seo_title string
extra4 string
extra5 string
images list of URLs
pdfs list
Key Type Description
path URL PDF link.
name string PDF label.

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
images dictionary Additional product images.
Key Type Description
href URL Image thumbnail link.
image URL Image path.
description string Image description.
is_package boolean True when the product has packaged products.
has_attributes boolean True when the product has any attributes.
manufacturer_image URL
manufacturer_name string
model string
name string
price_discount_percentage HTML
price HTML
price_raw HTML
price_recommended HTML
price_recommended_raw HTML
price_special HTML
price_special_raw HTML
price_special_expires date
quantity integer
quantity_partner integer Shows up when using get_products and get_associated_product, containing the quantity for the main stock selected from partners.
replacement_product string
seo_link string
tax decimal Product tax rate.
tax_class_id integer
type string
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
extra1 HTML Custom product field.
extra2 HTML Custom product field.
extra3 HTML Custom product field.
extra4 HTML Custom product field.
extra5 HTML Custom product field.
extended_data_fields list Extended data fields if any data is set for this product
weight string Product weight.

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.
color string Tag color (HEX).

custom field

Key Type Description
fields_id integer ID.
require_in_checkout boolean Is the field required in the checkout?
type string What was entered in the administration.
name string Field label.
value string Entered value (not always available).

extended data field

Key Type Description
id integer ID.
name strring Name
type string Type of data json/binary/text
language_dependant bool True if one value per language

discount

Key Type Description
id integer The unique ID generated for the discount.
name string The name selected for the discount.

Depending on the type field, there are additional fields:

Key Type Description
type string "bogo", for buy one get one free discounts.
required integer If at least required products are in the shopping cart,
free integer free of the products will have their prices set to 0 when added to the shopping cart.
products list of products Products which count for this discount.
manufacturers list of manufacturers Manufacturers for which products count for this discount.
categories list of categories Categories for which products count for this discount.
cart_matches integer Total count of products in the shopping cart that matches the products, manufacturers, or categories.
current_matches integer Set to 1 on the product page if the current product matches one of the products, manufacturers, or categories; otherwise 0.
Key Type Description
type string "total", for discounts based on the total cost of the shopping cart.
product product The product to which this discount is applied.
price decimal The new price for the selected product.
total_required decimal The required cost of the shopping cart, not including tax.
total_current decimal The current cost of the shopping cart, not including tax.
current_matches integer Set to 1 on the product page for the selected product, otherwise 0.

partner

Key Type Description
partners_id integer ID.
company_name string Official company name.
working_title string Used name.
cin string Registered company number.
address string Address.
zip string Zip code.
city string City.
countries_id integer Country ID.
phone string Phone number.
fax string Fax number.
email string Email address.
comments string Internal comments.
status boolean Enabled or disabled.
pickup boolean Pickup of products.
reseller boolean Is a reseller.
display boolean Is displayed.
preferred boolean The distance in distance calculations will be decreased by a configurable amount, see Inställningar - Leverans/Packning.
description string Description.
contacts list of dictionaries
Key Type Description
first_name string Name.
last_name string Name.
email string Email address.
images list of strings Images.
open_hours dictionary of days to dictionaries
Key Type Description
opens integer Opening hour.
closes integer Closing hour.

date

Method Type Description
(treat object as string) string A string representation of the date, most of the time this is date_long(), otherwise date_short().
timestamp() integer Returns the timestamp represented by this date.
date_short() string A string representation of the date, formatted using the language string DATE_FORMAT.
date_long() string A string representation of the date, formatted using the language string DATE_FORMAT_LONG.

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
Key Type Description
get dictionary Data received from the GET query string
post dictionary Received 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.
Key Type Description
id integer
email string
personnummer string
first_name string
last_name string
company string
telephone string
mobile string
country_id integer
postcode string
city string
street_address string
test_customer boolean
custom list of custom field Custom fields.
user_agent string The client's user agent string. N/A
meta dictionary Header meta information for current page.
Key Type Description
title HTML Page title.
keywords string Page meta keywords.
description HTML Page meta description.
language string Page language code.
generator string Startabutik E-handel.
canonical URL Canonical URL for current page. Not always available.
session dictionary Configurable session variables.
Key Type Description
market_id integer ID of current market.
currency string Code of selected currency.
country_id integer ID of selected country.
language string Code of selected language.
language_id integer ID of selected language.
vat boolean Display prices with or without VAT.
group_id integer ID of active customer group in session
group_name string Name of active customer group in session
reference_code string Either value of query parameter vc och http referrer .
settings dictionary Contains some of the settings defined in the administration
Key Type Description
ACCOUNT_COMPANY, ACCOUNT_DOB, ACCOUNT_GENDER, ACCOUNT_PERSONNUMMER, ACCOUNT_STATE, ACCOUNT_SUBURB boolean Account fields can be enabled and disabled
API_ID_FACEBOOK string General APP id for Facebook
API_ID_GOOGLE_VERIFICATION string Google verification
CHARSET string Charset of page.
CREATE_ACCOUNT_LAYOUT integer Internal
DOWNLOAD_ENABLED boolean Is the download module enabled
ENTRY_CITY_MIN_LENGTH, ENTRY_DOB_MIN_LENGTH, ENTRY_EMAIL_ADDRESS_MIN_LENGTH, ENTRY_FIRST_NAME_MIN_LENGTH, ENTRY_LAST_NAME_MIN_LENGTH, ENTRY_PASSWORD_MIN_LENGTH, ENTRY_POSTCODE_MIN_LENGTH, ENTRY_STATE_MIN_LENGTH, ENTRY_STREET_ADDRESS_MIN_LENGTH, ENTRY_TELEPHONE_MIN_LENGTH integer Used in form validation
ENTRY_PASSWORD_IN_REGISTRATION boolean Is the user allowed to specify a password when registering
FORMS_USE_CAPTCHA boolean Is captcha used for forms
FACEBOOK_PROFILE_URL string URL in format http://url.se/subfolder/
GOOGLEPLUS_PROFILE_URL string URL in format http://url.se/subfolder/
HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT integer Width and height of heading images
INVOICE_ORG_NUMBER string
INVOICE_STORE_ADDRESS string
INVOICE_STORE_POST_ADDRESS string
INVOICE_TELEPHONE string
MAX_ADDRESS_BOOK_ENTRIES integer Maximum entries in the address book
PREV_NEXT_BAR_LOCATION integer Internal
SMALL_IMAGE_WIDTH integer Width of small thumbnails in pixels
SMALL_IMAGE_HEIGHT integer Height of small thumbnails in pixels
STATISTICS_GOOGLE_ANALYTICS string Google analytics tracking code, if specified
SHOP_HEADER_TEXT string Alt text for logo
SHOP_FAVICON string Shop favicon in /images/
SHOP_LOGO string Shop logo in /images/
SHOP_LOGO_280_80 string Shop logo for invoices in /images/
SHOP_SHARE_IMAGE string Shop social media share image in /images/
STANDARD_SORT_ORDER string Column that the product should be sorted on
STOCK_NOTIFY_ON_RESTOCK_LIMIT int Gränsvärde för bevakning av produkters lagersaldo
STORE_NAME string
POPUP_IMAGE_WIDTH, POPUP_IMAGE_HEIGHT integer
PRODUCT_PAGE_DESIGN integer Internal
YOUTUBE_PROFILE_URL string URL in format http://url.se/subfolder/
TWITTER_PROFILE_URL string URL in format http://url.se/subfolder/
TIKTOK_PROFILE_URL string URL in format http://url.se/subfolder/
PRICE_LOG list
Key Type Description
DISPLAY_LOGGED_PRICES boolean Dictates whether logged prices should be shown in the store
TWEAKWISE list
Key Type Description
ENABLED boolean If Tweakwise is enabled. Depends on several factors.
shoppingcart_amount string Amount of products in shopping cart N/A
shoppingcart_total string Total sum of the content in shopping cart 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
Key Type Description
id integer Id of category
name string Name of category in current language
image string Path to category image if such exists
icon string Path to category icon if such exists
href string Link to category's product listing page
child_count integer Number of open child categories
children list of dictionaries List of visible child categories. See boxes.categories.tree for format
description string
open boolean Returns true if the category (or one of its children) is the currently selected one
selected boolean Returns true if the category is the currently selected one

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
Key Type Description
id integer Id of category
name string Name of category in current language
image string Path to category image if such exists
icon string Path to category icon if such exists
href string Link to category's product listing page
child_count integer Number of open child categories
children list of dictionaries List of visible child categories. See boxes.categories.tree for format
description string
open boolean Returns true if the category (or one of its children) is the currently selected one
selected boolean Returns true if the category is the currently selected one

Best selling products

Lists the most sold products.

Variable name Type Description
boxes.bestsellers.list list of product The most sold products, the most sold first.

Manufacturer select

Variable name Type Description Format
boxes.manufacturers.list list of dictionaries Lists all available manufacturers
Key Type Description
id integer Manufacturer ID.
name string Name of manufacturer
href string Link to manufacturer page
link URL Full link to manufacturer page
selected boolean True if the manufacturer_id GET variable is equal to the ID of this manufacturer.

Country selection

Variable name Type Description Format
boxes.countries.list list of dictionaries Lists all available countries
Key Type Description
id integer Country ID.
name string Name of country.
href string Link to current page with country added as a request parameter.
image URL A flag for the country.

Market selection

Variable name Type Description Format
boxes.markets.list list of dictionaries Lists all available markets
Key Type Description
id integer Market ID.
href URL Link to current page with market_id added as a request parameter.
standard_country_id integer The standard country selection for the market.
standard_country_code string The code for the standard country selection for the market.
countries array An array containing all the countries connected to the market
language string Code of language selected for market.
language_id integer Id of language selected for market.
locale string
image URL An image for the market.
domain_name string Link to current page at the market domain.
domain_name_href URL
url_prefix string
currency_code string
currency_id integer
customer_group_id integer
name string Name of market.
description string
share_customers bool

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
Key Type Description
id integer ID.
name string Name of information page
href string Link to information page
active boolean Is user currently on this page?
target boolean True if information page expects the attribute target="_blank"
parent_id integer Parent page ID
date date Last updated date
publish_date_from date Publish date start
publish_date_to date Publish date end
short_description string Short page description
extra1 string Custom page field
extra2 string Custom page field
extra3 string Custom page field
extra4 string Custom page field (language dependent)
extra5 string Custom page field (language dependent)
images list of URLs Images set for this page
categories list of dictionaries Categories set for this page (only shown if cright 141 is set).
Key Type Description
id integer Category index.
name string Category name.
href URL Category link.
seo_link URL Category relative link.
tags list of tags Tags set for this page (only shown if cright 141 is set).
boxes.information_pages.tree dictionaries A tree of *all* information pages.

This field consists of an entry with the same format as the entries in the information page list, with the addition of two fields:

Key Type Description
open boolean True if one of the children is active or open.
children list of dictionaries A list of child galleries, each with the same format as this entry.

Language list

Variable name Type Description Format
boxes.languages.list list of dictionaries Lists all languages
Key Type Description
name string Language name
href string Link to page that sets language to this one
image string Image (flag) for language if available
code string Language two-letter code

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
Key Type Description
image URL Assigned image
name string News name
href string Link to news page
date date Date posted.
summary string News summary

Hierarchical news list

Variable name Type Description Format
boxes.news_archive.year_min integer Year with first news post. N/A
boxes.news_archive.year_max integer Year with last news post. N/A
boxes.news_archive.month_min integer Month of first news post. N/A
boxes.news_archive.month_max integer Month of last news post. N/A
boxes.news_archive.news list of dictionaries News grouped first by year and then by month, the final array keys have this format:
Key Type Description
image URL Assigned image
title string News name
href string Link to news page
date date Date posted.
short string News summary

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
Key Type Description
product_name string Name of product
product_image string Link to product image
review_href string Link to full review
review_rating string Rating
review_text string Text of review

Shopping cart

Variable name Type Description Format
boxes.shopping_cart.list list of dictionaries List of products in shopping cart
Key Type Description
id integer ID of product
data dictionary Custom data stored on the shopping cart entry.
model string Model number for product
name string Name of product
image string Link to image of product
quantity string Number of this product in shopping cart
unit
type string
price string Price per product before discounts represented as a string with currency symbol
final_price string Price per product after discounts represented as a string with currency symbol
total_price string Total price for all products of this kind before discounts represented as a string with currency symbol
total_final_price string Total price for all products of this kind after discounts represented as a string with currency symbol
href string Link to product's page
new boolean True if product was just added to the shopping cart
discounts list of discounts
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.
Key Type Description
name string Name of product
href string Link to product page
image string Link to product image
price string Product standard price represented with currency symbol
special_price string Product price after discounts represented with currency symbol

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.
Key Type Description
type integer Type of box.
class string CSS classes
extra_field_1 string
extra_field_2 string
extra_field_3 string
sort_order integer Sort order.

If type is 0:

Key Type Description
title string Box title.
product product Product displayed.

If type is 1:

Key Type Description
text HTML Box contents.

If type is 2:

Key Type Description
image URL Box image.

Modules

last_viewed_products

Variable name Type Description
modules.last_viewed_products.register HTML Contains either the empty string, or a script element with code for updating the cookie containing the list of the last viewed products. Should be included on product pages.
modules.last_viewed_products.products list of products The products the customer last viewed, the most recently viewed product first, the current product is excluded. Contains up to 30 products.

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

random_products.html

Variable name Type Description Format
modules.random_products.products list of products Random products. N/A

product_attributes.html

Variable name Type Description Format
modules.product_attributes.attributes list of dictionaries Product attributes.
Key Type Description
value string Attribute value.
id integer Attribute index.
name string Attribute name.
type integer Attribute type.
selected integer Selected attribute.
options list of index to value mappings Attribute options.

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.
Key Type Description
name string Specification name.
value string Specification value.

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.
Key Type Description
firstname string First name.
lastname string Last name.
modules.products_reviews.reviews list of dictionaries Product reviews.
Key Type Description
rating integer Review rating, 1-5.
author string Review author.
date string Review date.
text HTML Review text.

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.
Key Type Description
name string Variant name
selected integer Selected variant.
options list of integer to value mappings Variants.
modules.products_variants.products list of products Variant products. N/A
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
modules.products_variants.combined list of dictionaries Variant choices associated with products.
Key Type Description
combination dictionary Keys are variant types and values are variant choices.
product integer Product ID, or null.

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.

Token action - invalid (token_action/invalid.html)

No variables.

Reservations - accept (token_action/reservations/accept.html)

Variable name Type Description Format
reservation.customer_id integer Id of customer who placed the reservation. N/A
reservation.name string Customer's name from reservation form N/A
reservation.email string Customer's email from reservation form N/A
reservation.phone string Customer's phone number from reservation form N/A

Reservations - reject (token_action/reservations/reject.html)

Variable name Type Description Format
reservation.customer_id integer Id of customer who placed the reservation. N/A
reservation.name string Customer's name from reservation form N/A
reservation.email string Customer's email from reservation form N/A
reservation.phone string Customer's phone number from reservation form N/A

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
Key Type Description
firstname string Account first name
lastname string Account last name
personnummer string Account personnummer
dob string Account date of birth
email_address string Account email address
telephone string Account telephone number
mobile string Account mobile telephone number
fax string Account fax number
gender string Account gender ('m' or 'f')
custom list of custom field Custom fields.
customer_type integer (-1 = all, 0 = individual, 1 = company)

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
Key Type Description
id integer Order ID
status string Order status
date string Order date
type string Order type
name string Order delivery name
product_count integer Product count
total string Order total
href URL A link to the description of the order
order dictionary Order information, see checkout success.order.

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
Key Type Description
id_formatted string Order ID
status string Order status
date date Order date
total string Order total
shipping_method string Order shipping method
payment_method string Order payment method
tax_group_count integer Number of different tax groups
billing_address string Order billing address
delivery_address string Order delivery address
delivery boolean
partner partner
products list of dictionaries Products in order
Key Type Description
qty integer Product quantity
id integer Product ID
name string Product name
model string Product model
tax decimal Product tax
price decimal Product price
final_price decimal Final product price
image string Address to image
href string Link address to product
status string Products status. 0 = inactive, 1 = active
totals list of dictionaries Order parts of total
Key Type Description
title string Total part label
text HTML Total part value
statuses list of dictionaries Order statuses
Key Type Description
name string Status name
date date (short) Status date
comments string Status comments
events list of dictionaries Order delivery events
Key Type Description
date date Event date
location string Event location
description string Event description
order dictionary Order information, see checkout success.order.

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
Key Type Description
href URL A link to the order description page
date date (short) The date the order was placed
id integer Order ID
country string Order delivery name and country
status string Order status
total HTML Order total
order dictionary Order information, see checkout success.order.

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
Key Type Description
id integer Product ID
name string Product name
counter integer List index
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

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
Key Type Description
id integer Id of the default address book entry
default boolean Is this the default address book entry
edit_href URL A link to edit the entry
delete_href URL A link to delete the entry
name string Associated name
address HTML The address

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
Key Type Description
male boolean Male gender?
firstname string First name
lastname string Last name
company string Company
street_address string Street address
suburb string Suburb
postcode string Post code
city string City
country_list HTML A drop-down list with countries
state_has_zones boolean Does the state have zones?
state string State
states association list A list of zones in the state

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_result.html)

Variable name Type Description Format
advanced_search_result.results list of products The search results. N/A
advanced_search_result.num_results integer The number of search results. N/A
advanced_search_result.back_href URL A link for returning to the search page. N/A
advanced_search_result.page_limit integer Maximum number of products per page N/A
advanced_search_result.page_limits list of integers List of available page limits. 0 means all products on one page N/A
advanced_search_result.page_index integer Current page number N/A
advanced_search_result.page_count integer Number of pages N/A
advanced_search_result.sort_by string Current sorting key. N/A
advanced_search_result.sort_order string Current sorting order, "ASC" or "DESC". N/A
index.featured_products list of products A list of featured products. 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
Key Type Description
name string Name of category/manufacturer
alternative_name string An alternative category name. (SEO name.)
image string Image URL for category/manufacturer
images list of URLs The additional images for the category.
text HTML Description of category/manufacturer
alternative_text HTML An alternative category description. (SEO text.)
template string Template name chosen for the category, empty by default.
extra1 string Category extra field.
extra2 string Category extra field.
extra3 string Category extra field.
extra4 string Category extra field.
extra5 string Category extra field.
categories_listing.header dictionary Page header attributes: image, description and title For manufacturer pages the dictionary is a manufacturer, it also has a parent key with another manufacturer dictionary, and a children key with a list of manufacturers.
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
categories_listing.subcategory_list list of dictionaries Subcategories for the current category 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_by string Current sorting key. N/A
categories_listing.sort_order string Current sorting order, "ASC" or "DESC". 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.used_spec_values dictionary of integers to lists of integers The specification values used by the value specifications for the filtered products. N/A
categories_listing.used_spec_texts dictionary of integers to lists of strings The specification values used by the text specifications for the filtered products. N/A
categories_listing.used_manufacturers_ids list of integers The manufacturers 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.
Key Type Description
id string Manufacturer ID.
name string Manufacturer name.
image URL Manufacturer image.
categories_listing.filters list of dictionaries Configured filters for this category.

For the price filter and value specifications:

Key Type Description
id string "price" or a specification ID.
name string Filter name.
type integer 2
min float Minimum price/value for a product in this category.
max float Maximum price/value for a product in this category.
unit string Currency name or specification unit.

For the manufacturers filter:

Key Type Description
id string "manufacturers"
name string Manufacturer name.
image URL Manufacturer image.
children dictionary Manufacturer collections, same format as this dictionary, excluding children.

For the category, tag, and specification category filters:

Key Type Description
id integer ID.
name string Name.
type integer 0 for categories, 1 for tags, 3 for specification categories.
children dictionary Manufacturer collections, same format as this dictionary, excluding children.
options list of dictionaries Subcategories, keys are id and name.

For the text specification filters:

Key Type Description
id integer ID.
name string Name.
type integer 4
options list of dictionaries Subcategories, the dictionaries only have the key name.

Checkout success (checkout_success.html)

Variable name Type Description Format
google_analytics_order.products list of dictionaries
Key Type Description
products_id integer
model_number
product_title
category_title
price
quantity integer
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
Key Type Description
id integer Question ID
question string Question
alternatives list of dictionaries Question alternatives
Key Type Description
type integer Alternative type, 1 for a radio button, an input field otherwise
id integer Alternative ID
answer string Alternative text
checkout_success.order dictionary Order information
Key Type Description
order_id integer Order ID
info dictionary
Key Type Description
comments
coupon_code
currency
currency_value
date_purchased
extra
languages_id
last_modified
manual_order_edit
market_id
order_status
orders_package_id
orders_shipping_date
orders_state
orders_status
orders_status_id
parcel_id
payment_cost
payment_method
payment_method_code
pickup_location_id
pickup_location_type
reference_code
shipping_cost
shipping_method
shipping_method_code
subtotal
subtotal_ex_tax
tax
tax_group_totals
tax_groups
total
total_ex_tax
vat
voucher
customer dictionary
Key Type Description
city
company
country
country_id
customers_group_id
email_address
firstname
format_id
gln
id
lastname
login_id
mobile
name
personnummer
personnummer_validated
personnummer_validated_ip
postcode
state
street_address
street_address2
suburb
telephone
vat_identification_number
zone_id
delivery dictionary
Key Type Description
city
company
country
country_id
email_address
firstname
format_id
gln
lastname
name
postcode
state
street_address
street_address2
suburb
zone_id
billing dictionary
Key Type Description
city
company
country
country_id
email_address
firstname
format_id
gln
lastname
name
postcode
state
street_address
street_address2
suburb
zone_id
totals list of dictionaries
Key Type Description
orders_total_id
orders_id
title
text
value
tax_class_id
tax_rate
class
sort_order
products list of dictionaries
Key Type Description
_discounted
_from_product_configuration
_quotation_id
attributes
collection_id
data
final_price
href
id
image
manufacturers_id
model
name
name_default_language
op_id
package_content
parent_id
parent_model
parent_name_default_language
price
qty
quantity
seo_link
status
stock_allow_checkout
tax
tax_class_id
tax_description
units_id
weight
upsell() method Returns a dictionary with information about upsell for the order. Documented below.

upsell() dictionary

Key Type Description
errors optional list of dictionaries Present only if there are any errors. See format documentation below.

The following error codes can be returned:

  • CHECKOUT_UPSELL_DISABLED: Returned is upsell is disabled.
  • CHECKOUT_UPSELL_ORDER_MISSING: Returned if the order is missing, or if the order doesn't belong to the customer.
  • CHECKOUT_UPSELL_ORDER_INVALID_STATE: Returned if the order is not in the UPSELL state.
  • CHECKOUT_UPSELL_DURATION_MISSING: Returned if the order lacks the upsell duration field.
  • CHECKOUT_UPSELL_DURATION_EXPIRED: Returned if the upsell duration has passed.
  • CHECKOUT_UPSELL_REMOTE_ORDER_MISSING: Returned if the order was not found at the payment processor.
  • CHECKOUT_UPSELL_UNAVAILABLE: Returned for orders not possible to update due to selected payment method.
get_prices_url URL An URL to an endpoint used for querying product prices for upsell.

Send a JSON object in the following format:

{
  "order_id": ORDER_ID,
  "products": [
    {
      "id": PRODUCT_ID,
      "quantity": PRODUCT_QUANTITY
    },
  ]
}

The response will contain the products for valid products, a status field indicating if the product can be purchased, and the prices. If there were any errors a top-level errors key will be added.

{
  "products": [
    {
      "id": INT,
      "quantity": INT,
      "status": BOOL,
      "priceIncl": NUMBER,
      "priceExcl": NUMBER
    },
  ]
}

The following error codes can be returned:

  • CHECKOUT_UPSELL_INVALID_INPUT: Returned if the input JSON did not follow the specified format.
  • CHECKOUT_UPSELL_INVALID_PRODUCT: Returned for product ids not found in the database.
  • CHECKOUT_UPSELL_PRICE_CALCULATION_ERROR: Returned in case a price could not be calculated.
update_order_url URL An URL to an endpoint used for adding products to the order.

Send a JSON object in the following format:

{
  "order_id": ORDER_ID,
  "products": [
    {
      "id": PRODUCT_ID,
      "quantity": PRODUCT_QUANTITY
    },
  ]
}

The response is an empty JSON object, with an optional top-level errors key if there were any errors.

{}

The following error codes can be returned:

  • CHECKOUT_UPSELL_INVALID_INPUT: Returned if the input JSON did not follow the specified format.
  • CHECKOUT_UPSELL_PARAMETER_MISSING: Returned if the products JSON did not follow the specified format.
  • CHECKOUT_UPSELL_INVALID_PRODUCT: Returned for product ids not found in the database.
  • CHECKOUT_UPSELL_OUT_OF_STOCK: Returned if a product did not have the stock requested.
  • CHECKOUT_UPSELL_PRICE_CALCULATION_ERROR: Returned in case a price could not be calculated.
  • CHECKOUT_UPSELL_PAYMENT_ERROR: Returned if the calls to the external payment provider failed.
finalize_url URL An URL to an endpoint used to manually finalize an upsell order without waiting for the timer to expire.

Send a JSON object in the following format:

{
  "order_id": ORDER_ID
}

The response is an empty JSON object, with an optional top-level errors key if there were any errors.

{}

The following error codes can be returned:

  • CHECKOUT_UPSELL_INVALID_INPUT: Returned if the input JSON did not follow the specified format.
  • CHECKOUT_UPSELL_ORDER_MISSING: Returned if an invalid order id was provided.
  • CHECKOUT_UPSELL_DURATION_EXPIRED: Returned if the upsell duration has passed or if the order was already finalized.

error dictionary

Key Type Description
id
status
code
public
title
detail
source

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.id integer Gallery ID. N/A
gallery.title string Gallery title. N/A
gallery.description string Gallery description or content. N/A
gallery.short_description string Gallery short description or content. N/A
gallery.date string Last modification date. N/A
gallery.publish_date_from string Publication start date. N/A
gallery.publish_date_to string Publication end 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.
Key Type Description
label string Field label.
output HTML Form field.
gallery.children list of string to dictionary mappings Child galleries indexed by gallery type.
Key Type Description
title string Gallery title.
description HTML Gallery description.
link URL Child gallery link.
date string Last modification date.
gallery.siblings list of string to dictionary mappings Sibling galleries indexed by gallery type. See gallery.children.
gallery.parents list of dictionaries Parent galleries with the bottommost first.
Key Type Description
id integer Gallery ID.
title string Gallery title.
gallery.extra1 string Custom page field. N/A
gallery.extra2 string Custom page field. N/A
gallery.extra3 string Custom page field. N/A
gallery.extra4 string Custom page field (language dependent). N/A
gallery.extra5 string Custom page field (language dependent). N/A
gallery.images list of URLs Images set for this page N/A
categories list of dictionaries Categories set for this page (only shown if cright 141 is set).
Key Type Description
id integer Category index.
name string Category name.
href URL Category link.
seo_link URL Category relative link.
tags list of tags Tags set for this page (only shown if cright 141 is set). N/A

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)

manufacturers.list is a list of dictionaries with these fields:

Variable name Type Description Format
id integer N/A N/A
name string N/A N/A
image URL 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
postgiro 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
video_1 string N/A N/A
video_2 string N/A N/A
extra1 string N/A N/A
extra2 string N/A N/A
extra3 string N/A N/A
homepage string N/A N/A
link string N/A N/A
seo_link string N/A N/A
url string N/A N/A
description string N/A N/A
meta_title string N/A N/A
meta_keywords string N/A N/A
meta_description string N/A N/A
seo_text string N/A N/A
seo_title string N/A N/A
extra4 string N/A N/A
extra5 string N/A N/A
date_added string N/A N/A
last_modified string N/A N/A
number_of_products integer N/A N/A
parent_id integer N/A N/A
children list of manufacturers

News archive page (news_archive.html)

Variable name Type Description Format
news_archive.news list of dictionaries News articles
Key Type Description
id integer News article ID
image URL Assigned image
title string News article title
date string News article publishing date
content string News article content
short string News article content, short version
href string Link to news page

News article page (news.html)

Variable name Type Description Format
image URL Assigned image N/A
news.title string News article title N/A
news.date string Date of publishing N/A
news.content string News article content N/A
news.short string News article content, short version 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.
Key Type Description
id integer Product index.
image URL Product image.
name string Product name.
href URL Product link
product.category_path list of dictionaries Information about the current category path.
Key Type Description
id integer Category index.
name string Category name.
image URL Category image.
seo_link URL Category link.
product.product dictionary Product information
Key Type Description
id integer Product index.
parent_id integer Parent product index.
category category Product main category.
categories list of lists of dictionaries Information for all product categories. See product.category_path.
tags list of tags Tags set for this product.
attributes dictionary with attribute options and choices. The key is the option ID.
Key Type Description
id integer Type ID.
type integer Attribute option type.
name string Option name.
values dictionary of attribute values. The key is the value ID.
Key Type Description
id integer Choice ID.
text string Choice name including price.
text_clean string Choice name without price.
image URL Choice image.
selected boolean True is the attribute is selected for the current product.
price string Attribute price.
price_raw string Attribute price without currency formatting.
price_prefix string Price prefix (+ or -).
date_added date Date product was added.
date_available date Date product will be available.
delivery_time string Product delivery time.
description HTML Product description.
description_short HTML Short product description.
disabled boolean Product disabled status.
ean1 string Product EAN.
external_url URL Product link.
extra1 HTML Custom product field.
extra2 HTML Custom product field.
extra3 HTML Custom product field.
extra4 HTML Custom product field.
extra5 HTML Custom product field.
video_url string Link to Youtube or Vimeo video (video will be automatically embedded)
video_embed_code HTML Custom video embed code snippet. Used instead of video_url if provided.
featured boolean Featured product.
file URL Product file 1.
file2 URL Product file 2.
full_products_id integer Requested product ID (including attributes).
image URL Product image.
image_href URL Link to full product image.
additional_images Additional product images.

Requires setting EXPORT_ALLOW_ADDITIONAL_IMAGES to be enabled.

Key Type Description
href URL Image thumbnail link.
image URL Image path.
description string Image description.
files Attached files.
Key Type Description
name string File name.
path URL File link.
size integer Size in bytes.
last_modified date Product last modified date.
lowest_number integer Minimum required order size.
manufacturer_model string Product manufacturer model.
model string Product model.
name string Product name.
new_until date Product is considered new until this date. Used in category filtering, twig functions etc.
next_delivery_date date Next delivery date.
next_delivery_quantity string Next delivery quantity.
tax decimal Product tax rate.
price string Product price.
price_raw string Product price without currency formatting.
price_recommended string Recommended product price.
price_recommended_raw string Recommended product price without currency formatting.
price_special string Special product price.
price_special_raw string Special product price without currency formatting.
price_special_expires date Expire date of the special product price.
price_log_price string Lowest matching product price from price log. Only set if product has logged price changes.
price_log_price_raw string Lowest matching product price from price log, without currency formatting. Only set if product has logged price changes.
price_log_price_ex_vat_raw string Lowest matching product price from price log, without currency formatting and without vat. Only set if product has logged price changes.
price_discount_percentage integer Discount in percent for product.
rating decimal Average review rating in increments of 0.5.
replacement_product string Replacement product article number.
seo_link URL Product link.
stock integer Products in stock.
stock_allow_checkout boolean Allow orders when stock is empty
type string Product quantity type.
weight string Product weight.
reorder_stock string
stock_place string Product location.
viewed integer Product view count.
ordered integer Product order count.
note string Product note.
lead_time string
price_in string
shipping_class int Product shipping class. 1-10
discounts list of discounts All discounts, with current_matches set.
product.manufacturer manufacturer Product brand information The manufacturer dictionary has an additional key named 'model' containing the manufacturer model for the product.
product.collection manufacturer Product collection information The collection dictionary has an additional key named 'model' containing the manufacturer model for the product.

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 two additional keys.
Key Type Description
quantity_added integer The quantity of the product added to the shopping cart
cart dictionary The data for a product in the shopping cart (see box or page).

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.
Key Type Description
href URL Link to the review page
author string Author of the review
date date The date the review was written
text string The first 100 characters of the review text, lines broken at every 40 characters
full_text string The first 100 characters of the review text
rating integer Review rating, 1-5.

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.
Key Type Description
author string Author of the review
date date The date the review was written
text string The review text, lines broken at every 60 characters
rating integer Review rating, 1-5.

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.
Key Type Description
firstname string First name of the customer writing the review.
lastname string Last name of the customer writing the review.

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
Key Type Description
href URL A link to the review page
product string Product name
author string Review author
date date Review date
image string Product image
text HTML Abbreviated review text
full_text string Unabbreviated review text
rating HTML Product rating

Shopping cart page (shopping_cart.html)

These variables are available on shopping_cart.php only.

Variable name Type Description
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

These variables are available in pages/checkout/shopping_cart.html through ajax_include.php?page=loadcart, pages/checkout.html through checkout.php and pages/shopping_cart.html through shopping_cart.php:

Variable name Type Description
shopping_cart.list list of dictionaries Products in the shopping cart.
shopping_cart.products list of dictionaries Same as shopping_cart.list.
shopping_cart.any_out_of_stock integer 1 if any product in the shopping cart is out of stock, 0 otherwise.
shopping_cart.total string The currency formatted total cost of the shopping cart, tax included unless tax display inactivated.
shopping_cart.discounts list of discounts

Each product has the following format:

Variable name Type Description
id
parent_id
final_price
final_price_raw
image
manufacturers_id
collection_id
model
name
package_content
price
price_raw
quantity
weight
href
unit
type
total_price
total_price_raw
total_final_price
total_final_price_raw
final_price_difference
final_price_difference_raw
total_final_price_difference
total_final_price_difference_raw
final_price_discount_percent
price_per_unit
final_price_per_unit
quantity_in_unit
stock_quantity
discounts list
Variable name Type Description
id
required_count_min
required_count_max
required_total_min
required_total_max
discount_percent
discount_price
discount_count
variants list
Key Type Description
id
name
choice dictionary
Key Description
id
name
attributes dictionary
Variable name Type Description
type
id
name
value_id
value
price
price_prefix
data dictionary Custom data stored on the shopping cart entry.

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

Functions

build(string, array, array)

Creates the target file as the concatenation of the list of source files. SCSS-files are compiled to CSS. The target file is updated when any of the source files have a modified date later than that of the target file.

Relative paths in CSS-files are not updated, take care that the information referenced is reachable from the output directory. If the generated file is put in the same directory as the source files, it should work as paths relative to the generated URL will still work.

JavaScript-files can also be built.

<link rel="stylesheet" href="{{ build('output/out.css',
  ['input/a.css', 'input/b.css', 'input/test.scss']) }}">

The returned string could look like this:

/static/9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08/template/output/out.css

The third parameter is an optional list of options. The currently supported options are "dry-run" and "force". "dry-run" causes the function to return the URL to the output file without generating or regerenrating it. "force" causes the function to always regenerate the output file.

<link rel="stylesheet" href="{{ build('output/out.css',
  ['input/a.css', 'input/b.css', 'input/test.scss'],
  ['dry-run', 'force']) }}">

is_numeric(variable)

true/false to see if a variable is a number (float or int). Same as the PHP function.

{{ is_numeric(variable) }}

check_customer_exists(value, field)

Returns true/false if customer exists.

Will check if a customer exists based on field. Current accepted fields are 'id' (default) and 'personnummer'

check_customer_exists('900805-2122', 'personnummer')

file_exists(file)

Returns true/false if template file found.

product_has_associated_products(products_id [, associations_type = 0])

Returns a boolean indicating if the product has associated products of the requested type.

get_associated_products(products_id [, associations_type = 0 [, order_by = 'association_priority' [, replace_variants = false]]])

Returns a product listing of associated products for the given product.

Use type = -1 for "customers who bought this also bought...".

{% import 'helpers/html.html' as html %}
{% for p in get_associated_products(product.product.id) %}
  {{ html.listed_product(p) }}
{% endfor %}

To get the priority of the associated product use the field associated_priority.

If order_by is omitted, the associated product priority (products_associations.priority) is used as default.

Valid values for order_by

  • date_added:asc
  • date_added (evaluates to date_added:desc)
  • date_added:desc
  • new_until:asc
  • new_until:desc
  • rand
  • sort_order
  • products_ordered_recent (DESC is default order)
  • products_name:asc
  • products_name:desc
  • products_model:asc
  • products_model:desc
  • products_price:asc
  • products_price:desc

The parameter replace_variants replaces the associated products with their parent products.

get_associated_product_types()

Returns an indexed listing of all associated product types.

Variable name Type Description
id integer The association type's id.
name string The association type's name.

The default associated product types are:

id name
-1 Andra som köpte denna köpte även
0 Associerade produkter

Example syntax:

{{ get_associated_product_types() }}

get_categories(products_id)

Returns the categories for the given product.

<ul>
{% for c in get_categories(product.product.id) %}
  <li><a href="{{ c.id }}">{{ c.name }}</a></li>
{% endfor %}
</ul>

get_category_tree(categories_id, [options])

Returns a category tree starting from the requested ID. Using 0 for the ID is not possible.

{{ get_category_tree(123, ['inactive']) }}

get_coupon_codes_by_category(category_input)

Returns active coupon codes by category. The input parameter may be a category id or an array of category ids. Only valid coupon codes for the currently logged in customer are returned.

{{ get_coupon_codes_by_category(11) }}
{{ get_coupon_codes_by_category([11, 164, 182]) }}

get_coupon_codes_by_manufacturer(manufacturer_input)

Returns active coupon codes by manufacturer. The input parameter may be a manufacturer id or an array of manufacturer ids. Only valid coupon codes for the currently logged in customer are returned.

{{ get_coupon_codes_by_manufacturer(12) }}
{{ get_coupon_codes_by_manufacturer([12, 18, 64]) }}

get_customer_address_book()

Returns the customer's address book based on session customer id.

Variable name Type Description
id int
type_id string
type_name string
firstname string
lastname string
company string
street_address string
street_address2 string
suburb string
city string
postcode string
state string
zone_id string
country string

get_customer_country_by_ip()

Returns an array with information about country based on users IP.

Key Type Description
name string Country name (e.g. Sverige)
country_id integer Country ID
iso2 string Two letter country code (e.g. SE)
iso3 string Three letter country code (e.g. SWE)

get_customer_logins()

Returns an array containing all the customer logins.

{{ get_customer_logins() | json_encode }}

get_customer_order(order_id)

Returns a customer order with the same data structure as on Order Info Page (account_history_info), with the exception of returning parcel_id instead of events (order delivery events), id instead of id_formatted, and status_id in addition to status.

get_customer_orders()

Returns the customer's orders with the highest order id first.

Variable name Type Description
id integer The order's id.

get_product_extended_data_fields(product_id)

Returns extended data field information

get_customer_subscription_info()

Returns information about subscriptions.

Variable name Type Description Format
shopping_cart_subscriptions list of dictionaries Subscriptions that would be generated from the shopping cart contents.
Key Type Description
id integer
status boolean False if the subscription has been inactivated.
created_at date
period string The subscription period in the subscription period string format. 1m1d -- 12m31d, 1W1w -- 52W7w, 1d --.
period_description string The subscription period in a textual format, for example "var 3:e vecka".
payment_method_code string
payment_method_title string Current title for the selected payment method.
shipping_method_code string
shipping_method_code string Current title for the selected shipping method.
delivery_firstname string
delivery_lastname string
delivery_company string
delivery_street_address string
delivery_street_address2 string
delivery_city string
delivery_postcode string
delivery_country string
orders list of orders Previously created orders.
undelivered_orders list of orders Previously created orders, for which the shipping date has not yet passed.
products list of dictionaries
Key Type
id integer
quantity integer
product product
changes dictionary of lists of dictionaries
Key Type
date date
products_index integer or null
id integer or null
quantity integer or null
product product or null

If products_index is null it is a new product row, otherwise it is an index into the products list. If id is null the indicated product is removed.

pauses list of date Subscription-specific pauses.
next_deliveries list of dictionaries
Key Type
creation_date date
delivery_date date
paused bool
paused_globally bool
paused_customer bool
changes list of dictionaries; refer to the changes format

The next 20 deliveries, pauses not taken into account.

next_creation_dates list of date The next 10 order creation dates, paused orders skipped.
next_delivery_dates list of date The delivery dates for the orders in next_creation_orders, paused orders skipped.
subscriptions list of dictionaries Previous subscriptions. The format is the same as for shopping_cart_subscriptions.
pauses list of date Global pauses in deliveries. N/A
delivery_minimum_days integer Minimum number of days from an automatic subscription order creation to a delivery. N/A

get_delivery_status()

Returns an array containing an array with the history from Unifaun and the order_status from Admin.

{{ get_delivery_status() | json_encode }}

get_discounts()

Returns the active discounts.

{{ get_discounts() | json_encode }}

get_discounted_product_discount(product_id, [customers_group_id])

Returns the active discounts matching a product.

{
    "when": {
        {"name": "Ta 3 betala för 2"}
    },
    "what": {
        {"name": "Ta 3 betala för 2"},
        {"name": "Köp över 699kr, få ett hårband på köpet"}
    }
}

get_download_link(download_url)

Returnss a download link for the given URL. null is returned for errors, such as for invalid URLs.

Example:

{{ get_download_link('https://www.example.com/test.pdf') }}

Output:

https://www.example.org/ajax.php?mode=download&key=p6dNyTcma5BpinFPOBPbGAx-ItgdhKP0WZz_b66PBoHfCd1Tqk52skjHyyKWvQponX6THYOQdAkTaAZA2CcVj9sR0ZjeYiFMLib_ndk32g9Z19VBMsZ65eaKchUfsvqE-MKGkb77v1EleUWDGSsJV3Zb12lEep8DMZaglavF3iSVEg4FcWOl

get_information_page_tree(page_id, [options])

Returns a page tree starting from the requested page_id. The tree has the same structure as boxes.information_pages.tree (see above). Using 0 for the ID *is* possible and returns a tree of all pages. Omitting the page_id will yield the same result as setting page_id to 0. The only options supported are "inactive" (include inactive pages) and "hidden" (include hidden pages).

{{ get_information_page_tree() }}
{{ get_information_page_tree(30) }}
{{ get_information_page_tree(30, ['inactive']) }}

Remember it doesn't return an array straight, so you can do this:

{% for c in [get_information_page_tree(id)] %}

Unless you go for children example:

{% for c in get_information_page_tree(81, ['hidden']).children %}

You can also access key values directly like:

{{ get_information_page_tree(id).name }}

get_manufacturer(manufacturers_id)

Returns a specific manufacturer.

{{ get_manufacturer(123) }}

get_manufacturer_category_tree(manufacturer_id)

Returns a simple category tree filtered by manufacturer. Only the categories containing active products with the selected manufacturer are returned. Also returns a count of those products for each section of the category tree.

{{ get_manufacturer_category_tree(123 }}

Result item structure:

Key Type Description
id integer Category ID
name string Category name
href URL Absolute url path to the category
seo_link URL Relative url path to the category
image URL Category image url
children array Category children
product_count integer Number of products matching the manufacturer in the category and all child categories

get_markets_for_countries([countries_id])

Returns an array containing the countries selected. In the array for a country are the markets that it's connected to and information about that market.

get_unit(unit_id)

Returns an array with information about a unit.

Key Type Description
title string Title of unit (e.g. Styck)
abbr string Abbreviation of title (e.g. st)
relation_id integer ID of unit it's connected to
calculation_value integer Value in relation to connected unit

get_page_content_block_history([filterByLanguageId = 0 [, groupByDate = true [, pageId = 0]]])

Returns a list of all content block changes in descending chronological order. If filterByLanguageId is not sent, then all language changed will be included. Same with pageId.

NOTE: The function will return a maximum of 250 results.

Key Type Description
page_id integer Page ID
page_title string Page title
date_changed date Date for the change
changed_by string Name of the admin who saved the page, if super admin then this will only return "Vendre"
language_id int Language id of the change
language_name string Language name
language_code string Two letter ISO language code

get_partners([options])

Returns all partners. The only options supported are

  • "active", which filters out inactive partners
  • "visible", which filters out partners hidden from listing
  • "stocked", which filters out unstocked partners
  • "translate", which translates worktitle and description

NB: The default options are "translate", "active" and "visible" (used when the function is called without an options array).

{{ get_partners() }}
{{ get_partners(["translate"]) }}
{{ get_partners(["translate", "active", "stocked"]) }}

get_partners_stock(product_id)

Returns an array with all partner stock for a chosen product. The key for each row is the partner id.

Example response:

{
    "1": {
        "products_quantity": 2
    },
    "2": {
        "products_quantity": 12
    },
    "3": {
        "products_quantity": 0
    },
    "9": {
        "products_quantity": 4
    }
}

get_product(search, mode, [options])

Returns a single product. Valid search modes are product id (default), model, manufacturer_model or ean. When searching by product id, mode should be omitted or included as empty string.

{{ get_product(10) }}
{{ get_product("ve4875", "model") }}
{{ get_product("7313222320034", "ean") }}
{{ get_product("ve4875", "model", ["inactive"]) }}

By default only active products are returned. The only options supported are "inactive" (return both active and inactive products) and "inactive_only" (include only inactive products).

get_product_attributes(product_id)

Returns the product's attributes as a dictionary where the attribute id is used as the key and the elements have the below structure. The passed product id can be a product id string, including selected attributes.

Key Type Description
id integer Attribute ID.
type integer Attribute type. 0 for regular multi-choice attributes, 1 for attributes where a text can be entered, 2 for image attributes.
name string Attribute name.
values list of dictionaries
Key Type Description
id integer Option ID.
text string Option name with price.
text_clean string Option name.
comment string
image URL
selected boolean If the passed product id has attributes included, this is set to true for the selected options.
price string Formatted price.
price_raw float Raw price.
price_prefix string + or -.

get_product_files(product_id)

Returns an array with links and info relating to attached product files.

Note that this function is resource intensive (due to looking up and confirming the files by accessing the system each time), so use it sparingly and be aware that it may adversely affect site performance.

Key Type Description
name string File name.
path URL File link.
size integer Size in bytes.

get_product_units(product_id, [load_unit])

Returns multidimensional array with the product's configured units indexed by Unit ID. The array will be sorted by the amount value (ascending). If load_unit is true, a unit array will be included in the returned array.

Key Type Description
unitId integer Unit ID
amount integer Amount relative to the products primary unit.
unit array Array with unit info (as returned from get_unit). NOTE: Available only if load_unit is true.

get_product_customer_group_prices(product_id)

Returns the available prices for a product as an array of dictionaries with the keys quantity, active_from, active_to, price and price_incl. price_rek_incl is also returned with the function activated. The prices are returned as raw prices.

{{ get_product_customer_group_prices(10) }}

get_product_variants(product_id[, parent_id])

Returns information about variants for the given product. The information returned is the same as is stored in modules.products_variants, except that category is not included.

get_product_variant_choices(product_id)

Returns information about the selected variant choices for the given product. The information returned is the same as is stored in modules.products_variants.{choices}, except only the choices that match the selected product are returned.

get_products(limit, [search], order_by, mode, [options])

Returns all products which match the values in the search array.

{{ get_products(6, [157, 164, 182]) }}
{{ get_products(6, [157, 164, 182], "rand") }}
{{ get_products(6, ["ve4875", "ve5299", "ve6988"], "sort_order", "model")  }}
{{ get_products(6, ["ve4875", "ve5299", "ve6988"], "sort_order", "model", ["inactive"])  }}

(int) limit - maximum amount of products to return

(array) search

  • on default mode: array of product ids
  • on mode "model": array of models
  • on mode "extra_field_X" (1-5): array of values to match with extra field

(string) order_by (required if mode is "model")

  • "brand", "brand:asc", "manufacturer", "manufacturer:asc": Sort products by manufacturer name, ascending.
  • "brand:desc", "manufacturer:desc": Sort products by manufacturer name, descending.
  • "date_added:asc": Sort products by date added and order added, the oldest products first.
  • "date_added", "date_added:desc": Sort products by date added and order added, the newest products first.
  • "model", "model:asc", "products_model", "products_model:asc": Sort products by model/article number, ascending.
  • "model:desc", "products_model:desc": Sort products by model/article number, descending.
  • "name", "name:asc", "products_name", "products_name:asc": Sort products by product name, ascending.
  • "name:desc", "products_name:desc": Sort products by product name, descending.
  • "ordered_recent", "ordered_recent:desc", "products_ordered_recent", "products_ordered_recent:desc": Sort products by recently ordered, the latest ordered products first.
  • "ordered_total", "ordered_total:desc": Sort products by total amount ordered, the highest totals first.
  • "price:asc", "producs_price:asc": Sort products by price, ascending.
  • "price:desc", "producs_price:desc": Sort products by price, descending.
  • "price_recommended:asc": Sort products by recommended price, ascending.
  • "price_recommended:desc": Sort products by recommended price, descending.
  • "rand", "random": Sort products by number of tag matches, then randomly.
  • "sort_order": Sort products by sort order.
  • "tags+date_added:asc": Sort products by number of tag matches, then by date added and order added, the oldest products first.
  • "tags+date_added", "tags+date_added:desc": Sort products by number of tag matches, then by date added and order added, the newest products first.
  • "weight:asc": Sort products by weight, ascending.
  • "weight:desc": Sort products by weight, descending.
  • Any other string: Sort products by order added, the first added products first.

(string) mode

  • empty string (default): array of product ids
  • "model": array of models
  • "extra_field_X" (1-5): array of values to match with extra field

(array) options (only active products are returned by default)

  • "inactive": return both active and inactive products
  • "inactive_only": return only inactive products
  • "new_only": return only new products

get_products_with_specials([page_limit = 10[, page_index = 1[, order_by = 'sort_order'[, sort_order = 'ASC']]]])

Returns products who have an active special price. Only active products shown in listing are returned. The function uses page_limit and page_index to paginate the query result and only return the matching subset. The "pagination" data set in the return data contains all data necessary for creating pagination controls in the storefront.

To use the function without pagination, simply treat page_limit as a standard hard limit and leave page_index as 1. The "pagination" data set in the return data may be ignored in this case.

N.B. This function was created as a replacement for specials.php

{{ get_products_with_specials() }}
{{ get_products_with_specials(100) }}
{{ get_products_with_specials(10, 2) }}
{{ get_products_with_specials(15, 3, 'name', 'DESC') }}

(int) page_limit - maximum amount of products to return for the selected page_index (if not using pagination, page_index should always be 1) (int) page_index - current page, minimum is 1. Used when paginating results.

(string) order_by

  • "brand": sort products by brand.
  • "date_added": sort products by date_added.
  • "extra_field_2": sort products by extra_field_2.
  • "model": sort products by model.
  • "new_until": sort products by new_until.
  • "ordered_recent": sort products by ordered_recent (also know as best selling products since x days).
  • "ordered_total": sort products by ordered_total (also know as best selling products since beginning of time).
  • "price": sort products by price.
  • "price_recommended": sort products by price_recommended.
  • "random": sort products by random.
  • "sort_order": sort products by sort_order.
  • "weight": sort products by weight.

(string) sort_order

  • "ASC": sort products in ascending order.
  • "DESC": sort products in descending order.

get_specification_values_by_id(specification_id)

Returns unique specification values by specification id (category id of type specification). Retrieved values are sorted alphabetically the way a human would sort them (uses strnatcmp for consistency with specification filter sorting).

{{ get_specification_values_by_id(30) }}

See below for expected return value structure.

Key Type Description
id integer The ID belonging to the specification.
name string The name of the specification.
type string Either "text" or "value".
unit string Currency name or specification unit (Provided only if type is "value" and specification unit is set).
Key Type Description
id integer The ID belonging to the unit.
short_value string If type is "text", this contains the short value.
value string The value of the specification

get_specifications(product_id)

Returns all specifications by product id (and filtered by session language).

{{ get_specifications(24) }}

See below for expected return value structure.

Key Type Description
id integer The ID belonging to the specification.
name string The name of the specification.
type string Either "text" or "value".
unit string Currency name or specification unit (Provided only if type is "value" and specification unit is set).
Key Type Description
id integer The ID belonging to the unit.
short_value string If type is "text", this contains the short value.
value string The value of the specification

get_store_design_button_class

Returns the standard (and configured) CSS classes for buttons used in the standard templates.

get_tag_tree(tag_id)

Returns a tag tree starting from the requested tag_id. Using 0 for the ID *is* possible and returns a tree of all tags. Omitting the tag_id will yield the same result as setting tag_id to 0.

{{ get_tag_tree() }}
{{ get_tag_tree(30) }}

get_package_per_unique_product_details(product_id)

Returns one product for each product-id with the total sum of the quantity on the package. The array will be empty if it's not a package.

{{ get_package_per_unique_product_details(746) }}

get_product_with_package_info(product_id)

Returns all products in the package together with the package quantity. The array will be empty if it's not a package. This function works almost like "modules.products_in_package.products" on the products page with one exception; It works on every page.

{{ get_product_with_package_info(746) }}

get_external_pricelists([product_ids])

Uses Pull Api to fetch pricelists from external API, matching current customer_group/product. Updates the current pricelist at the same time. Returns null if no pricelist exists, or an json-string if it did exist.

{{ get_external_pricelists([267,14,222]) }}

get_external_orderhistory_list([order_id, dateFrom, dateTo, offset])

Uses Pull Api to fetch a list of orders from an external API, matching current customer. Returns null if no order exists, or an json-string if it did exist. All arguments are optional.

{{ get_external_orderhistory_list("ABC123", "2022-11-12", "2022-12-12", "10") }}

get_external_orderhistory_item([order_id])

Uses Pull Api to fetch an order from an external API, matching current customer with specified order id. Returns null if no order exists, or an json-string if it did exist.

{{ get_external_orderhistory_item("AB123") }}

get_multiaccounts_list()

Example syntax,

{% set accounts = get_multiaccounts_list() %}
{% if accounts %}
  {% for account in accounts %}
    ID {{ account.account.id }}<br>
    Currently logged in {{ account.current }}<br>
    Type {{ account.account.type }}<br>
    Name {{ account.account.full_name }}<br>
    Company {{ account.customer.company }}<br>
    Login URL {{ account.login_url }}<br>
    <hr>
  {% endfor %}
{% else %}
  Nah
{% endif %}

get_multiaccounts_list() (numeric array, zero indexed)
Field Type Description
current bool True, for the logged in user
email string Email address
token string Logintoken
token_valid_date date YY-MM-DD Date the logintoken is valid
account associative array [account] Loginaccount data
customer associative array [customer] Customer data
account (associative array)
Field Type Description
id int
encoded_id string ID encoded in Base64
external_id string
active bool
type int Account type (1=User, 0=Admin)
firstname string Firstname
lastname string Lastname
full_name string Firstname and Lastname combined with a space
customer (associative array)
Field Type Description
id int
external_id string
active bool
type int Customer type
image_id int
group_id int
market_id int
language_id int
company string Company name (from address book)
firstname string Firstname
lastname string Lastname
full_name string Firstname and Lastname combined with a space

langimg(image, width, height)

If the image exists, returns the HTML needed to display it.

{{ langimg("imagename.jpg") }}

langstr(name)

Returns a language string.

{{ langstr("LANGUAGE_STRING") }}

search_information_pages(keywords, [options])

Searches through the informations pages for the keywords (separeted by whitespace).

Options are:

  • pages_only bool (if true only regular information pages will be searched)
  • hide_disabled_listings bool (if true, hides pages not set to show_in_listing)

Plugins

getByTags(limit, tags, fill, order_by, new_only, replace_variants)

Get products by categories or tags.

{% set products = get_plugin('product_query').getByTags(4, [120, 130, 140]) %}

Limit is the maximum amount of products to return, tags are the tags from which products are selected, fill controls if products which do not match any of the tags are also returned, order_by controls how the products are sorted and new_only only returns new products (if true).

order_by can be one of these strings:

  • "brand", "brand:asc", "manufacturer", "manufacturer:asc": Sort products by manufacturer name, ascending.
  • "brand:desc", "manufacturer:desc": Sort products by manufacturer name, descending.
  • "date_added:asc": Sort products by date added and order added, the oldest products first.
  • "date_added", "date_added:desc": Sort products by date added and order added, the newest products first.
  • "model", "model:asc", "products_model", "products_model:asc": Sort products by model/article number, ascending.
  • "model:desc", "products_model:desc": Sort products by model/article number, descending.
  • "name", "name:asc", "products_name", "products_name:asc": Sort products by product name, ascending.
  • "name:desc", "products_name:desc": Sort products by product name, descending.
  • "ordered_recent", "ordered_recent:desc", "products_ordered_recent", "products_ordered_recent:desc": Sort products by recently ordered, the latest ordered products first.
  • "ordered_total", "ordered_total:desc": Sort products by total amount ordered, the highest totals first.
  • "price:asc", "producs_price:asc": Sort products by price, ascending.
  • "price:desc", "producs_price:desc": Sort products by price, descending.
  • "price_recommended:asc": Sort products by recommended price, ascending.
  • "price_recommended:desc": Sort products by recommended price, descending.
  • "rand", "random": Sort products by number of tag matches, then randomly.
  • "sort_order": Sort products by sort order.
  • "tags+date_added:asc": Sort products by number of tag matches, then by date added and order added, the oldest products first.
  • "tags+date_added", "tags+date_added:desc": Sort products by number of tag matches, then by date added and order added, the newest products first.
  • "weight:asc": Sort products by weight, ascending.
  • "weight:desc": Sort products by weight, descending.
  • Any other string: Sort products by order added, the first added products first.

replace_variants is optional and can be true/false, default false.

getAllByTags(limit, tags, fill, order_by, new_only, replace_variants)

Get products by categories or tags, this includes subcategories and subtags. The function calls the getByTags for each iteration, so the parameters match the above function definition.

{% set products = get_plugin('product_query').getAllByTags(12, [164], false, "sort_order", false) %}

Filters

bool

Casts value to boolean, if value is a scalar (i.e. string, int, float or bool). Otherwise returns null.

1|bool

bool_filter

Casts value to boolean in an intelligent (but non-standard) way. See below for details:

  • Returns true for "1", "true", "on" and "yes".
  • Returns false for "0", "false", "off", "no", and "".
  • Returns null for all non-boolean values.
"false"|bool

chain(array)

Chain two iterable values.

[1, 2]|chain([3, 4])

choose(number)

Choose random entries from an array or dictionary.

[1, 2, 3, 4, 5]|choose(3)

currency_format

Formats raw number with store currency.

float|currency_format

currency_calculate

Calculates raw number with store currency.

float|currency_calculate

currency_round

Rounds raw number according to settings for store and active session.

float|currency_round

float

Casts value to float, if value is numeric (using php's is_numeric function). Otherwise returns null.

"123,456"|float

image_button_url

Looks up an image button image for the current language.

"filename.jpg"|image_button_url

int

Casts value to integer, if value is either numeric (using php's is_numeric function) or a boolean. Otherwise returns null.

"123"|int

link(query_string)

Create a link.

"filename.php"|link(query_string)

md5

Creates an MD5 hash from a string.

"string"|md5

query_string

Converts a dictionary to a valid query string.

dict|query_string

sort_by_property(sort_key [, sort_order = 'ASC'])

Sort an array consisting of objects or associative arrays by selected property (sort_key).

array_of_objects|sort_by_property('name')
{% for object in array_of_objects|sort_by_property('name', 'DESC') %}

string

Casts value to string, if value is a scalar (i.e. string, int, float or bool) or if value is an object that can be stringified (has a __toString method). Otherwise returns null.

123|string

strip

Strips whitespace from the begnning and end of strings.

string|strip

strip_tags(allowed_tags)

Strips tags.

|strip_tags("<allowed><tags>")

thumbnail(width, height)

Return thumbnail path, width and height for thumbnailed image.

image|thumbnail([width[, height]])

truncate(limit, append)

Truncate string to given limit and append string

string|truncate(limit[, append = "..."])

truncate_html(limit, append)

Truncate string to given limit and append string after stripping HTML and expanding HTML entities.

string|truncate(limit[, append = "..."])

type

Returns the type of the value/variable (uses php's function gettype).

"text"|type

unique(array)

Remove duplicates from array

[1, 1, 2]|unique

Optional parameter sort_flags may be used. Valid values are 'string' (default), 'regular', 'locale_string' and 'numeric' and correspond to the PHP constants SORT_STRING, SORT_REGULAR, SORT_LOCALE_STRING and SORT_NUMERIC. See https://www.php.net/manual/en/function.array-unique.php.

[1, 1, 2]|unique('string')