Skillnad mellan versioner av "Templating:Variables"

Från Vendre Help
Hoppa till: navigering, sök
(Product page (product.html): Add tax rate.)
(upsell() dictionary)
 
(354 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===
 
===decimal===
 
===boolean===
 
===boolean===
 
===list===
 
===list===
 
===dictionary===
 
===dictionary===
====pagination====
+
====manufacturer====
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 18: 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
+
|extra3
|decimal
+
|[[#string|string]]
|Product tax rate.
+
|
 
|-
 
|-
|tax_class_id
+
|href
|integer
+
|[[#URL|URL]]
 +
|
 +
|-
 +
|url
 +
|[[#URL|URL]]
 +
|
 +
|-
 +
|description
 +
|[[#string|string]]
 
|
 
|
 
|-
 
|-
|rating
+
|meta_title
|decimal
+
|[[#string|string]]
|Average review rating in increments of 0.5.
+
|
|}
 
 
 
====tag====
 
{| class="wikitable"
 
! Key !! Type !! Description
 
 
|-
 
|-
| id              || integer      || ID.
+
|meta_keywords
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| parent_id        || integer      || Parent ID, 0 when there is no parent tag.
+
|meta_description
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| name            || string       || Name.
+
|seo_text
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| description      || HTML        || Description.
+
|seo_title
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| image            || URL          || Image URL.
+
|extra4
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| meta_title      || HTML        || Meta title.
+
|extra5
 +
|[[#string|string]]
 +
|
 
|-
 
|-
| meta_keywords    || HTML        || Meta keywords.
+
|images
 +
|[[#list|list]] of [[#URL|URLs]]
 +
|
 
|-
 
|-
| meta_description || HTML        || Meta description.
+
|pdfs
 +
|[[#list|list]]
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
| children        || list of tags || Child tags.
+
|path||[[#URL|URL]]||PDF link.
 
|-
 
|-
| used            || boolean      || Indicates if the tag is used by any product in a category listing.
+
|name||[[#string|string]]||PDF label.
 +
|}
 
|}
 
|}
  
==Globals==
+
====pagination====
Globals are accessible anywhere in the templates, including macros.
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|current_page
+
|page
|string
+
|[[#integer|integer]]
|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''
+
|The current page.
|N/A
+
|-
 +
|prev
 +
|[[#integer|integer]]
 +
|The previous page.
 +
|-
 +
|next
 +
|[[#integer|integer]]
 +
|The next page.
 +
|-
 +
|pages
 +
|[[#list|list]] of [[#integers|integer]]s
 +
|The pages in the current set.
 +
|-
 +
|set_prev
 +
|[[#integer|integer]]
 +
|The last page in the previous set of pages.
 +
|-
 +
|set_next
 +
|[[#integer|integer]]
 +
|The first page in the next set of pages.
 +
|-
 +
|from_row
 +
|[[#integer|integer]]
 +
|The first row displayed.
 
|-
 
|-
|current_script
+
|to_row
|string
+
|[[#integer|integer]]
|Contains filename of current page
+
|The last row displayed.
|index.php
 
 
|-
 
|-
|request
+
|row_count
|dictionary
+
|[[#integer|integer]]
|A dictionary of recieved ''GET'' and ''POST'' data
+
|The number of rows paginated.
|
+
|}
 +
 
 +
====product====
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 190: Rad 230:
 
!Description
 
!Description
 
|-
 
|-
|get
+
|id
|dictionary
+
|[[#string|string]]
|Data received from the ''GET'' query string
+
|Products internal ID
 
|-
 
|-
|post
+
|delivery_time
|dictionary
+
|[[#string|string]]
|Received ''POST'' data
+
|
|}
+
|-
 +
|description
 +
|[[#HTML|HTML]]
 +
|
 +
|-
 +
|description_short
 +
|[[#HTML|HTML]]
 +
|
 +
|-
 +
|href_buy
 +
|[[#URL|URL]]
 +
|
 
|-
 
|-
|current_customer_id
+
|href
|integer
+
|[[#URL|URL]]
|Returns customer ID if customer is logged in, else None
+
|
|N/A
 
 
|-
 
|-
|meta
+
|image
|dictionary
+
|[[#URL|URL]]
|Header meta information for current page.
 
 
|
 
|
 +
|-
 +
|images
 +
|[[#dictionary|dictionary]]
 +
|Additional product images.
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 213: Rad 266:
 
!Description
 
!Description
 
|-
 
|-
|title
+
|href||[[#URL|URL]]||Image thumbnail link.
|HTML
 
|Page title.
 
 
|-
 
|-
|keywords
+
|image||[[#URL|URL]]||Image path.
|string
 
|Page meta keywords.
 
 
|-
 
|-
|description
+
|description||[[#string|string]]||Image description.
|HTML
+
|}
|Page meta description.
 
 
|-
 
|-
|language
+
|is_package
|string
+
|[[#boolean|boolean]]
|Page language.
+
|True when the product has packaged products.
 
|-
 
|-
|generator
+
|has_attributes
|string
+
|[[#boolean|boolean]]
|Startabutik E-handel.
+
|True when the product has any attributes.
 
|-
 
|-
|canonical
+
|manufacturer_image
|URL
+
|[[#URL|URL]]
|Canonical URL for current page.  Not always available.
+
|
|}
 
 
|-
 
|-
|settings
+
|manufacturer_name
|dictionary
+
|[[#string|string]]
|Contains some of the settings defined in the administration
+
|
 +
|-
 +
|model
 +
|[[#string|string]]
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|ACCOUNT_COMPANY, ACCOUNT_DOB, ACCOUNT_GENDER, ACCOUNT_PERSONNUMMER, ACCOUNT_STATE, ACCOUNT_SUBURB
+
|name
|boolean
+
|[[#string|string]]
|Account fields can be enabled and disabled
+
|
 
|-
 
|-
|CREATE_ACCOUNT_LAYOUT
+
|price_discount_percentage
|integer
+
|[[#HTML|HTML]]
|''Internal''
+
|
 
|-
 
|-
|DOWNLOAD_ENABLED
+
|price
|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
+
|price_raw
|integer
+
|[[#HTML|HTML]]
|Used in form validation
+
|
 
|-
 
|-
|ENTRY_PASSWORD_IN_REGISTRATION
+
|price_recommended
|boolean
+
|[[#HTML|HTML]]
|Is the user allowed to specify a password when registering
+
|
 
|-
 
|-
|FORMS_USE_CAPTCHA
+
|price_recommended_raw
|boolean
+
|[[#HTML|HTML]]
|Is captcha used for forms
+
|
 
|-
 
|-
|HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT
+
|price_special
|integer
+
|[[#HTML|HTML]]
|Width and height of heading images
+
|
 
|-
 
|-
|MAX_ADDRESS_BOOK_ENTRIES
+
|price_special_raw
|integer
+
|[[#HTML|HTML]]
|Maximum entries in the address book
+
|
 
|-
 
|-
|PREV_NEXT_BAR_LOCATION
+
|price_special_expires
|integer
+
|[[#date|date]]
|''Internal''
+
|
 
|-
 
|-
|SMALL_IMAGE_WIDTH
+
|quantity
|integer
+
|[[#integer|integer]]
|Width of small thumbnails in pixels
+
|
 
|-
 
|-
|SMALL_IMAGE_HEIGHT
+
|quantity_partner
|integer
+
|[[#integer|integer]]
|Height of small thumbnails in pixels
+
|Shows up when using get_products and get_associated_product, containing the quantity for the main stock selected from partners.
 
|-
 
|-
|STATISTICS_GOOGLE_ANALYTICS
+
|replacement_product
|string
+
|[[#string|string]]
|Google analytics tracking code, if specified
+
|
 
|-
 
|-
|PRODUCT_PAGE_DESIGN
+
|seo_link
|integer
+
|[[#string|string]]
|''Internal''
+
|
|}
 
 
|-
 
|-
|shoppingcart_amount
+
|tax
|string
+
|[[#decimal|decimal]]
|Amount of products in shopping cart
+
|Product tax rate.
|N/A
 
 
|-
 
|-
|shoppingcart_total
+
|tax_class_id
|string
+
|[[#integer|integer]]
|Total sum of the content in shopping cart
+
|
|N/A
 
 
|-
 
|-
|random_box_left
+
|type
|string
+
|[[#string|string]]
|Shows boxes at the left side of the store
+
|
|N/A
 
 
|-
 
|-
|random_box_right
+
|parent_id
|string
+
|[[#integer|integer]]
|Shows boxes at the right side of the store
+
|The products parent
|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
+
|child_count
|list of dictionaries
+
|[[#integer|integer]]
|Contains a tree of displayed categories in menu
+
|Counts amount of child products
 +
|-
 +
|rating
 +
|[[#decimal|decimal]]
 +
|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]]
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
|-
 
|id
 
|integer
 
|Id of category
 
 
|-
 
|-
|name
+
|extra1||[[#HTML|HTML]]||Custom product field.
|string
 
|Name of category in current language
 
 
|-
 
|-
|image
+
|extra2||[[#HTML|HTML]]||Custom product field.
|string
 
|Path to category image if such exists
 
 
|-
 
|-
|href
+
|extra3||[[#HTML|HTML]]||Custom product field.
|string
 
|Link to category's product listing page
 
 
|-
 
|-
|child_count
+
|extra4||[[#HTML|HTML]]||Custom product field.
|integer
 
|Number of open child categories
 
 
|-
 
|-
|children
+
|extra5||[[#HTML|HTML]]||Custom product field.
|list of dictionaries
 
|List of visible child categories. See boxes.categories.tree for format
 
 
|-
 
|-
|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
 
|}
 
 
|}
 
|}
  
===Category full menu===
+
====tag====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| id              || [[#integer|integer]]      || ID.
!Format
+
|-
 +
| parent_id        || [[#integer|integer]]      || Parent ID, 0 when there is no parent tag.
 
|-
 
|-
|boxes.categories_full.tree
+
| name            || [[#string|string]]      || Name.
|list of dictionaries
 
|Contains a full tree of all available categories in menu
 
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|id
+
| description      || [[#HTML|HTML]]        || Description.
|integer
 
|Id of category
 
 
|-
 
|-
|name
+
| image            || [[#URL|URL]]          || Image URL.
|string
 
|Name of category in current language
 
 
|-
 
|-
|image
+
| meta_title      || [[#HTML|HTML]]        || Meta title.
|string
 
|Path to category image if such exists
 
 
|-
 
|-
|href
+
| meta_keywords    || [[#HTML|HTML]]        || Meta keywords.
|string
 
|Link to category's product listing page
 
 
|-
 
|-
|child_count
+
| meta_description || [[#HTML|HTML]]        || Meta description.
|integer
 
|Number of open child categories
 
 
|-
 
|-
|children
+
| children         || [[#list|list]] of [[#tag|tags]] || Child tags.
|list of dictionaries
 
|List of visible child categories. See boxes.categories.tree for format
 
 
|-
 
|-
|open
+
| used            || [[#boolean|boolean]]      || Indicates if the tag is used by any product in a category listing.
|boolean
 
|Returns true if the category (or one of its children) is the currently selected one
 
 
|-
 
|-
|selected
+
|color||[[#string|string]]||Tag color (HEX).
|boolean
 
|Returns true if the category is the currently selected one
 
|}
 
 
|}
 
|}
  
===Manufacturer select===
+
====custom field====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| fields_id              || [[#integer|integer]]      || ID.
!Format
+
|-
 +
| require_in_checkout        || [[#boolean|boolean]]      || Is the field required in the checkout?
 +
|-
 +
| type            || [[#string|string]]      || What was entered in the administration.
 
|-
 
|-
|boxes.manufacturers.list
+
| name      || [[#string|string]]        || Field label.
|list of dictionaries
+
|-
|Lists all available manufacturers
+
| value            || [[#string|string]]          || Entered value (not always available).
|
+
|}
 +
 
 +
====extended data field====
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| id              || [[#integer|integer]]      || ID.
 +
|-
 +
| name        || [[#string|strring]]      || Name
 
|-
 
|-
|name
+
| type        || [[#string|string]]      || Type of data json/binary/text
|string
 
|Name of manufacturer
 
 
|-
 
|-
|href
+
| language_dependant        || [[#bool|bool]]      || True if one value per language
|string
 
|Link to manufacturer page
 
 
|}
 
|}
|}
+
 
===Search box===
+
====discount====
{| class="wikitable"
+
{|class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.search.advanced_href
+
|id
|string
+
|[[#integer|integer]]
|URL to advanced search page
+
|The unique ID generated for the discount.
|N/A
 
 
|-
 
|-
|boxes.search.advanced_result_href
+
|name
|string
+
|[[#string|string]]
|Action URL for search form
+
|The name selected for the discount.
|N/A
 
 
|}
 
|}
===Information page list===
+
 
{| class="wikitable"
+
Depending on the ''type'' field, there are additional fields:
!Variable name
+
 
 +
{|class="wikitable"
 +
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.information_pages.list
+
|type
|list of dictionaries
+
|[[#string|string]]
|Lists all active information pages
+
|"bogo", for buy one get one free discounts.
|
+
|-
{| class="wikitable"
+
|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.
 +
|-
 +
|categories
 +
|[[#list|list]] of categories
 +
|Categories for which products count for this discount.
 +
|-
 +
|cart_matches
 +
|[[#integer|integer]]
 +
|Total count of products in the shopping cart that matches the products, manufacturers, or categories.
 +
|-
 +
|current_matches
 +
|[[#integer|integer]]
 +
|Set to 1 on the product page if the current product matches one of the products, manufacturers, or categories; otherwise 0.
 +
|}
 +
 
 +
{|class="wikitable"
 
!Key
 
!Key
 
!Type
 
!Type
 
!Description
 
!Description
 
|-
 
|-
|name
+
|type
|string
+
|[[#string|string]]
|Name of information page
+
|"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.
 
|-
 
|-
|href
+
|total_required
|string
+
|[[#decimal|decimal]]
|Link to information page
+
|The required cost of the shopping cart, not including tax.
 
|-
 
|-
|active
+
|total_current
|boolean
+
|[[#decimal|decimal]]
|Is user currently on this page?
+
|The current cost of the shopping cart, not including tax.
 
|-
 
|-
|target
+
|current_matches
|boolean
+
|[[#integer|integer]]
|True if information page expects the attribute target="_blank"
+
|Set to 1 on the product page for the selected product, otherwise 0.
 
|}
 
|}
|}
+
 
===Language list===
+
====partner====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.languages.list
+
| partners_id  || [[#integer|integer]]      || ID.
|list of dictionaries
+
|-
|Lists all languages
+
| company_name  || [[#string|string]]        || Official company name.
|
+
|-
 +
| working_title || [[#string|string]]        || Used name.
 +
|-
 +
| cin          || [[#string|string]]        || Registered company number.
 +
|-
 +
| address      || [[#string|string]]        || Address.
 +
|-
 +
| zip          || [[#string|string]]        || Zip code.
 +
|-
 +
| city          || [[#string|string]]        || City.
 +
|-
 +
| countries_id  || [[#integer|integer]]      || Country ID.
 +
|-
 +
| phone        || [[#string|string]]        || Phone number.
 +
|-
 +
| 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.
 +
|-
 +
| contacts      || [[#list|list]] of [[#dictionary|dictionaries]] ||
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 514: Rad 594:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|first_name
|string
+
|[[#string|string]]
|Language name
+
|Name.
 
|-
 
|-
|href
+
|last_name
|string
+
|[[#string|string]]
|Link to page that sets language to this one
+
|Name.
 
|-
 
|-
|image
+
|email
|string
+
|[[#string|string]]
|Image (flag) for language if available
+
|Email address.
 
|}
 
|}
|}
+
|-
===Login box===
+
| images        || [[#list|list]] of [[#string|strings]] || Images.
 +
|-
 +
| open_hours    || [[#dictionary|dictionary]] of [[#integer|days]] to [[#dictionary|dictionaries]] ||
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.login.form_href
+
|opens
|string
+
|[[#integer|integer]]
|Action link for login form
+
|Opening hour.
|N/A
 
 
|-
 
|-
|boxes.login.password_forgotten_href
+
|closes
|string
+
|[[#integer|integer]]
|Link to retrieve forgotten password page
+
|Closing hour.
|N/A
+
|}
 +
|}
 +
===date===
 +
{| class="wikitable"
 +
!Method
 +
!Type
 +
!Description
 
|-
 
|-
|boxes.login.account_history_href
+
|(treat object as string)
|string
+
|[[#string|string]]
|Link to current customer's account history page. Contains orders and such
+
|A string representation of the date, most of the time this is date_long(), otherwise date_short().
|N/A
 
 
|-
 
|-
|boxes.login.account_href
+
|timestamp()
|string
+
|[[#integer|integer]]
|Link to current customer's account page
+
|Returns the timestamp represented by this date.
|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
+
|date_short()
|string
+
|[[#string|string]]
|Current customer's first name
+
|A string representation of the date, formatted using the language string DATE_FORMAT.
|N/A
 
 
|-
 
|-
|boxes.login.customer_last_name
+
|date_long()
|string
+
|[[#string|string]]
|Current customer's last name
+
|A string representation of the date, formatted using the language string DATE_FORMAT_LONG.
|N/A
 
 
|}
 
|}
===News list===
+
 
 +
==Globals==
 +
Globals are accessible anywhere in the templates, including macros.
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 581: Rad 655:
 
!Format
 
!Format
 
|-
 
|-
|boxes.news.list
+
|template
|list of dictionaries
+
|[[#string|string]]
|Lists recent news. Limit set in administration
+
|Path to active template directory
|
+
|N/A
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|name
+
|current_page
|string
+
|[[#string|string]]
|News name
+
|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
 
|-
 
|-
|href
+
|current_script
|string
+
|[[#string|string]]
|Link to news page
+
|Contains filename of current page
 +
|index.php
 
|-
 
|-
|summary
+
|request
|string
+
|[[#dictionary|dictionary]]
|News summary
+
|A [[#dictionary|dictionary]] of recieved ''GET'' and ''POST'' data
|}
+
|
|}
 
===Review===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.reviews.write_review_href
+
|get
|string
+
|[[#dictionary|dictionary]]
|Link to write review page. Only set if customer is viewing a product page
+
|Data received from the ''GET'' query string
 +
|-
 +
|post
 +
|[[#dictionary|dictionary]]
 +
|Received ''POST'' data
 +
|}
 +
|-
 +
|current_customer_id
 +
|[[#integer|integer]]
 +
|Returns customer ID if customer is logged in, else None
 
|N/A
 
|N/A
 
|-
 
|-
|boxes.reviews.product
+
|customer
|dictionary
+
|[[#dictionary|dictionary]]
|Product and review data
+
|Contains information about the logged in customer, or null.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 624: Rad 702:
 
!Description
 
!Description
 
|-
 
|-
|product_name
+
|id
|string
+
|[[#integer|integer]]
|Name of product
+
|
 
|-
 
|-
|product_image
+
|email
|string
+
|[[#string|string]]
|Link to product image
+
|
 
|-
 
|-
|review_href
+
|personnummer
|string
+
|[[#string|string]]
|Link to full review
+
|
 
|-
 
|-
|review_rating
+
|first_name
|string
+
|[[#string|string]]
|Rating
+
|
 
|-
 
|-
|review_text
+
|last_name
|string
+
|[[#string|string]]
|Text of review
+
|
|}
 
|}
 
===Shopping cart===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.shopping_cart.list
+
|company
|list of dictionaries
+
|[[#string|string]]
|List of products in shopping cart
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|id
+
|telephone
|integer
+
|[[#string|string]]
|ID of product
+
|
 
|-
 
|-
|model
+
|mobile
|string
+
|[[#string|string]]
|Model number for product
+
|
 
|-
 
|-
|name
+
|country_id
|string
+
|[[#integer|integer]]
|Name of product
+
|
 
|-
 
|-
|image
+
|postcode
|string
+
|[[#string|string]]
|Link to image of product
+
|
 
|-
 
|-
|quantity
+
|city
|string
+
|[[#string|string]]
|Number of this product in shopping cart
+
|
 
|-
 
|-
|price
+
|street_address
|string
+
|[[#string|string]]
|Price per product before discounts represented as a string with currency symbol
+
|
 
|-
 
|-
|final_price
+
|test_customer
|string
+
|[[#boolean|boolean]]
|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
+
|custom
|string
+
|[[#list|list]] of [[#custom field|custom field]]
|Link to product's page
+
|Custom fields.
|-
 
|new
 
|boolean
 
|''True'' if product was just added to the shopping cart
 
 
|}
 
|}
 
|-
 
|-
|boxes.shopping_cart.total
+
|user_agent
|string
+
|[[#string|string]]
|Total value of contents of shopping cart represented as a string with currency symbol
+
|The client's user agent string.
 
|N/A
 
|N/A
|}
+
|-
 
+
|meta
===Random special offer===
+
|[[#dictionary|dictionary]]
Contains a random special offer.
+
|Header meta information for current page.
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.special_offers.product
+
|title
|dictionary
+
|[[#HTML|HTML]]
|''True'' if prices are displayed including VAT, else ''false''.
+
|Page title.
 +
|-
 +
|keywords
 +
|[[#string|string]]
 +
|Page meta keywords.
 +
|-
 +
|description
 +
|[[#HTML|HTML]]
 +
|Page meta description.
 +
|-
 +
|language
 +
|[[#string|string]]
 +
|Page language code.
 +
|-
 +
|generator
 +
|[[#string|string]]
 +
|Startabutik E-handel.
 +
|-
 +
|canonical
 +
|[[#URL|URL]]
 +
|Canonical URL for current page.  Not always available.
 +
|}
 +
|-
 +
|session
 +
|[[#dictionary|dictionary]]
 +
|Configurable session variables.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 729: Rad 807:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|market_id
|string
+
|[[#integer|integer]]
|Name of product
+
|ID of current market.
 +
|-
 +
|currency
 +
|[[#string|string]]
 +
|Code of selected currency.
 +
|-
 +
|country_id
 +
|[[#integer|integer]]
 +
|ID of selected country.
 +
|-
 +
|language
 +
|[[#string|string]]
 +
|Code of selected language.
 +
|-
 +
|language_id
 +
|[[#integer|integer]]
 +
|ID of selected language.
 
|-
 
|-
|href
+
|vat
|string
+
|[[#boolean|boolean]]
|Link to product page
+
|Display prices with or without VAT.
 
|-
 
|-
|image
+
|group_id
|string
+
|[[#integer|integer]]
|Link to product image
+
|ID of active customer group in session
 
|-
 
|-
|price
+
|group_name
|string
+
|[[#string|string]]
|Product standard price represented with currency symbol
+
|Name of active customer group in session
 
|-
 
|-
|special_price
+
| reference_code
|string
+
|[[#string|string]]
|Product price after discounts represented with currency symbol
+
|Either value of query parameter vc och http referrer
 +
|.
 
|}
 
|}
|}
+
|-
===VAT select box===
+
|settings
 +
|[[#dictionary|dictionary]]
 +
|Contains some of the settings defined in the administration
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|boxes.vat_select.display_with_vat
+
|ACCOUNT_COMPANY, ACCOUNT_DOB, ACCOUNT_GENDER, ACCOUNT_PERSONNUMMER, ACCOUNT_STATE, ACCOUNT_SUBURB
|boolean
+
|[[#boolean|boolean]]
|''True'' if prices are displayed including VAT, else ''false''.
+
|Account fields can be enabled and disabled
|N/A
 
 
|-
 
|-
|boxes.vat_select.with_href
+
|API_ID_FACEBOOK
|string
+
|[[#string|string]]
|URL to page where VAT display is set to ''true''.
+
|General APP id for Facebook
|N/A
 
 
|-
 
|-
|boxes.vat_select.without_href
+
|API_ID_GOOGLE_VERIFICATION
|string
+
|[[#string|string]]
|URL to page where VAT display is set to ''false''.
+
|Google verification
|N/A
 
|}
 
===Custom boxes===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|boxes.custom.boxes
+
|CHARSET
|dictionary of lists
+
|[[#string|string]]
|Dictionary of boxes, indexed by the box name.
+
|Charset of page.
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|type
+
|CREATE_ACCOUNT_LAYOUT
|integer
+
|[[#integer|integer]]
|Type of box.
+
|''Internal''
 
|-
 
|-
|class
+
|DOWNLOAD_ENABLED
|string
+
|[[#boolean|boolean]]
|CSS classes
+
|Is the download module enabled
|}
+
|-
If type is 0:
+
|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
{| class="wikitable"
+
|[[#integer|integer]]
!Key
+
|Used in form validation
!Type
+
|-
!Description
+
|ENTRY_PASSWORD_IN_REGISTRATION
 +
|[[#boolean|boolean]]
 +
|Is the user allowed to specify a password when registering
 
|-
 
|-
|title
+
|FORMS_USE_CAPTCHA
|string
+
|[[#boolean|boolean]]
|Box title.
+
|Is captcha used for forms
 
|-
 
|-
|product
+
|FACEBOOK_PROFILE_URL
|product
+
|[[#string|string]]
|Product displayed.
+
|URL in format http://url.se/subfolder/
|}
 
If type is 1:
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|text
+
|GOOGLEPLUS_PROFILE_URL
|HTML
+
|[[#string|string]]
|Box contents.
+
|URL in format http://url.se/subfolder/
|}
 
If type is 2:
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|image
+
|HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT
|URL
+
|[[#integer|integer]]
|Box image.
+
|Width and height of heading images
|}
 
|}
 
 
 
==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
+
|INVOICE_ORG_NUMBER
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|
|N/A
 
 
|-
 
|-
|containboxes.create_account.text
+
|INVOICE_STORE_ADDRESS
|HTML
+
|[[#string|string]]
|Box text
+
|
|N/A
 
 
|-
 
|-
|containboxes.create_account.generated_password
+
|INVOICE_STORE_POST_ADDRESS
|string
+
|[[#string|string]]
|A randomly generated password
+
|
|N/A
 
 
|-
 
|-
|containboxes.create_account.customers_personnummer
+
|INVOICE_TELEPHONE
|string
+
|[[#string|string]]
|The customer's personnummer
+
|
|N/A
 
 
|-
 
|-
|containboxes.create_account.sms_avisering
+
|MAX_ADDRESS_BOOK_ENTRIES
|boolean
+
|[[#integer|integer]]
|N/A
+
|Maximum entries in the address book
|N/A
 
 
|-
 
|-
|containboxes.create_account.countries
+
|PREV_NEXT_BAR_LOCATION
|association list
+
|[[#integer|integer]]
|A list of country names mapped to their indices.
+
|''Internal''
|Array of string to integer mappings.
 
|}
 
===Login box (containboxes/login_box.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|containboxes.login_box.form_action
+
|SMALL_IMAGE_WIDTH
|URL
+
|[[#integer|integer]]
|A link to the page which handles the form
+
|Width of small thumbnails in pixels
|N/A
+
|-
|}
+
|SMALL_IMAGE_HEIGHT
===Password forgotten box (containboxes/password_forgotten_box.html)===
+
|[[#integer|integer]]
 +
|Height of small thumbnails in pixels
 +
|-
 +
|STATISTICS_GOOGLE_ANALYTICS
 +
|[[#string|string]]
 +
|Google analytics tracking code, if specified
 +
|-
 +
|SHOP_HEADER_TEXT
 +
|[[#string|string]]
 +
|Alt text for logo
 +
|-
 +
|SHOP_FAVICON
 +
|[[#string|string]]
 +
|Shop favicon in /images/
 +
|-
 +
|SHOP_LOGO
 +
|[[#string|string]]
 +
|Shop logo in /images/
 +
|-
 +
|SHOP_LOGO_280_80
 +
|[[#string|string]]
 +
|Shop logo for invoices in /images/
 +
|-
 +
|SHOP_SHARE_IMAGE
 +
|[[#string|string]]
 +
|Shop social media share image in /images/
 +
|-
 +
|STANDARD_SORT_ORDER
 +
|[[#string|string]]
 +
|Column that the product should be sorted on
 +
|-
 +
|STOCK_NOTIFY_ON_RESTOCK_LIMIT
 +
|[[#int|int]]
 +
|Gränsvärde för bevakning av produkters lagersaldo
 +
|-
 +
|STORE_NAME
 +
|[[#string|string]]
 +
|
 +
|-
 +
|POPUP_IMAGE_WIDTH, POPUP_IMAGE_HEIGHT
 +
|[[#integer|integer]]
 +
|
 +
|-
 +
|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
 
 
|-
 
|-
|containboxes.password_forgotten_box.form_action
+
|DISPLAY_LOGGED_PRICES
|URL
+
|[[#boolean|boolean]]
|A link to the page which handles the form
+
|Dictates whether logged prices should be shown in the store
|N/A
 
 
|}
 
|}
 
+
|-
==Modules==
+
|TWEAKWISE
 
+
|[[#list|list]]
===associated_products.html===
+
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|modules.associated_products.products
+
|ENABLED
|list of products
+
|[[#boolean|boolean]]
|Associated products.
+
|If Tweakwise is enabled. Depends on several factors.
 +
|}
 +
|}
 +
|-
 +
|shoppingcart_amount
 +
|[[#string|string]]
 +
|Amount of products in shopping cart
 +
|N/A
 +
|-
 +
|shoppingcart_total
 +
|[[#string|string]]
 +
|Total sum of the content in shopping cart
 
|N/A
 
|N/A
 
|}
 
|}
  
===downloads.php===
+
==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 918: Rad 1 037:
 
!Format
 
!Format
 
|-
 
|-
|downloads.downloads
+
|boxes.categories.tree
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Available downloads
+
|Contains a tree of displayed categories in menu
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 927: Rad 1 046:
 
!Description
 
!Description
 
|-
 
|-
|href
+
|id
|URL
+
|[[#integer|integer]]
|Download link
+
|Id of category
 
|-
 
|-
|expiry
+
|name
|string
+
|[[#string|string]]
|Download expiry date
+
|Name of category in current language
 
|-
 
|-
|valid
+
|image
|boolean
+
|[[#string|string]]
|Is the download valid?
+
|Path to category image if such exists
 
|-
 
|-
|download_count
+
|icon
|integer
+
|[[#string|string]]
|Download count
+
|Path to category icon if such exists
 
|-
 
|-
|product_name
+
|href
|string
+
|[[#string|string]]
|Product name
+
|Link to category's product listing page
|}
 
 
|-
 
|-
|downloads.account_history_info
+
|child_count
|boolean
+
|[[#integer|integer]]
|Is this module included from the order info page?
+
|Number of open child categories
|N/A
+
|-
 +
|children
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|List of visible child categories. See boxes.categories.tree for format
 +
|-
 +
|description
 +
|[[#string|string]]
 +
|
 
|-
 
|-
|downloads.account_href
+
|open
|URL
+
|[[#boolean|boolean]]
|A link to the account page.
+
|Returns true if the category (or one of its children) is the currently selected one
|N/A
+
|-
 +
|selected
 +
|[[#boolean|boolean]]
 +
|Returns true if the category is the currently selected one
 +
|}
 
|}
 
|}
  
===product_attributes.html===
+
===Category full menu===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 966: Rad 1 095:
 
!Format
 
!Format
 
|-
 
|-
|modules.product_attributes.attributes
+
|boxes.categories_full.tree
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Product attributes.
+
|Contains a full tree of all available categories in menu
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 974: Rad 1 103:
 
!Type
 
!Type
 
!Description
 
!Description
|-
 
|value
 
|string
 
|Attribute value.
 
 
|-
 
|-
 
|id
 
|id
|integer
+
|[[#integer|integer]]
|Attribute index.
+
|Id of category
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Attribute name.
+
|Name of category in current language
 +
|-
 +
|image
 +
|[[#string|string]]
 +
|Path to category image if such exists
 
|-
 
|-
|type
+
|icon
|integer
+
|[[#string|string]]
|Attribute type.
+
|Path to category icon if such exists
 
|-
 
|-
|selected
+
|href
|integer
+
|[[#string|string]]
|Selected attribute.
+
|Link to category's product listing page
 
|-
 
|-
|options
+
|child_count
|list of index to value mappings
+
|[[#integer|integer]]
|Attribute options.
+
|Number of open child categories
|}
+
|-
|}
+
|children
 
+
|[[#list|list]] of [[#dictionary|dictionaries]]
===product_specifications.html===
+
|List of visible child categories. See boxes.categories.tree for format
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|modules.product_specifications.specifications
+
|description
|list of dictionaries
+
|[[#string|string]]
|Product specifications.
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|name
+
|open
|string
+
|[[#boolean|boolean]]
|Specification name.
+
|Returns true if the category (or one of its children) is the currently selected one
 
|-
 
|-
|value
+
|selected
|string
+
|[[#boolean|boolean]]
|Specification value.
+
|Returns true if the category is the currently selected one
 
|}
 
|}
 
|}
 
|}
  
===products_in_package.html===
+
===Best selling products===
 +
Lists the most sold products.
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|modules.products_in_package.products
+
|boxes.bestsellers.list
|list of products
+
|[[#list|list]] of [[#product|product]]
|Products in product package.
+
|The most sold products, the most sold first.
|N/A
 
 
|}
 
|}
  
===products_reviews.html===
+
===Manufacturer select===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 047: Rad 1 165:
 
!Format
 
!Format
 
|-
 
|-
|modules.products_reviews.form_action
+
|boxes.manufacturers.list
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Form handler.
+
|Lists all available manufacturers
|N/A
 
|-
 
|modules.products_reviews.error
 
|string
 
|Error message.
 
|N/A
 
|-
 
|modules.products_reviews.customer
 
|dictionary
 
|Customer information.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 066: Rad 1 174:
 
!Description
 
!Description
 
|-
 
|-
|firstname
+
|id
|string
+
|[[#integer|integer]]
|First name.
+
|Manufacturer ID.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Name of manufacturer
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to manufacturer page
 +
|-
 +
|link
 +
|[[#URL|URL]]
 +
|Full link to manufacturer page
 +
|
 
|-
 
|-
|lastname
+
|selected
|string
+
|[[#boolean|boolean]]
|Last name.
+
|True if the manufacturer_id GET variable is equal to the ID of this manufacturer.
 +
|}
 
|}
 
|}
 +
 +
===Country selection===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|modules.products_reviews.reviews
+
|boxes.countries.list
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Product reviews.
+
|Lists all available countries
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 084: Rad 1 213:
 
!Description
 
!Description
 
|-
 
|-
|rating
+
|id
|integer
+
|[[#integer|integer]]
|Review rating, 1-5.
+
|Country ID.
 
|-
 
|-
|author
+
|name
|string
+
|[[#string|string]]
|Review author.
+
|Name of country.
 
|-
 
|-
|date
+
|href
|string
+
|[[#string|string]]
|Review date.
+
|Link to current page with country added as a request parameter.
 
|-
 
|-
|text
+
|image
|HTML
+
|[[#URL|URL]]
|Review text.
+
|A flag for the country.
 
|}
 
|}
 
|}
 
|}
  
===products_variants.html===
+
===Market selection===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 109: Rad 1 238:
 
!Format
 
!Format
 
|-
 
|-
|modules.products_variants.category
+
|boxes.markets.list
|integer
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Category index.
+
|Lists all available markets
|N/A
 
|-
 
|modules.products_variants.variants
 
|list of dictionaries
 
|Variants.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 123: Rad 1 247:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|id
|string
+
|[[#integer|integer]]
|Variant name
+
|Market ID.
 +
|-
 +
|href
 +
|[[#URL|URL]]
 +
|Link to current page with market_id added as a request parameter.
 +
|-
 +
|standard_country_id
 +
|[[#integer|integer]]
 +
|The standard country selection for the market.
 +
|-
 +
|standard_country_code
 +
|[[#string|string]]
 +
|The code for the standard country selection for the market.
 +
|-
 +
|countries
 +
|[[#array|array]]
 +
|An array containing all the countries connected to the market
 
|-
 
|-
|selected
+
|language
|integer
+
|[[#string|string]]
|Selected variant.
+
|Code of language selected for market.
 
|-
 
|-
|options
+
|language_id
|list of integer to value mappings
+
|[[#integer|integer]]
|Variants.
+
|Id of language selected for market.
|}
 
 
|-
 
|-
|modules.products_variants.products
+
|locale
|list of dictionaries
+
|[[#string|string]]
|Variants.
 
 
|
 
|
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|seo_link
+
|image
|URL
+
|[[#URL|URL]]
|Variant URL.
+
|An image for the market.
 +
|-
 +
|domain_name
 +
|[[#string|string]]
 +
|Link to current page at the market domain.
 
|-
 
|-
|name
+
|domain_name_href
|string
+
|[[#URL|URL]]
|Variant name.
+
|
 +
|-
 +
|url_prefix
 +
|[[#string|string]]
 +
|
 +
|-
 +
|currency_code
 +
|[[#string|string]]
 +
|
 +
|-
 +
|currency_id
 +
|[[#integer|integer]]
 +
|
 +
|-
 +
|customer_group_id
 +
|[[#integer|integer]]
 +
|
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Name of market.
 +
|-
 +
|description
 +
|[[#string|string]]
 +
|
 +
|-
 +
|share_customers
 +
|[[#bool|bool]]
 +
|
 
|}
 
|}
 
|}
 
|}
  
===tell_a_friend.html===
+
===Search box===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 162: Rad 1 328:
 
!Format
 
!Format
 
|-
 
|-
|modules.tell_a_friend.form_action
+
|boxes.search.advanced_href
|URL
+
|[[#string|string]]
|Form handler.
+
|URL to advanced search page
 +
|N/A
 +
|-
 +
|boxes.search.advanced_result_href
 +
|[[#string|string]]
 +
|Action URL for search form
 
|N/A
 
|N/A
 
|}
 
|}
 
+
===Information page list===
==Page specific==
 
Most variables are not available on a global scale. They are page specific variables. They are always prefixed with the same name as the included template. So ''contact.html'' variables are prefixed with ''contact''.
 
 
 
===Account edit page (account_edit.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 178: Rad 1 345:
 
!Format
 
!Format
 
|-
 
|-
|account_edit.form_action
+
|boxes.information_pages.list
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|A link to the page which handles the form
+
|Lists all active information pages
|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"
 
!Key
 
!Key
Rad 1 197: Rad 1 354:
 
!Description
 
!Description
 
|-
 
|-
|firstname
+
|id
|string
+
|[[#integer|integer]]
|Account first name
+
|ID.
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Name of information page
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to information page
 
|-
 
|-
|lastname
+
|active
|string
+
|[[#boolean|boolean]]
|Account last name
+
|Is user currently on this page?
 
|-
 
|-
|personnummer
+
|target
|string
+
|[[#boolean|boolean]]
|Account personnummer
+
|True if information page expects the attribute target="_blank"
 
|-
 
|-
|dob
+
|parent_id
|string
+
|[[#integer|integer]]
|Account date of birth
+
|Parent page ID
 
|-
 
|-
|email_address
+
|date
|string
+
|[[#date|date]]
|Account email address
+
|Last updated date
 
|-
 
|-
|telephone
+
|publish_date_from
|string
+
|[[#date|date]]
|Account telephone number
+
|Publish date start
 
|-
 
|-
|mobile
+
|publish_date_to
|string
+
|[[#date|date]]
|Account mobile telephone number
+
|Publish date end
 
|-
 
|-
|fax
+
|short_description
|string
+
|[[#string|string]]
|Account fax number
+
|Short page description
 
|-
 
|-
|gender
+
|extra1
|string
+
|[[#string|string]]
|Account gender ('m' or 'f')
+
|Custom page field
|}
+
|-
|}
+
|extra2
 
+
|[[#string|string]]
===Account history page (account_history.html)===
+
|Custom page field
 +
|-
 +
|extra3
 +
|[[#string|string]]
 +
|Custom page field
 +
|-
 +
|extra4
 +
|[[#string|string]]
 +
|Custom page field (language dependent)
 +
|-
 +
|extra5
 +
|[[#string|string]]
 +
|Custom page field (language dependent)
 +
|-
 +
|images
 +
|[[#list|list]] of [[#URL|URLs]]
 +
|Images set for this page
 +
|-
 +
|categories
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Categories set for this page (only shown if cright 141 is set).
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|account_history.account_href
+
|id||[[#integer|integer]]||Category index.
|URL
+
|-
|A link back to the account page
+
|name||[[#string|string]]||Category name.
|N/A
+
|-
 +
|href||[[#URL|URL]]||Category link.
 
|-
 
|-
|account_history.pagination
+
|seo_link||[[#URL|URL]]||Category relative link.
|pagination
+
|}
|Pagination info
 
|N/A
 
 
|-
 
|-
|account_history.page_href_format
+
|tags
|URL
+
|[[#list|list]] of [[#tag|tags]]
|Pagination link format
+
|Tags set for this page (only shown if cright 141 is set).
|N/A
+
|}
 
|-
 
|-
|account_history.order_history
+
|boxes.information_pages.tree
|list of dictionaries
+
|[[#dictionary|dictionaries]]
|Order history
+
|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 266: Rad 1 450:
 
!Description
 
!Description
 
|-
 
|-
|id
+
|open
|integer
+
|[[#boolean|boolean]]
|Order ID
+
|True if one of the children is active or open.
 
|-
 
|-
|status
+
|children
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Order status
+
|A list of child galleries, each with the same format as this entry.
|-
+
|}
|date
+
|}
|string
+
 
|Order date
+
===Language list===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|type
+
|boxes.languages.list
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Order type
+
|Lists all languages
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Order delivery name
+
|Language name
 
|-
 
|-
|product_count
+
|href
|integer
+
|[[#string|string]]
|Product count
+
|Link to page that sets language to this one
 
|-
 
|-
|total
+
|image
|string
+
|[[#string|string]]
|Order total
+
|Image (flag) for language if available
|-
 
|href
 
|URL
 
|A link to the description of the order
 
 
|-
 
|-
 +
|code
 +
|[[#string|string]]
 +
|Language two-letter code
 
|}
 
|}
 
|}
 
|}
  
===Order info page (account_history_info.html)===
+
===Login box===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 308: Rad 1 501:
 
!Format
 
!Format
 
|-
 
|-
|account_history_info.back_href
+
|boxes.login.form_href
|URL
+
|[[#string|string]]
|Link back to the account order history
+
|Action link for login form
 
|N/A
 
|N/A
 
|-
 
|-
|account_history_info.order
+
|boxes.login.password_forgotten_href
|dictionary
+
|[[#string|string]]
|Order info
+
|Link to retrieve forgotten password page
|
+
|N/A
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|id_formatted
+
|boxes.login.account_history_href
|string
+
|[[#string|string]]
|Order ID
+
|Link to current customer's account history page. Contains orders and such
 +
|N/A
 
|-
 
|-
|status
+
|boxes.login.account_href
|string
+
|[[#string|string]]
|Order status
+
|Link to current customer's account page
 +
|N/A
 
|-
 
|-
|date
+
|boxes.login.account_password_href
|string
+
|[[#string|string]]
|Order date
+
|''Unknown''
 +
|N/A
 
|-
 
|-
|total
+
|boxes.login.logoff_href
|string
+
|[[#string|string]]
|Order total
+
|Link to log off current customer
 +
|N/A
 
|-
 
|-
|shipping_method
+
|boxes.login.customer_first_name
|string
+
|[[#string|string]]
|Order shipping method
+
|Current customer's first name
 +
|N/A
 
|-
 
|-
|payment_method
+
|boxes.login.customer_last_name
|string
+
|[[#string|string]]
|Order payment method
+
|Current customer's last name
 +
|N/A
 +
|}
 +
===New products list===
 +
Lists the most recently added products.
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 
|-
 
|-
|tax_group_count
+
|boxes.products_new.list
|integer
+
|[[#list|list]] of [[#product|product]]
|Number of different tax groups
+
|The most recently added products, the most recent first.
 +
|}
 +
===News list===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|billing_address
+
|boxes.news.list
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Order billing address
+
|Lists recent news. Limit set in administration
|-
 
|delivery_address
 
|string
 
|Order delivery address
 
|-
 
|delivery
 
|boolean
 
 
|
 
|
|-
 
|products
 
|list of dictionaries
 
|Products in order
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 1 370: Rad 1 568:
 
!Description
 
!Description
 
|-
 
|-
|qty
+
|image
|integer
+
|[[#URL|URL]]
|Product quantity
+
|Assigned image
|-
 
|id
 
|integer
 
|Product ID
 
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|Product name
+
|News name
 
|-
 
|-
|model
+
|href
|string
+
|[[#string|string]]
|Product model
+
|Link to news page
 
|-
 
|-
|tax
+
|date
|decimal
+
|[[#date|date]]
|Product tax
+
|Date posted.
|-
 
|price
 
|decimal
 
|Product price
 
|-
 
|final_price
 
|decimal
 
|Final product price
 
 
|-
 
|-
 +
|summary
 +
|[[#string|string]]
 +
|News summary
 +
|}
 
|}
 
|}
|-
+
 
|totals
+
===Hierarchical news list===
|list of dictionaries
 
|Order parts of total
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 +
|-
 +
|boxes.news_archive.year_min
 +
|[[#integer|integer]]
 +
|Year with first news post.
 +
|N/A
 
|-
 
|-
|title
+
|boxes.news_archive.year_max
|string
+
|[[#integer|integer]]
|Total part label
+
|Year with last news post.
 +
|N/A
 +
|-
 +
|boxes.news_archive.month_min
 +
|[[#integer|integer]]
 +
|Month of first news post.
 +
|N/A
 
|-
 
|-
|text
+
|boxes.news_archive.month_max
|HTML
+
|[[#integer|integer]]
|Total part value
+
|Month of last news post.
|}
+
|N/A
 
|-
 
|-
|statuses
+
|boxes.news_archive.news
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Order statuses
+
|News grouped first by year and then by month, the final array keys have this format:
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 1 425: Rad 1 626:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|image
|string
+
|[[#URL|URL]]
|Status name
+
|Assigned image
 
|-
 
|-
|date
+
|title
|string
+
|[[#string|string]]
|Status date
+
|News name
 
|-
 
|-
|comments
+
|href
|string
+
|[[#string|string]]
|Status comments
+
|Link to news page
|}
 
|-
 
|events
 
|list of dictionaries
 
|Order delivery events
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
 
|date
 
|date
|string
+
|[[#date|date]]
|Event date
+
|Date posted.
 
|-
 
|-
|location
+
|short
|string
+
|[[#string|string]]
|Event location
+
|News summary
|-
 
|description
 
|string
 
|Event description
 
|}
 
 
|}
 
|}
 
|}
 
|}
  
===Account page (account.html)===
+
===Review===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 468: Rad 1 655:
 
!Format
 
!Format
 
|-
 
|-
|account.account_history_href
+
|boxes.reviews.write_review_href
|URL
+
|[[#string|string]]
|A link to the account history page
+
|Link to write review page. Only set if customer is viewing a product page
 
|N/A
 
|N/A
 
|-
 
|-
|account.account_edit_href
+
|boxes.reviews.product
|URL
+
|[[#dictionary|dictionary]]
|A link to the edit account page
+
|Product and review data
|N/A
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|account.address_book_href
+
|product_name
|URL
+
|[[#string|string]]
|A link to the address book page
+
|Name of product
|N/A
 
 
|-
 
|-
|account.account_password_href
+
|product_image
|URL
+
|[[#string|string]]
|A link to the password change page
+
|Link to product image
|N/A
 
 
|-
 
|-
|account.logoff_href
+
|review_href
|URL
+
|[[#string|string]]
|A link to the logoff page
+
|Link to full review
|N/A
 
 
|-
 
|-
|account.account_newsletters_href
+
|review_rating
|URL
+
|[[#string|string]]
|A link to the newsletters page
+
|Rating
|N/A
 
 
|-
 
|-
|account.account_notifications_href
+
|review_text
|URL
+
|[[#string|string]]
|A link to the notifications page
+
|Text of review
|N/A
+
|}
|-
+
|}
|account.order_history_enabled
+
===Shopping cart===
|boolean
 
|Is the order history enabled?
 
|N/A
 
|-
 
|account.order_history
 
|list of dictionaries
 
|Order history
 
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|href
+
|boxes.shopping_cart.list
|URL
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|A link to the order description page
+
|List of products in shopping cart
|-
+
|
|date
+
{| class="wikitable"
|string
+
!Key
|The date the order was placed
+
!Type
 +
!Description
 
|-
 
|-
 
|id
 
|id
|integer
+
|[[#integer|integer]]
|Order ID
+
|ID of product
 
|-
 
|-
|country
+
|data
|string
+
|[[#dictionary|dictionary]]
|Order delivery name and country
+
|Custom data stored on the shopping cart entry.
 
|-
 
|-
|status
+
|model
|string
+
|[[#string|string]]
|Order status
+
|Model number for product
 
|-
 
|-
|total
+
|name
|HTML
+
|[[#string|string]]
|Order total
+
|Name of product
|}
 
|}
 
 
 
===Account newsletter subscription page (account_newsletters.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|account_newsletters.form_action
+
|image
|URL
+
|[[#string|string]]
|A link to the page which handles the form
+
|Link to image of product
|N/A
+
|-
 +
|quantity
 +
|[[#string|string]]
 +
|Number of this product in shopping cart
 +
|-
 +
|unit
 +
|
 +
|
 +
|-
 +
|type
 +
|[[#string|string]]
 +
|
 +
|-
 +
|price
 +
|[[#string|string]]
 +
|Price per product before discounts represented as a string with currency symbol
 +
|-
 +
|final_price
 +
|[[#string|string]]
 +
|Price per product after discounts represented as a string with currency symbol
 +
|-
 +
|total_price
 +
|[[#string|string]]
 +
|Total price for all products of this kind before discounts represented as a string with currency symbol
 +
|-
 +
|total_final_price
 +
|[[#string|string]]
 +
|Total price for all products of this kind after discounts represented as a string with currency symbol
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to product's page
 
|-
 
|-
|account_newsletters.back_href
+
|new
|URL
+
|[[#boolean|boolean]]
|Link back to the account page
+
|''True'' if product was just added to the shopping cart
 +
|-
 +
|discounts
 +
|[[#list|list]] of [[#discount|discounts]]
 +
|
 +
|}
 +
|-
 +
|boxes.shopping_cart.total
 +
|[[#string|string]]
 +
|Total value of contents of shopping cart represented as a string with currency symbol
 
|N/A
 
|N/A
 
|-
 
|-
|account_newsletters.subscribed
+
|boxes.shopping_cart.total_items
|boolean
+
|[[#integer|integer]]
|Is the user subscribed to the newsletter
+
|Sum of product quantities.
 
|N/A
 
|N/A
 
|}
 
|}
  
===Account notifications page (account_notifications.html)===
+
===Random special offer===
 +
Contains a random special offer.
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 573: Rad 1 786:
 
!Format
 
!Format
 
|-
 
|-
|account_notifications.form_action
+
|boxes.special_offers.product
|URL
+
|[[#dictionary|dictionary]]
|A link to the page which handles the form
+
|''True'' if prices are displayed including VAT, else ''false''.
|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
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 592: Rad 1 795:
 
!Description
 
!Description
 
|-
 
|-
|id
+
|name
|integer
+
|[[#string|string]]
|Product ID
+
|Name of product
 +
|-
 +
|href
 +
|[[#string|string]]
 +
|Link to product page
 +
|-
 +
|image
 +
|[[#string|string]]
 +
|Link to product image
 
|-
 
|-
|name
+
|price
|string
+
|[[#string|string]]
|Product name
+
|Product standard price represented with currency symbol
 
|-
 
|-
|counter
+
|special_price
|integer
+
|[[#string|string]]
|List index
+
|Product price after discounts represented with currency symbol
 
|}
 
|}
|-
 
|account_notifications.global_product_notifications
 
|boolean
 
|Has the user enabled the global product notification setting
 
|N/A
 
 
|}
 
|}
 
+
===VAT select box===
===Change account password page (account_password.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 618: Rad 1 823:
 
!Format
 
!Format
 
|-
 
|-
|account_password.form_action
+
|boxes.vat_select.display_with_vat
|URL
+
|[[#boolean|boolean]]
|A link to the page which handles the form
+
|''True'' if prices are displayed including VAT, else ''false''.
 +
|N/A
 +
|-
 +
|boxes.vat_select.with_href
 +
|[[#string|string]]
 +
|URL to page where VAT display is set to ''true''.
 
|N/A
 
|N/A
 
|-
 
|-
|account_password.back_href
+
|boxes.vat_select.without_href
|URL
+
|[[#string|string]]
|Link back to the account page
+
|URL to page where VAT display is set to ''false''.
 
|N/A
 
|N/A
 
|}
 
|}
 
+
===Custom boxes===
===New account password page (account_password_new.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 636: Rad 1 845:
 
!Format
 
!Format
 
|-
 
|-
|account_password_new.form_action
+
|boxes.custom.boxes
|URL
+
|[[#dictionary|dictionary]] of lists
|A link to the page which handles the form
+
|Dictionary of boxes, indexed by the box name.
|N/A
+
|
|-
 
|account_password_new.back_href
 
|URL
 
|Link back to the account page
 
|N/A
 
|-
 
|account_password_new.password_provided
 
|boolean
 
|Is a password provided by the user, or the default password
 
|N/A
 
|}
 
 
 
===Address book page (address_book.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|address_book.back_href
+
|type
|URL
+
|[[#integer|integer]]
|A link back to the account page
+
|Type of box.
|N/A
 
 
|-
 
|-
|address_book.add_href
+
|class
|URL
+
|[[#string|string]]
|A link to a form which adds a new entry to the address book
+
|CSS classes
|N/A
+
|-
 +
|extra_field_1
 +
|[[#string|string]]
 +
|
 
|-
 
|-
|address_book.entries_count
+
|extra_field_2
|integer
+
|[[#string|string]]
|Number of entries
+
|
|N/A
 
 
|-
 
|-
|address_book.address_label
+
|extra_field_3
|HTML
+
|[[#string|string]]
|Address label
+
|
|N/A
 
 
|-
 
|-
|address_book.addresses
+
|sort_order
|list of dictionaries
+
|[[#integer|integer]]
|The addresses in the address book
+
|Sort order.
 
|
 
|
 +
|}
 +
If type is 0:
 
{| class="wikitable"
 
{| class="wikitable"
 
!Key
 
!Key
Rad 1 688: Rad 1 885:
 
!Description
 
!Description
 
|-
 
|-
|default
+
|title
|boolean
+
|[[#string|string]]
|Is this the default address book entry
+
|Box title.
 
|-
 
|-
|edit_href
+
|product
|URL
+
|product
|A link to edit the entry
+
|Product displayed.
 +
|}
 +
If type is 1:
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|delete_href
+
|text
|URL
+
|[[#HTML|HTML]]
|A link to delete the entry
+
|Box contents.
|-
+
|}
|name
+
If type is 2:
|string
+
{| class="wikitable"
|Associated name
+
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|address
+
|image
|HTML
+
|[[#URL|URL]]
|The address
+
|Box image.
 
|}
 
|}
 
|}
 
|}
  
===Address book modification page (address_book_process.html)===
+
==Modules==
 +
 
 +
===last_viewed_products===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|address_book_process.editing
+
|modules.last_viewed_products.register
|boolean
+
|[[#HTML|HTML]]
|Is the page in the editing mode?
+
|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.
|N/A
 
 
|-
 
|-
|address_book_process.deleting
+
|modules.last_viewed_products.products
|boolean
+
|[[#list|list]] of [[#product|products]]
|Is the page in the deletion mode?
+
|The products the customer last viewed, the most recently viewed product first, the current product is excluded. Contains up to 30 products.
|N/A
+
|}
 +
 
 +
===product_parent===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|address_book_process.edit_form_action
+
|modules.product_parent.name
|URL
+
|[[#string|string]]
|A link to a page which handles the editing form
+
|Parent product name.
 
|N/A
 
|N/A
 
|-
 
|-
|address_book_process.delete_form_action
+
|modules.product_parent.description
|URL
+
|[[#string|string]]
|A link to a page which handles the deletion form
+
|Parent product description.
 
|N/A
 
|N/A
 
|-
 
|-
|address_book_process.address_label
+
|modules.product_parent.image
|HTML
+
|[[#string|string]]
|The address
+
|Parent product image.
 
|N/A
 
|N/A
 
|-
 
|-
|address_book_process.back_href
+
|modules.product_parent.images
|URL
+
|[[#string|string]]
|A back link
+
|Parent product additional images.
 
|N/A
 
|N/A
 +
|}
 +
 +
===associated_products.html===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|address_book_process.address_book_href
+
|modules.associated_products.products
|URL
+
|[[#list|list]] of products
|A link to the address_book
+
|Associated products.
|N/A
 
|-
 
|address_book_process.process
 
|boolean
 
|Is the page in the processing mode?
 
 
|N/A
 
|N/A
 +
|}
 +
 +
===random_products.html===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|address_book_process.default_address
+
|modules.random_products.products
|boolean
+
|[[#list|list]] of products
|Is this the default address?
+
|Random products.
 
|N/A
 
|N/A
 +
|}
 +
 +
===product_attributes.html===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|address_book_process.entry
+
|modules.product_attributes.attributes
|dictionary
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|The fields in the current entry
+
|Product attributes.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 771: Rad 2 002:
 
!Description
 
!Description
 
|-
 
|-
|male
+
|value
|boolean
+
|[[#string|string]]
|Male gender?
+
|Attribute value.
 
|-
 
|-
|firstname
+
|id
|string
+
|[[#integer|integer]]
|First name
+
|Attribute index.
 
|-
 
|-
|lastname
+
|name
|string
+
|[[#string|string]]
|Last name
+
|Attribute name.
 
|-
 
|-
|company
+
|type
|string
+
|[[#integer|integer]]
|Company
+
|Attribute type.
 
|-
 
|-
|street_address
+
|selected
|string
+
|[[#integer|integer]]
|Street address
+
|Selected attribute.
 
|-
 
|-
|suburb
+
|options
|string
+
|[[#list|list]] of index to value mappings
|Suburb
+
|Attribute options.
 +
|}
 +
|}
 +
 
 +
===product_specifications.html===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|postcode
+
|modules.product_specifications.grouped
|string
+
|[[#list|list]] of categories
|Post code
+
|Specifications with multiple values per specification grouped into a values variable.
 +
|
 
|-
 
|-
|city
+
|modules.product_specifications.hierarchy
|string
+
|[[#list|list]] of categories
|City
+
|The hierarchy of specifications used for this product.
 +
|
 
|-
 
|-
|country_list
+
|modules.product_specifications.specifications
|HTML
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|A drop-down list with countries
+
|Product specifications.
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|state_has_zones
+
|name
|boolean
+
|[[#string|string]]
|Does the state have zones?
+
|Specification name.
 
|-
 
|-
|state
+
|value
|string
+
|[[#string|string]]
|State
+
|Specification value.
|-
 
|states
 
|association list
 
|A list of zones in the state
 
 
|}
 
|}
 
|}
 
|}
  
===Advanced search page (advanced_search.html)===
+
===products_in_package.html===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 828: Rad 2 071:
 
!Format
 
!Format
 
|-
 
|-
|advanced_search.form_action
+
|modules.products_in_package.products
|string
+
|[[#list|list]] of products
|A link to the page which handles the form.
+
|Products in product package.
 
|N/A
 
|N/A
|-
 
|advanced_search.categories
 
|association list
 
|A list of category names mapped to their indices.
 
|Array of string to integer mappings.
 
|-
 
|advanced_search.manufacturers
 
|association list
 
|A list of manufacturer names mapped to their indices.
 
|Array of string to integer mappings.
 
 
|}
 
|}
  
===Search results page (advanced_search_results.html)===
+
===products_reviews.html===
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                       !! Type             !! Description !! Format
+
!Variable name
|-
+
!Type
| advanced_search_results.results    || list of products || The search results. ||N/A
+
!Description
 +
!Format
 
|-
 
|-
| advanced_search_results.num_results || integer          || The number of search results. || N/A
+
|modules.products_reviews.captcha_href
 +
|[[#URL|URL]]
 +
|Link to the captcha image.
 +
|N/A
 +
|-
 +
|modules.products_reviews.error
 +
|[[#string|string]]
 +
|Error message.
 +
|N/A
 
|-
 
|-
| advanced_search_results.back_href  || URL              || A link for returning to the search page. || N/A
+
|modules.products_reviews.customer
|}
+
|[[#dictionary|dictionary]]
 
+
|Customer information.
===Campaign page (campaign.html)===
+
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                  !! Type             !! Description !! Format
+
!Key
 +
!Type
 +
!Description
 
|-
 
|-
| campaign.campaign_name        || HTML            || Title of campaign. ||N/A
+
|firstname
 +
|[[#string|string]]
 +
|First name.
 
|-
 
|-
| campaign.campaign_description || HTML            || Description of campaign. ||N/A
+
|lastname
|-
+
|[[#string|string]]
| campaign.campaign_image      || URL              || Selected campaign image. ||N/A
+
|Last name.
|-
 
| campaign.products            || list of products || Products included in campaign. ||N/A
 
 
|}
 
|}
 
===Product list (categories_listing.html)===
 
{| class="wikitable"
 
!Variable name                            !! Type                !! Description !! Format
 
 
|-
 
|-
| categories_listing.header                || dictionary           || Attributes for the top of the page. It is either a manufacturer or a category ||
+
|modules.products_reviews.reviews
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Product reviews.
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
! Key !! Type !! Description
+
!Key
 +
!Type
 +
!Description
 
|-
 
|-
| name  || string || Name of category/manufacturer
+
|rating
 +
|[[#integer|integer]]
 +
|Review rating, 1-5.
 
|-
 
|-
| image || string || Image URL for category/manufacturer
+
|author
 +
|[[#string|string]]
 +
|Review author.
 
|-
 
|-
| text || HTML   || Description of category/manufacturer
+
|date
 +
|[[#string|string]]
 +
|Review date.
 +
|-
 +
|text
 +
|[[#HTML|HTML]]
 +
|Review text.
 
|}
 
|}
|-
 
| categories_listing.header                || dictionary          || Page header attributes: image, description and title ||
 
|-
 
| 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.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
 
 
|}
 
|}
  
===Checkout success (checkout_success.html)===
+
===products_variants.html===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 921: Rad 2 146:
 
!Format
 
!Format
 
|-
 
|-
|checkout_success.update_action
+
|modules.products_variants.category
|URL
+
|[[#integer|integer]]
|A link to the page which handles the form
+
|Category index.
 
|N/A
 
|N/A
 
|-
 
|-
|checkout_success.heading
+
|modules.products_variants.variants
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Page heading
+
|Variants.
|N/A
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|checkout_success.text
+
|name
|HTML
+
|[[#string|string]]
|Page content
+
|Variant name
 +
|-
 +
|selected
 +
|[[#integer|integer]]
 +
|Selected variant.
 +
|-
 +
|options
 +
|[[#list|list]] of [[#integer|integer]] to value mappings
 +
|Variants.
 +
|}
 +
|-
 +
|modules.products_variants.products
 +
|[[#list|list]] of [[#product|products]]
 +
|Variant products.
 +
|N/A
 +
|-
 +
|modules.products_variants.combinations
 +
|[[#list|list]] of lists of [[#integers|integer]]s
 +
|Available combinations of options.
 
|N/A
 
|N/A
 
|-
 
|-
|checkout_success.order_id
+
|modules.products_variants.combination
|integer
+
|[[#list|list]] of [[#integers|integer]]s
|Order ID
+
|Currently selected combination.
 
|N/A
 
|N/A
 
|-
 
|-
|checkout_success.survey_questions
+
|modules.products_variants.combined
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Survey questions
+
|Variant choices associated with products.
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 1 950: Rad 2 197:
 
!Description
 
!Description
 
|-
 
|-
|id
+
|combination
|integer
+
|[[#dictionary|dictionary]]
|Question ID
+
|Keys are variant types and values are variant choices.
|-
 
|question
 
|string
 
|Question
 
 
|-
 
|-
|alternatives
+
|product
|list of dictionaries
+
|[[#integer|integer]]
|Question alternatives
+
|Product ID, or null.
 +
|}
 +
|}
 +
 
 +
===tell_a_friend.html===
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|type
+
|modules.tell_a_friend.form_action
|integer
+
|[[#URL|URL]]
|Alternative type, 1 for a radio button, an input field otherwise
+
|Form handler.
|-
+
|N/A
|id
 
|integer
 
|Alternative ID
 
|-
 
|answer
 
|string
 
|Alternative text
 
|-
 
|}
 
|}
 
 
|}
 
|}
  
===Contact us page (contact.html)===
+
==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)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 1 989: Rad 2 233:
 
!Format
 
!Format
 
|-
 
|-
|contact.form_href
+
|reservation.customer_id
|string
+
|[[#integer|integer]]
|URL with target of form for handling user input data
+
|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
 
|-
 
|-
|contact.captcha
+
|reservation.phone
|boolean
+
|[[#string|string]]
|Determines whether Captcha should be used or not
+
|Customer's phone number from reservation form
 
|N/A
 
|N/A
 +
|}
 +
 +
===Reservations - reject (token_action/reservations/reject.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|contact.name
+
|reservation.customer_id
|String
+
|[[#integer|integer]]
|Contains customer name if customer is logged in or validation if validation of a field failed
+
|Id of customer who placed the reservation.
 
|N/A
 
|N/A
 
|-
 
|-
|contact.email
+
|reservation.name
|string
+
|[[#string|string]]
|Contains customer e-mail if customer is logged in or validation if validation of a field failed
+
|Customer's name from reservation form
 
|N/A
 
|N/A
 
|-
 
|-
|contact.heading
+
|reservation.email
|string
+
|[[#string|string]]
|Contains heading text
+
|Customer's email from reservation form
 
|N/A
 
|N/A
 
|-
 
|-
|contact.text
+
|reservation.phone
|string
+
|[[#string|string]]
|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
+
|Customer's phone number from reservation form
 
|N/A
 
|N/A
 
|}
 
|}
  
===Cookie usage page (cookie_usage.html)===
+
===Account edit page (account_edit.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 027: Rad 2 289:
 
!Format
 
!Format
 
|-
 
|-
|cookie_usage.continue_href
+
|account_edit.form_action
|string
+
|[[#URL|URL]]
|A link to the next page (index.php)
+
|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
===Gallery pages (gallery.html, galleries/)===
+
|[[#dictionary|dictionary]]
 +
|Account data
 +
|
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|gallery.title
+
|firstname
|string
+
|[[#string|string]]
|Gallery title.
+
|Account first name
|N/A
 
 
|-
 
|-
|gallery.description
+
|lastname
|string
+
|[[#string|string]]
|Gallery description or content.
+
|Account last name
|N/A
 
 
|-
 
|-
|gallery.date
+
|personnummer
|string
+
|[[#string|string]]
|Last modification date.
+
|Account personnummer
|N/A
 
 
|-
 
|-
|gallery.type
+
|dob
|string
+
|[[#string|string]]
|Type of gallery.
+
|Account date of birth
|N/A
 
 
|-
 
|-
|gallery.upload_data_action
+
|email_address
|URL
+
|[[#string|string]]
|Form action for uploading.
+
|Account email address
|N/A
 
 
|-
 
|-
|gallery.upload_data_check
+
|telephone
|boolean
+
|[[#string|string]]
|True.
+
|Account telephone number
|N/A
 
 
|-
 
|-
|gallery.upload_data_type
+
|mobile
|HTML
+
|[[#string|string]]
|Form field.
+
|Account mobile telephone number
|N/A
 
 
|-
 
|-
|gallery.page_title
+
|fax
|string
+
|[[#string|string]]
|Edited page title.
+
|Account fax number
|N/A
 
 
|-
 
|-
|gallery.page_description
+
|gender
|HTML
+
|[[#string|string]]
|Edited page description.
+
|Account gender ('m' or 'f')
|N/A
 
 
|-
 
|-
|gallery.form_page_description
+
|custom
|string
+
|[[#list|list]] of [[#custom field|custom field]]
|Edited page description, escaped.
+
|Custom fields.
|N/A
 
 
|-
 
|-
|gallery.gallery_owned
+
|customer_type
|boolean
+
|[[#integer|integer]]
|Set if the gallery is owned by the logged-in user.
+
|(-1 = all, 0 = individual, 1 = company)
|N/A
+
|}
 +
|}
 +
 
 +
===Account history page (account_history.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|gallery.edit_content_link
+
|account_history.account_href
|URL
+
|[[#URL|URL]]
|Link for editing the gallery.
+
|A link back to the account page
 
|N/A
 
|N/A
 
|-
 
|-
|gallery.remove_content_link
+
|account_history.pagination
|URL
+
|[[#pagination|pagination]]
|Link for removing the gallery.
+
|Pagination info
 
|N/A
 
|N/A
 
|-
 
|-
|gallery.edit_mode
+
|account_history.page_href_format
|boolean
+
|[[#URL|URL]]
|Set when editing, otherwise adding.
+
|Pagination link format
 
|N/A
 
|N/A
 
|-
 
|-
|gallery.gallery_fields
+
|account_history.order_history
|list of dictionaries
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Gallery fields.
+
|Order history
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 119: Rad 2 385:
 
!Description
 
!Description
 
|-
 
|-
|label
+
|id
|string
+
|[[#integer|integer]]
|Field label.
+
|Order ID
 
|-
 
|-
|output
+
|status
|HTML
+
|[[#string|string]]
|Form field.
+
|Order status
|}
 
 
|-
 
|-
|gallery.children
+
|date
|list of string to dictionary mappings
+
|[[#string|string]]
|Child galleries.
+
|Order date
|
 
{| class="wikitable"
 
!Key
 
!Type
 
!Description
 
 
|-
 
|-
|title
+
|type
|string
+
|[[#string|string]]
|Gallery title.
+
|Order type
 +
|-
 +
|name
 +
|[[#string|string]]
 +
|Order delivery name
 +
|-
 +
|product_count
 +
|[[#integer|integer]]
 +
|Product count
 
|-
 
|-
|description
+
|total
|HTML
+
|[[#string|string]]
|Gallery description.
+
|Order total
 
|-
 
|-
|link
+
|href
|URL
+
|[[#URL|URL]]
|Child gallery link.
+
|A link to the description of the order
 
|-
 
|-
|date
+
|order
|string
+
|[[#dictionary|dictionary]]
|Last modification date.
+
|Order information, see <tt>checkout success.order</tt>.
 
|}
 
|}
 
|}
 
|}
  
===Index page (index.html)===
+
===Order info page (account_history_info.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 162: Rad 2 430:
 
!Format
 
!Format
 
|-
 
|-
|index.text
+
|account_history_info.back_href
|HTML
+
|[[#URL|URL]]
|Page text
+
|Link back to the account order history
 
|N/A
 
|N/A
 
|-
 
|-
|index.header_products
+
|account_history_info.order
|products
+
|[[#dictionary|dictionary]]
|A random selection of products.
+
|Order info
|list of products
+
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|index.featured_products
+
|id_formatted
|products
+
|[[#string|string]]
|A list of featured products.
+
|Order ID
|list of products
 
 
|-
 
|-
|index.new_products
+
|status
|products
+
|[[#string|string]]
|A list of recently added products.
+
|Order status
|list of products
 
 
|-
 
|-
|index.specials_products
+
|date
|products
+
|[[#date|date]]
|A list of products with special prices.
+
|Order date
|list of products
 
|}
 
 
 
===Kolli page (kolli.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|kolli.heading
+
|total
|string
+
|[[#string|string]]
|Page heading
+
|Order total
|N/A
 
 
|-
 
|-
|kolli.text
+
|shipping_method
|HTML
+
|[[#string|string]]
|Page text
+
|Order shipping method
|N/A
 
|}
 
 
 
===Login page (login.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|login.heading
+
|payment_method
|string
+
|[[#string|string]]
|Page heading
+
|Order payment method
|N/A
+
|-
|}
+
|tax_group_count
 
+
|[[#integer|integer]]
===Log off page (logoff.html)===
+
|Number of different tax groups
 +
|-
 +
|billing_address
 +
|[[#string|string]]
 +
|Order billing address
 +
|-
 +
|delivery_address
 +
|[[#string|string]]
 +
|Order delivery address
 +
|-
 +
|delivery
 +
|[[#boolean|boolean]]
 +
|
 +
|-
 +
|partner
 +
|[[#partner|partner]]
 +
|
 +
|-
 +
|products
 +
|[[#list|list]] of [[#dictionary|dictionaries]]
 +
|Products in order
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|logoff.continue_href
+
|qty
|string
+
|[[#integer|integer]]
|Link presented to the user after logging off.
+
|Product quantity
|N/A
 
|}
 
 
 
===Manufacturers page (manufacturers.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
 
|id
 
|id
|string
+
|[[#integer|integer]]
|N/A
+
|Product ID
|N/A
 
 
|-
 
|-
 
|name
 
|name
|string
+
|[[#string|string]]
|N/A
+
|Product name
|N/A
 
 
|-
 
|-
|image
+
|model
|string
+
|[[#string|string]]
|N/A
+
|Product model
|N/A
 
 
|-
 
|-
|address
+
|tax
|string
+
|[[#decimal|decimal]]
|N/A
+
|Product tax
|N/A
 
 
|-
 
|-
|postcode
+
|price
|string
+
|[[#decimal|decimal]]
|N/A
+
|Product price
|N/A
 
 
|-
 
|-
|postal_address
 
|string
 
|N/A
 
|N/A
 
 
|-
 
|-
|visitational_address
+
|final_price
|string
+
|[[#decimal|decimal]]
|N/A
+
|Final product price
|N/A
 
 
|-
 
|-
|country
+
|image
|string
+
|[[#string|string]]
|N/A
+
|Address to image
|N/A
 
 
|-
 
|-
|telephone1
+
|href
|string
+
|[[#string|string]]
|N/A
+
|Link address to product
|N/A
 
 
|-
 
|-
|telephone2
+
|status
|string
+
|[[#string|string]]
|N/A
+
|Products status. 0 = inactive, 1 = active
|N/A
+
|}
 
|-
 
|-
|fax
+
|totals
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|N/A
+
|Order parts of total
|N/A
+
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|email_address
+
|title
|string
+
|[[#string|string]]
|N/A
+
|Total part label
|N/A
 
 
|-
 
|-
|orgno
+
|text
|string
+
|[[#HTML|HTML]]
|N/A
+
|Total part value
|N/A
+
|}
 
|-
 
|-
|vat
+
|statuses
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|N/A
+
|Order statuses
|N/A
+
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|note
+
|name
|string
+
|[[#string|string]]
|N/A
+
|Status name
|N/A
 
 
|-
 
|-
|postgiro
+
|date
|string
+
|[[#date|date]] (short)
|N/A
+
|Status date
|N/A
 
 
|-
 
|-
|bankgiro
+
|comments
|string
+
|[[#string|string]]
|N/A
+
|Status comments
|N/A
+
|}
 
|-
 
|-
|contact
+
|events
|string
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|N/A
+
|Order delivery events
|N/A
+
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|payment_conditions
+
|date
|string
+
|[[#date|date]]
|N/A
+
|Event date
|N/A
 
 
|-
 
|-
|customers_no
+
|location
|string
+
|[[#string|string]]
|N/A
+
|Event location
|N/A
 
 
|-
 
|-
|homepage
+
|description
|string
+
|[[#string|string]]
|N/A
+
|Event description
|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)===
+
===Account page (account.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 358: Rad 2 610:
 
!Format
 
!Format
 
|-
 
|-
|news_archive.news
+
|account.account_history_href
|list of dictionaries
+
|[[#URL|URL]]
|News articles
+
|A link to the account history page
|
+
|N/A
{| class="wikitable"
+
|-
!Key
+
|account.account_edit_href
!Type
+
|[[#URL|URL]]
!Description
+
|A link to the edit account page
 +
|N/A
 
|-
 
|-
|id
+
|account.address_book_href
|integer
+
|[[#URL|URL]]
|News article ID
+
|A link to the address book page
 +
|N/A
 
|-
 
|-
|title
+
|account.account_password_href
|string
+
|[[#URL|URL]]
|News article title
+
|A link to the password change page
 +
|N/A
 
|-
 
|-
|date
+
|account.logoff_href
|string
+
|[[#URL|URL]]
|News article publishing date
+
|A link to the logoff page
 +
|N/A
 
|-
 
|-
|content
+
|account.account_newsletters_href
|string
+
|[[#URL|URL]]
|News article content
+
|A link to the newsletters page
|}
 
|}
 
 
 
===News article page (news.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
|-
 
|news.title
 
|string
 
|News article title
 
 
|N/A
 
|N/A
 
|-
 
|-
|news.date
+
|account.account_notifications_href
|string
+
|[[#URL|URL]]
|Date of publishing
+
|A link to the notifications page
 
|N/A
 
|N/A
 
|-
 
|-
|news.content
+
|account.order_history_enabled
|string
+
|[[#boolean|boolean]]
|News article content
+
|Is the order history enabled?
 
|N/A
 
|N/A
 
|-
 
|-
|news.blog_enabled
+
|account.order_history
|boolean
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|Is the blog functionality enabled?
+
|Order history
|N/A
 
|-
 
|news.form_action
 
|URL
 
|A link to the page which handles the new comment form
 
|N/A
 
|-
 
|news.comments
 
|list of dictionaries
 
|Comments to the news article
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 426: Rad 2 659:
 
!Description
 
!Description
 
|-
 
|-
|name
+
|href
|string
+
|[[#URL|URL]]
|Comment author
+
|A link to the order description page
 
|-
 
|-
 
|date
 
|date
|string
+
|[[#date|date]] (short)
|Comment posting date
+
|The date the order was placed
 
|-
 
|-
|comment
+
|id
|string
+
|[[#integer|integer]]
|Comment text
+
|Order ID
|}
+
|-
|}
+
|country
 
+
|[[#string|string]]
===Newsletter page (newsletter.html)===
+
|Order delivery name and country
{| class="wikitable"
+
|-
!Variable name    !! Type !! Description !! Format
+
|status
 +
|[[#string|string]]
 +
|Order status
 +
|-
 +
|total
 +
|[[#HTML|HTML]]
 +
|Order total
 
|-
 
|-
| newsletter.text || HTML || The newsletter. ||N/A
+
|order
 +
|[[#dictionary|dictionary]]
 +
|Order information, see <tt>checkout success.order</tt>.
 +
|}
 
|}
 
|}
  
===Password forgotten page (password_forgotten.html)===
+
===Account newsletter subscription page (account_newsletters.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 454: Rad 2 696:
 
!Format
 
!Format
 
|-
 
|-
|password_forgotten.form_action
+
|account_newsletters.form_action
|string
+
|[[#URL|URL]]
 
|A link to the page which handles the form
 
|A link to the page which handles the form
 
|N/A
 
|N/A
 
|-
 
|-
|password_forgotten.back_href
+
|account_newsletters.back_href
|string
+
|[[#URL|URL]]
|A link to the parent page (login.php)
+
|Link back to the account page
 +
|N/A
 +
|-
 +
|account_newsletters.subscribed
 +
|[[#boolean|boolean]]
 +
|Is the user subscribed to the newsletter
 
|N/A
 
|N/A
 
|}
 
|}
  
===Product page (product.html)===
+
===Account notifications page (account_notifications.html)===
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name               !! Type   !! Description !! Format
+
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
| product.form_href || URL || Add to cart handler. || N/A
+
|account_notifications.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 
|-
 
|-
| product.reviews_href || URL || Link to product reviews. || N/A
+
|account_notifications.account_href
 +
|[[#URL|URL]]
 +
|A link back to the account page
 +
|N/A
 
|-
 
|-
| product.invalid_name || string || Invalid product name page title. || N/A
+
|account_notifications.products
|-
+
|[[#list|list]] of [[#dictionary|dictionaries]]
| product.invalid_text || string || Invalid product name page text. || N/A
+
|The products subscribed to
|-
 
| 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.
 
 
|
 
|
 
{| class="wikitable"
 
{| class="wikitable"
Rad 2 491: Rad 2 738:
 
!Description
 
!Description
 
|-
 
|-
|id||integer||Product index.
+
|id
 +
|[[#integer|integer]]
 +
|Product ID
 
|-
 
|-
|image||URL||Product image.
+
|name
 +
|[[#string|string]]
 +
|Product name
 
|-
 
|-
|name||string||Product name.
+
|counter
 +
|[[#integer|integer]]
 +
|List index
 +
|}
 
|-
 
|-
|href||URL||Product link
+
|account_notifications.global_product_notifications
 +
|[[#boolean|boolean]]
 +
|Has the user enabled the global product notification setting
 +
|N/A
 
|}
 
|}
|-
+
 
| product.category_path || list of dictionaries || Information about the current category path.
+
===Change account password page (account_password.html)===
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|id||integer||Category index.
+
|account_password.form_action
 +
|[[#URL|URL]]
 +
|A link to the page which handles the form
 +
|N/A
 
|-
 
|-
|name||string||Category name.
+
|account_password.back_href
|-
+
|[[#URL|URL]]
|image||URL||Category image.
+
|Link back to the account page
|-
+
|N/A
|seo_link||URL||Category link.
 
 
|}
 
|}
|-
+
 
|product.product || dictionary || Product information
+
===Address book page (address_book.html)===
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|id || integer || Product index.
+
|address_book.back_href
 +
|[[#URL|URL]]
 +
|A link back to the account page
 +
|N/A
 
|-
 
|-
|parent_id||integer||Parent product index.
+
|address_book.add_href
 +
|[[#URL|URL]]
 +
|A link to a form which adds a new entry to the address book
 +
|N/A
 
|-
 
|-
|categories||list of lists of dictionaries||Information for all product categories.||See product.category_path.
+
|address_book.entries_count
 +
|[[#integer|integer]]
 +
|Number of entries
 +
|N/A
 
|-
 
|-
|tags||list of tags||Tags set for this product.
+
|address_book.address_label
 +
|[[#HTML|HTML]]
 +
|Address label
 +
|N/A
 
|-
 
|-
|date_added||string||Date product was added.
+
|address_book.addresses
|-
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|date_available||string||Date product will be available.
+
|The addresses in the address book
|-
 
|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.
 
|-
 
|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 574: Rad 2 811:
 
!Description
 
!Description
 
|-
 
|-
|href||URL||Image thumbnail link.
+
|id
 +
|[[#integer|integer]]
 +
|Id of the default address book entry
 
|-
 
|-
|image||URL||Image path.
+
|default
 +
|[[#boolean|boolean]]
 +
|Is this the default address book entry
 
|-
 
|-
|description||string||Image description.
+
|edit_href
|}
+
|[[#URL|URL]]
 +
|A link to edit the entry
 
|-
 
|-
|last_modified||string||Product last modified date.
+
|delete_href
 +
|[[#URL|URL]]
 +
|A link to delete the entry
 
|-
 
|-
|lowest_number||integer||Minimum required order size.
+
|name
 +
|[[#string|string]]
 +
|Associated name
 
|-
 
|-
|manufacturer_model||string||Product manufacturer model.
+
|address
 +
|[[#HTML|HTML]]
 +
|The address
 +
|}
 +
|}
 +
 
 +
===Address book modification page (address_book_process.html)===
 +
{| class="wikitable"
 +
!Variable name
 +
!Type
 +
!Description
 +
!Format
 
|-
 
|-
|model||string||Product model.
+
|address_book_process.editing
 +
|[[#boolean|boolean]]
 +
|Is the page in the editing mode?
 +
|N/A
 
|-
 
|-
|name||string||Product name.
+
|address_book_process.deleting
 +
|[[#boolean|boolean]]
 +
|Is the page in the deletion mode?
 +
|N/A
 
|-
 
|-
|next_delivery_date||string||Next delivery date.
+
|address_book_process.edit_form_action
 +
|[[#URL|URL]]
 +
|A link to a page which handles the editing form
 +
|N/A
 
|-
 
|-
|next_delivery_quantity||string||Next delivery quantity.
+
|address_book_process.delete_form_action
 +
|[[#URL|URL]]
 +
|A link to a page which handles the deletion form
 +
|N/A
 
|-
 
|-
|tax||decimal||Product tax rate.
+
|address_book_process.address_label
 +
|[[#HTML|HTML]]
 +
|The address
 +
|N/A
 
|-
 
|-
|price||string||Product price.
+
|address_book_process.back_href
 +
|[[#URL|URL]]
 +
|A back link
 +
|N/A
 
|-
 
|-
|price_rek||string||Recommended product price.
+
|address_book_process.address_book_href
 +
|[[#URL|URL]]
 +
|A link to the address_book
 +
|N/A
 
|-
 
|-
|price_special||string||Special product price.
+
|address_book_process.process
 +
|[[#boolean|boolean]]
 +
|Is the page in the processing mode?
 +
|N/A
 
|-
 
|-
|rating||decimal||Average review rating in increments of 0.5.
+
|address_book_process.default_address
 +
|[[#boolean|boolean]]
 +
|Is this the default address?
 +
|N/A
 
|-
 
|-
|seo_link||URL||Product link.
+
|address_book_process.entry
 +
|[[#dictionary|dictionary]]
 +
|The fields in the current entry
 +
|
 +
{| class="wikitable"
 +
!Key
 +
!Type
 +
!Description
 
|-
 
|-
|stock||integer||Products in stock.
+
|male
 +
|[[#boolean|boolean]]
 +
|Male gender?
 
|-
 
|-
|type||string||Product quantity type.
+
|firstname
 +
|[[#string|string]]
 +
|First name
 
|-
 
|-
|weight||string||Product weight.
+
|lastname
 +
|[[#string|string]]
 +
|Last name
 
|-
 
|-
|reorder_stock||string||
+
|company
 +
|[[#string|string]]
 +
|Company
 
|-
 
|-
|stock_place||string||Product location.
+
|street_address
 +
|[[#string|string]]
 +
|Street address
 
|-
 
|-
|viewed||integer||Product view count.
+
|suburb
 +
|[[#string|string]]
 +
|Suburb
 
|-
 
|-
|ordered||integer||Product order count.
+
|postcode
 +
|[[#string|string]]
 +
|Post code
 
|-
 
|-
|note||string||Product note.
+
|city
 +
|[[#string|string]]
 +
|City
 
|-
 
|-
|lead_time||string||
+
|country_list
 +
|[[#HTML|HTML]]
 +
|A drop-down list with countries
 
|-
 
|-
|price_in||string||
+
|state_has_zones
 +
|[[#boolean|boolean]]
 +
|Does the state have zones?
 
|-
 
|-
|price_purchase||string||
+
|state
|-
+
|[[#string|string]]
|price_rek||string||
+
|State
|-
 
|shipping_class||int||Product shipping class. 1-10
 
 
|-
 
|-
 +
|states
 +
|association list
 +
|A list of zones in the state
 +
|}
 
|}
 
|}
|-
+
 
|product.manufacturer || dictionary || Product manufacturer information
+
===Advanced search page (advanced_search.html)===
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
!Variable name
 
!Type
 
!Type
 
!Description
 
!Description
 +
!Format
 
|-
 
|-
|name||string||Manufacturer name.
+
|advanced_search.form_action
 +
|[[#string|string]]
 +
|A link to the page which handles the form.
 +
|N/A
 
|-
 
|-
|href||URL||Manufacturer URL.
+
|advanced_search.categories
 +
|association list
 +
|A list of category names mapped to their indices.
 +
|[[#dictionary|dictionary]] of [[#string|string]] to [[#integer|integer]] mappings.
 
|-
 
|-
|image||URL||Manufacturer image.
+
|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
 
|-
 
|-
|address||string||
+
| advanced_search_result.results    || [[#list|list]] of products || The search results. ||N/A
 
|-
 
|-
|postcode||string||
+
| advanced_search_result.num_results || [[#integer|integer]]          || The number of search results. || N/A
 
|-
 
|-
|postal_address||string||
+
| advanced_search_result.back_href  || [[#URL|URL]]              || A link for returning to the search page. || N/A
 
|-
 
|-
|visitational_address||string||
+
| advanced_search_result.page_limit            || [[#integer|integer]]              || Maximum number of products per page || N/A
 
|-
 
|-
|country||string||
+
| 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
 
|-
 
|-
|telephone1||string||
+
| advanced_search_result.page_index            || [[#integer|integer]]              || Current page number || N/A
 
|-
 
|-
|telephone2||string||
+
| advanced_search_result.page_count            || [[#integer|integer]]              || Number of pages || N/A
 
|-
 
|-
|fax||string||
+
| advanced_search_result.sort_by        || [[#string|string]]              || Current sorting key. || N/A
 
|-
 
|-
|email_address||string||Manufacturer email address.
+
| advanced_search_result.sort_order        || [[#string|string]]              || Current sorting order, "ASC" or "DESC". || N/A
 
|-
 
|-
|orgno||string||
+
| index.featured_products          || [[#list|list]] of [[#product|products]] ||A list of featured products. || N/A
 +
|}
 +
 
 +
===Campaign page (campaign.html)===
 +
{| class="wikitable"
 +
!Variable name                  !! Type            !! Description !! Format
 
|-
 
|-
|vat||string||
+
| campaign.campaign_name        || [[#HTML|HTML]]            || Title of campaign. ||N/A
 
|-
 
|-
|note||string||Manufacturer note.
+
| campaign.campaign_description || [[#HTML|HTML]]            || Description of campaign. ||N/A
 
|-
 
|-
|postgiro||string||
+
| campaign.campaign_image      || [[#URL|URL]]              || Selected campaign image. ||N/A
|-
 
|bankgiro||string||
 
|-
 
|contact||string||
 
|-
 
|payment_conditions||string||
 
|-
 
|customers_no||string||
 
 
|-
 
|-
|}
+
| campaign.products            || [[#list|list]] of products || Products included in campaign. ||N/A
 
|}
 
|}
  
===Product added to shopping cart page (product_added.html)===
+
===Product list (categories_listing.html)===
 +
====GET variables====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name               !! Type   !! Description !! Format
+
!Variable name                             !! Type                 !! Description !! Format
 
|-
 
|-
| product_added.checkout_href || URL    || A link to the checkout page. || N/A
+
|}
 +
====Available data====
 +
{| class="wikitable"
 +
!Variable name                            !! Type                !! Description !! Format
 
|-
 
|-
| product_added.product      || product || The product added.
+
| categories_listing.header                || [[#dictionary|dictionary]]          || Attributes for the top of the page. It is either a manufacturer or a category ||
| The product has one additional key.
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
! Key !! Type !! Description
!Type
 
!Description
 
 
|-
 
|-
|quantity_added
+
| name  || [[#string|string]] || Name of category/manufacturer
|integer
 
|The quantity of the product added to the shopping cart
 
|}
 
|}
 
 
 
===New products page (products_new.html)===
 
{| class="wikitable"
 
!Variable name
 
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|products_new.pagination
+
| alternative_name || [[#string|string]] || An alternative category name.  (SEO name.)
|pagination
 
|Pagination info
 
|N/A
 
 
|-
 
|-
|products_new.page_href_format
+
| image || [[#string|string]] || Image [[#URL|URL]] for category/manufacturer
|URL
 
|Pagination link format
 
|N/A
 
 
|-
 
|-
|products_new.products
+
| images || [[#list|list]] of [[#URL|URLs]] || The additional images for the category.
|products
 
|A list of recently added products.
 
|list of products
 
|}
 
 
 
===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
+
| text  || [[#HTML|HTML]]  || Description of category/manufacturer
 
|-
 
|-
| product_reviews.write_href      || URL                  || Link to the write review page. || N/A
+
| alternative_text  || [[#HTML|HTML]]  || An alternative category description. (SEO text.)
 
|-
 
|-
| product_reviews.product          || product              || The product. || N/A
+
| template  || [[#string|string]]  || Template name chosen for the category, empty by default.
 
|-
 
|-
| product_reviews.pagination      || pagination          || Pagination object for the reviews. || N/A
+
| extra1  || [[#string|string]]  || Category extra field.
 
|-
 
|-
| product_reviews.page_href_format || URL                  || Page format for the pagination. || N/A
+
| extra2  || [[#string|string]]  || Category extra field.
 
|-
 
|-
| product_reviews.reviews          || list of dictionaries || The displayed reviews.
+
| extra3  || [[#string|string]]  || Category extra field.
|
 
{| class="wikitable"
 
!Key !! Type !! Description
 
 
|-
 
|-
|href      || URL    || Link to the review page
+
| extra4  || [[#string|string]]  || Category extra field.
 
|-
 
|-
|author    || string || Author of the review
+
| extra5  || [[#string|string]]  || Category extra field.
 +
|}
 
|-
 
|-
|date      || string  || The date the review was written
+
| 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]].
 
|-
 
|-
|text      || string  || The first 100 characters of the review text, lines broken at every 40 characters
+
| 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
 
|-
 
|-
|full_text || string  || The first 100 characters of the review text
+
| 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
 +
|-
 +
| categories_listing.subcategory_list || [[#list|list]] of [[#dictionary|dictionaries]] || Subcategories for the current category || N/A
 
|-
 
|-
|rating    || integer || Review rating, 1-5.
 
|}
 
 
|}
 
|}
  
===Review page (product_reviews_info.html)===
+
====Display variables====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                   !! Type       !! Description !! Format
+
!Variable name                             !! Type                 !! Description !! Format
 +
|-
 +
| categories_listing.default_list_style    || [[#integer|integer]]              || By default this layout for the listing is selected || N/A
 +
|-
 +
| categories_listing.page_limit            || [[#integer|integer]]              || Maximum number of products per page || N/A
 +
|-
 +
| categories_listing.page_limits          || [[#list|list]] of [[#integers|integer]]s    || List of available page limits. 0 means all product on one page || N/A
 +
|-
 +
| categories_listing.page_index            || [[#integer|integer]]              || Current page number || N/A
 +
|-
 +
| categories_listing.page_count            || [[#integer|integer]]              || Number of pages || N/A
 +
|-
 +
| categories_listing.sort_by        || [[#string|string]]              || Current sorting key. || N/A
 
|-
 
|-
| product_reviews_info.back_href  || URL        || Link to the product reviews page. || N/A
+
| categories_listing.sort_order        || [[#string|string]]              || Current sorting order, "ASC" or "DESC". || N/A
 
|-
 
|-
| product_reviews_info.write_href || URL        || Link to the write review page. || 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
 
|-
 
|-
| product_reviews_info.product    || product    || The product. || N/A
+
| categories_listing.sort_form_href        || [[#string|string]]              || Link to the same page. || N/A
 
|-
 
|-
| product_reviews_info.review    || dictionary || The displayed review.
+
| 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
|
 
{| class="wikitable"
 
!Key !! Type !! Description
 
 
|-
 
|-
|author    || string || Author of the review
+
| 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
 
|-
 
|-
|date      || string || The date the review was written
+
| 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
 
|-
 
|-
|text      || string || The review text, lines broken at every 60 characters
+
| 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
 
|-
 
|-
|rating    || integer || Review rating, 1-5.
 
|}
 
 
|}
 
|}
  
===Write review page (product_reviews_write.html)===
+
====Filtering variables====
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name                     !! Type       !! Description !! Format
+
!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
 
|-
 
|-
| product_reviews_write.form_href  || URL        || Form handler. || 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
 
|-
 
|-
| product_reviews_write.back_href  || URL        || Link to the product reviews page. || 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
 
|-
 
|-
| product_reviews_write.product    || product    || The product. || 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
 
|-
 
|-
| product_reviews_write.customer  || dictionary || Customer information.
+
| categories_listing.manufacturers        || [[#list|list]] of [[#dictionary|dictionaries]] || Manufacturers used by products in current category tree. ||
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key !! Type !! Description
+
! Key !! Type !! Description
 +
|-
 +
| id  || [[#string|string]] || Manufacturer ID.
 
|-
 
|-
|firstname || string || First name of the customer writing the review.
+
| name || [[#string|string]] || Manufacturer name.
 
|-
 
|-
|lastname  || string || Last name of the customer writing the review.
+
| image || [[#URL|URL]] || Manufacturer image.
 
|}
 
|}
|}
+
|-
 
+
| categories_listing.filters || [[#list|list]] of [[#dictionary|dictionaries]] || Configured filters for this category. ||
===Question about product page (question_about_product.html)===
+
For the price filter and value specifications:
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
 
!Description
 
!Format
 
 
|-
 
|-
|question_about_product.form_action
+
| id || [[#string|string]] || "price" or a specification ID.
|URL
 
|A link to the page which handles the form
 
|N/A
 
 
|-
 
|-
|question_about_product.back_href
+
| name || [[#string|string]] || Filter name.
|URL
+
|-
|Link back to the product page
+
| type || [[#integer|integer]] || 2
|N/A
+
|-
 +
| min || [[#float|float]] || Minimum price/value for a product in this category.
 +
|-
 +
| max || [[#float|float]] || Maximum price/value for a product in this category.
 
|-
 
|-
|question_about_product.product
+
| unit || [[#string|string]] || Currency name or specification unit.
|product
 
|Product information.
 
|N/A
 
 
|}
 
|}
 
+
For the manufacturers filter:
===Product reviews page (reviews.html)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
! Key !! Type !! Description
!Type
+
|-
!Description
+
| id || [[#string|string]] || "manufacturers"
!Format
 
 
|-
 
|-
|reviews.pagination
+
| name || [[#string|string]] || Manufacturer name.
|pagination
 
|Pagination info
 
|N/A
 
 
|-
 
|-
|reviews.page_href_format
+
| image || [[#URL|URL]] || Manufacturer image.
|URL
 
|Pagination link format
 
|N/A
 
 
|-
 
|-
|reviews.reviews
+
| children || [[#dictionary|dictionary]] || Manufacturer collections, same format as this dictionary, excluding children.
|list of dictionaries
+
|}
|Product reviews
+
For the category, tag, and specification category filters:
|
 
 
{| class="wikitable"
 
{| class="wikitable"
!Key
+
! Key !! Type !! Description
!Type
 
!Description
 
 
|-
 
|-
|href
+
| id || [[#integer|integer]] || ID.
|URL
 
|A link to the review page
 
 
|-
 
|-
|product
+
| name || [[#string|string]] || Name.
|string
 
|Product name
 
 
|-
 
|-
|author
+
| type || [[#integer|integer]] || 0 for categories, 1 for tags, 3 for specification categories.
|string
 
|Review author
 
 
|-
 
|-
|date
+
| children || [[#dictionary|dictionary]] || Manufacturer collections, same format as this dictionary, excluding children.
|string
+
|-
|Review date
+
| options || [[#list|list]] of [[#dictionary|dictionaries]] || Subcategories, keys are id and name.
 +
|}
 +
For the text specification filters:
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 
|-
 
|-
|image
+
| id || [[#integer|integer]] || ID.
|string
 
|Product image
 
 
|-
 
|-
|text
+
| name || [[#string|string]] || Name.
|HTML
 
|Abbreviated review text
 
 
|-
 
|-
|full_text
+
| type || [[#integer|integer]] || 4
|string
 
|Unabbreviated review text
 
 
|-
 
|-
|rating
+
| options || [[#list|list]] of [[#dictionary|dictionaries]] || Subcategories, the dictionaries only have the key name.
|HTML
 
|Product rating
 
 
|}
 
|}
 
|}
 
|}
  
===Specials page (specials.html)===
+
===Checkout success (checkout_success.html)===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Variable name
 
!Variable name
Rad 2 896: Rad 3 181:
 
!Format
 
!Format
 
|-
 
|-
|specials.pagination
+
|google_analytics_order.products
|pagination
+
|[[#list|list]] of [[#dictionary|dictionaries]]
|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)===
 
 
{| class="wikitable"
 
{| class="wikitable"
!Variable name
+
!Key
 
!Type
 
!Type
 
!Description
 
!Description
!Format
 
 
|-
 
|-
|tell_a_friend.form_action
+
|products_id
|URL
+
|[[#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
 
|A link to the page which handles the form
 
|N/A
 
|N/A
 
|-
 
|-
|tell_a_friend.back_href
+
|checkout_success.heading
|URL
+
|[[#string|string]]
|Link back to the product page
+
|Page heading
 +
|N/A
 +
|-
 +
|checkout_success.text
 +
|[[#HTML|HTML]]
 +
|Page content
 
|N/A
 
|N/A
 
|-
 
|-
|tell_a_friend.product
+
|checkout_success.order_id
|product
+
|[[#integer|integer]]
|Product information.
+
|Order ID
 
|N/A
 
|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')