Template Tokens
(ONLY FOR USE IF YOU WANT TO EDIT YOUR TEMPLATES)
- Tags available anywhere in the template -
{$section} - variable contains the type of the generated page (can be: home, search, category, pages, products, 404), can be used with if (for example: {if $section=="home"} html code for homepage only here {/if})
{$site.title} - the title of your shop site (from preferences)
{$site.tagline} - the description (tagline) of your shop site (from preferences)
{$site.keywords} - keywords of your shop site (from preferences)
{$site.top_content} - the token often used at the top of the template (from preferences)
{$site.bottom_content} - same, but for bottom
{$site.text_unit_1} - text unit (from preferences)
{$site.text_unit_2} - text unit (from preferences)
{$site.text_unit_3} - text unit (from preferences)
{$site.ad_unit_1} - ad unit (from preferences)
{$site.ad_unit_2} - ad unit (from preferences)
{$site.template_root} - the full path to the folder where the template resides, used for images, CSS files and another template-related resources
{$pages_list} [array] - contains information about static pages
Example:
{if $pages_list}
{foreach from=$pages_list item=static_page}
{/foreach}
{/if}
{$categories} [array] - contains information about all site categories
list of available tokens:
id, name, description, uri, rssUrl
Example:
{foreach from=$categories item=curr_cat}
{/foreach}
{$subcategories} [array] - contains information about all subcategories
Example:
{if $subcategories}
{foreach from=$subcategories item=curr_sub_cat}
{if $curr_sub_cat.level<$levels && $curr_sub_cat.name}
{/if}
{/foreach}
{/if}
list of all available tokens:
$*.id, name, description, uri (link to it's page within install), rssUrl (link to the categorie's rss feed), top_content, bottom_content, text_unit_1, text_unit_2, text_unit_3, level (how deep it is related to the top), children (it's nested categories)
-- For the "home"section ({if $section == "home"}) --
{$sort_field} — the sorting field [can be: name, price, time, count]
{$sort_dir} — sort direction [asc, desc]
{$goods} [array], contains all information about goods selected for homepage
has tokens:
id, name, num_price (numeric price value), price (price with currency symbol), currency, description, link (link to the product on the provider
's page), categoryid (id of the category, which contains it), uri (link to the product page within your shop), photo_uri (URI of the image for the product), time (when was added, is unix timestamp), pusherId (ID of the rule used to grab the product), tags (extracted tags), count (views count)
example:
{if $goods && $section == 'home'}
{foreach from=$goods item=product}
{$product.name}
{/foreach}
{/if}
- For the "search" section -
{$rssReq} - URL for the RSS of search results
{$notfound} - if is equals to 1 means no products were found
{$goods} [array] - array of search results, contains same data as goods array described previously
-- For "category" section (means that visitor is viewing category contents) --
{$sort_field} — the sorting field [can be: name, price, time, count]
{$sort_dir} — sort direction [asc, desc]
{$goods} [array], contains all information about goods selected for homepage
has tokens:
id, name, num_price (numeric price value), price (price with currency symbol), currency, description, link (link to the product on the provider
's page), categoryid (id of the category, which contains it), uri (link to the product page within your shop), photo_uri (URI of the image for the product), time (when was added, is unix timestamp), pusherId (ID of the rule used to grab the product), tags (extracted tags), count (views count)
example:
{if $goods && $section == 'home'}
{foreach from=$goods item=product}
{$product.name}
{/foreach}
{/if}
{$category} [array] - contains information about the current category:
{$category.id} - it's ID, *.name, *.description, *.uri (it's local URL), *.rssUrl, *.top_content, *.bottom_content, *.text_unit_1, *.text_unit_2, *.text_unit_3
{$pages} [array] contains pages for current category. example use:
{$page} - current page
-- For "pages" section (if visitor is on one of the static pages) --
{$static_content} - page content
{$pageTitle} - it's title
{$error} will be equal to 404 if the page is not found
-- For "products" section (if user is on the product view page) --
{$article} [array] - contains information about current product, which is being viewed. has following tokens:
id, name, num_price (numeric price value), price (price with currency symbol), currency, description, link (link to the product on the provider
's page), categoryid (id of the category, which contains it), uri (link to the product page within your shop), photo_uri (URI of the image for the product), time (when was added, is unix timestamp), pusherId (ID of the rule used to grab the product), tags (extracted tags), count (views count)
{$ebay_products} [array] - contains related products from ebay
{$related} [array] (has same tokens as goods array) - contains related products from the shop site database
{$category} [array] - contains the information about the category of the product.