Where Can I Find The Latest Tokens?
Here is a list of "Undocumented" tokens available for use in the Template modules:
Added 2003/08/25
%begin_trackinginventory%...%end_trackinginventory%
(displays it's contents only if inventory tracking is enabled for that product)%begin_nottrackinginventory%...%end_nottrackinginventory%
(display it's contents only if inventory tracking is NOT enabled for that product).
Added 2003/07/17
%begin_ifloggedin%...%end_ifloggedin%
%begin_ifnotlogged%...%end_ifnotloggedin%
%noform%
token for use in main template to suppress addition of form tags%var|variable|%
modified token to include ability to evalute expressions- added support for OUI tokens
%begin_if| and %
begin_notif| modified to evaluate full Miva expressions%oui_prodprice%
token to display price as modified by OUI_display_price function%begin_ouipricediscount%...%end_ouipricediscount%
displays contents if%oui_prodprice% != %prodpriceF%
%begin_noouipricediscount%...%end_noouipricediscount%
displays contents if%oui_prodprice% = %prodpriceF%
%hiddenqty|xxx|%
added token to related products template%oui_catimage1%, %oui_catimage2%, %oui_catimage3%
tokens to display alternate category images
Added 2003/05/16
%begin_pricegroup%...%end_pricegroup%
: displays its contents if the customer is in any price group%begin_nopricegroup%...%end_nopricegroup%
: displays its contents if the customer is not in any price group%begin_availgroup%...%end_availgroup%
: displays its contents if the customer is in any availability group%begin_noavailgroup%...%end_noavailgroup%
: displays its contents if the customer is NOT in any availability group%begin_inpricegroup|group|%...%end_inpricegroup%
: displays its contents if the customer is the in the price group with the name "group"%begin_notinpricegroup|group|%...%end_notinpricegroup%
: displays its contents if the customer is NOT the in the price group with the name "group"%begin_inavailgroup|group|%...%end_inavailgroup%
: displays its contents if the customer is the in the availability group with the name "group"%begin_notinavailgroup|group|%...%end_notinavailgroup%
: displays its contents if the customer is the in the availability group with the name "group"
Added 2003/05/13
%begin_hasimage%...%end_hasimage%
displays contents if product image file exists%begin_hasnoimage%...%end_hasnoimage%
displays contents if product image file does not exist%begin_hasthumbnail%...%end_hasthumbnail%
displays contents if product thumbnail file exists%begin_hasnothumbnail%...%end_hasnothumbnail%
displays contents if product thumbnail file does not exist%begin_nopricediscount%...%end_nopricediscount%
displays contents if the list price is NOT lower than product price%begin_nocostdiscount%...%end_nocostdiscount%
displays contents if the price is NOT lower than the cost
Added 2003/05/02:
%begin_hasattributes%...%end_hasattributes%
displays contents only if the product has attributes%begin_hasnoattributes%...%end_hasnoattributes%
displays contents only if the product has no attributes%begin_if|variable|%....%end_if%
tokens displays contents only if the variable evaluates to true
example:%begin_if|Products.d.desc|%...%end_if%
will display its contents only if the product does not have a description%begin_notif|variable|%....%end_notif%
tokens displays contents only if the variable evaluates to false
Added 2003/04/25:
%begin_hasproducts%...%end_hasproducts%
displays contents only if the category has products%begin_noproducts%...%end_noproducts%
displays contents only if the category has noproducts%begin_hassubcats%...%end_hassubcats%
displays contents only if the category has sub-categories%begin_hasnosubcats%...%end_hasnosubcats%
displays contents only if the category does NOT have sub-categories.
Added/modified on 2003/04/04:
- Added attribute specific length tokens (ie.
%FieldsT|delimiter|token#|defaultsize:defaultmax|%
)
You can now use the token
%fieldsT%in the text type attribute fields. It lets you specify that the field length and maxlength is to be derived from the attribute code. This is done by specifying the delimiter which your code is separated into parts by and the # of the portion to use. For example, if your attribute code is of the form ATTRCODE-10-SMSTEEL1, then you can specify that the size (10) to use with the token:
%fieldsT|-|2|10:10|%(where 10 is the default size:maxlength)
This would then cause the module to look at the attribute code to determine the length of the field. It would treat the - as a delimiter and select the second portion (10) and use that for length. Note that it is actually looking for that field to be in the form length:maxlength but if one or the other is not specified the default value is used (i.e. 10:10 in the above example).
So to specify a specific length and maxlength for the attribute, you could use an attribute
code such as:
ATTRCODE-10:10-SMSTEEL1
Added support for OUI additional images. The width and height, if specified, will be used.
%ouiimage1%
%ouiimage2%
%ouiimage3%
Modified %prodimage% and %prodthumb%
tokens to use oui height and width. If specified for the product image, they will be used to display them.
Added %var|variable_name|%
token
You can use the token
%var|variable_name|%to display any Miva variables. For example, to display the OUI thank you message, you could use the token:
%var|OUI_Store.d.thankyou|%
Added 3/12/2003
%totalproducts%
token (total number of products in category)%totalpages%
token (total number of pages in category)
%begin_haspages%...%end_haspages%: conditionally displays the text between them only if the category has more than one page of products. For example:
%begin_haspages% Pages:%paging%%end_haspages%will display the paging only if there is more than one page of products.
%insert|file|length|%: This token will import a file at the path "file" (relative to the Miva Data root) up to the "length". If the length is set to "full" (i.e.
%insert|file|full|%) the token will insert the complete file. This token is processed first so the imported file can contain tokens which will be processed. The token itself cannot contain other tokens.
%insert2|file|length|%: This token will import a file at the path "file" (relative to the Miva Data root) up to the "length". If the length is set to "full" (i.e.
%insert|file|full|%) the token will insert the complete file. This token is processed last, so the import file cannot contains tokens to be processed (any tokens in the file will simply be passed through) but the token itself can contain tokens, such as:
%insert2|%prodcode%.html|full|%.
%session_id%
: The value of the g.Session_id variable%sessionurl%
: The value of the g.Sessionurl variable. On an non-secure page this is equal to Domain.d.mm_url. On a secure page it is equal to Domain.d.mm_url $ 'Session_ID=' $ g.Session_id $ '&'%prodpriceU%
: product price unadjusted for discounts%prodpriceUF%
: product price unadjusted and formatted%discountsave%
: dollar amount difference between adjusted, which accounts for discounts such as price groups, and un-adjusted%discountsaveF%: same as %discountsaveF%
but formatted%discountprcnt%
: the difference between adjusted and un-adjusted as a percentage of the unadjusted price.%stockmessageS%
: short stock message%stockmessageL%
: long stock message%valuesave%
: the dollar amount (product cost - product price)%valuesaveF%: the formatted %valuesave%
%prcntsave%
: percentage calculated as 100 x (product cost - product price)/product cost%prodtoken|xx|%
: if your product description is separated into sections by the pipe character, |, this will display the xxth section. In the description: a toy train|nice train, the text "a toy train" would be section 1 (%prodtoken|001|%
)and "nice train" would be section two (%prodtoken|02|%
).%prodtoken^|xx|%
: if your product description is separated into sections by the carat character, ^, this will display the xxth section. In the description: a toy train^nice train, the text "a toy train" would be section 1 (%prodtoken^|001|%
)and "nice train" would be section two (%prodtoken^|02|%
).%proddesc|xxx|%
: returns the first xxx characters of the product description (xxx has to be three digits, eg. 005 will return the first 5 characters). If the xxxth character is not a space (or tab) character, the string will be shortened until the last character is a space so that the displayed text will not end with a truncated word.%cattitleimage%
: the category title image%cattitleimageL%
: the category title image linked to the category%ctgy_hdr%
: the category header%ctgy_ftr%
: the category footer
The following conditional token pairs can be used:
%begin_instock%/%end_instock%
:displays if the product is in stock (using Merchant Inventory feature)%begin_outstock%/%end_outstock%
:displays if out of stock%begin_lowstock%/%end_lowstock%
:displays if "low" stock%begin_noweight%/%end_noweight%
:displays if the product does not have a weight%begin_hasweight%/%end_hasweight%
:displays if the product does have a weight%begin_inbasket%/%end_inbasket%
:displays if the product is in the basket%begin_notinbasket/%end_notinbasket%
:displays if the product is NOT in the basket%begin_zeroprice%/%end_zeroprice%
:displays if the product has 0 price%begin_hasprice%/%end_hasprice%
:displays if the product has a price%begin_pricediscount%/%end_pricediscount%
:displays if the calculated price is lower than the product price%begin_costdiscount%/%end_costdiscount%
:displays if the product price is lower than the product cost
In each case, you include the %begin_ token before the html/tokens that you want to make conditional, and the %end_ token at the end. If the condition is met (eg. in stock, out of stock, low stock), then the html/tokens between the begin_ and end_ will be displayed. For example, to make the display of the add one button conditional on the product being in stock replace the
%prodaddone%button with:
%begin_instock% %prodaddone% %end_instock%.
Added the tokens
%begin_hasprice%...%end_hasprice%and
%begin_zeroprice%...%end_zeroprice%to the attribute templates. It can be used in the Radio attr. template, Radio option template, Select attr. template, Checkbox attr. template, Text attr. template, and Memo attr. template. The tokens are used exactly as the corresponding tokens for the product template area.
The
%paging%token can be used in the main template area to display an "index" to category pages. For example, if your category has 6 pages of products and your customer is currently on page 3 the
%paging%token would be replaced with something like:
1 2 [3] 4 5 6
with each number being a "quick link" to that page.
The Category Paging template for "this page" is the template used to replace the number that the customer is currently on. The token
%number%is replaced with the page number, the token
%smallalpha%is replaced with a lower case letter (i.e. the pages would be lettered a b c d e etc.), and the token
%largealpha%is replaced with upper case letter (i.e. A B C D). So by default, this template has the text [
%number%] in it and displays as in the above example.
The 'template for "other pages"' is similar and used to display the page "number" for pages the customer is NOT on (i.e. 1, 2, 4, 5, 6 in the above example).
Last update: 2007-04-26 13:50
Author: Support
Revision: 1.1
You cannot comment on this entry
Records in this category
- Prices Displaying Incorrectly
- Displaying Customer IP
- Adding Tokens to Evaluate Expressions
- Using OpenUI Tokens
- Adding Additional / Alternate Product Images
- Linking Products To .PDF Files
- %subcats% Token Error
- Hiding Specific Product Prices
- %next% and %previous% Tokens Not Functioning After Changing %prodnameL% Token
- Using Tokens to Add Attributes Automatically
- Adding <Select One> Tag to Select Type Attributes
- Using Tokens To Conditionally Display Alternate Images
- Using Tokens To Conditionally Control Text
- Displaying Subcategories In Rows
- Displaying Radio Options In Rows
- Displaying Listing of a Category's Sub-categories
- Size Settings Support For Images Provided By OpenUI
- Displaying Images at a Particular Size
- Using Both %prodaddone% and %prodbuyone% Within the Product Template
- Creating "Google Friendly" Product Links
- Compatibility With Bill Weiland's Volume Pricing Module
- Selective Replacement of Price For Certain Products
- Creating "Strike-Through" Pricing
- Using the Print Category Module From Luray With The Category Page Templates Module
- Displaying Quantities In Drop Down Select Lists
- Displaying Original Price As a Strike-Through If Customer's Price Is Lower
- Creating an Automatically Populated "Email for more info" link
- Functionality of the %paging% Token And the Paging Sections of the Template
- %paging% Token Not Wrapping Multiple Lines
- Adding "Wish List Manager" Link to Template Pages
- Displaying More Than Three Products in a Horizontal Row
- Setting Purchase Quantities in Set Multiples
- Where Can I Find The Latest Tokens?
- The templates are installed and I selected the template I want to use but it doesn't change the display of the products.
- I'm attempting to do this: %begin_if2|len('%prodtoken^|002|%')|% stuff to show if it's there %end_if% But it generates an error. What might the problem be?
- I would like to be able to have my category results be numbered using a numbered list.
- When I use the code: %begin_if|len(OUI_Products2.d.shortdesc)|% %var|OUI_Products2.d.shortdesc|% %end_if% it sometimes shows the short description for some other product.
- I would like to add a "rollover" effect to my "add to basket" button. I have the javascript to do it but how do I access the "add to basket" button since I'm displaying it with the token %prodadd%?
- I would like to format the links displayed by the %paging% token in the "Search Friendly Links" format from Copernicus. Is this possible?
- Is it possible to display a product which is randomly selected from a category?
- How can I display randomly selected products on my category pages?
- I'm using the "List with Quantity" template which adds all of the products to the basket at once. I put an "add to basket" button for each product but I would like to hide the "add to basket" button that displays below the products. How can I do this?
- I'd like to display the attributes in the "List with quantity" template (i.e the template with a single "add to basket" button). Is this possible?
- I'm using the %attrqtybox|xx|% feature for some of my products but the products are not being added to the basket correctly. Any ideas?
- Do you have an example of the use of Copernicus' Search Friendly Links module with the template module?
- I would like to use two %prodaddall% tokens on my "List with Quantity" template (one at the top and one at the bottom) but when I try this, I get an error message, "Unknown Screen". Can I do what I'm after?
- I have the category template as my products and there are 2 products which should be purchased together.Whenever a customer adds one of the products I want the system to get back to the category page and show only the attributes and the quantity box for the products that is not added, I want to show them they have one product added and give them the option to add the other product.
- I am trying to have a table display if there is or is not a category footer (and same deal for the header).
- How can I display only the description and price of the first product associated to that category?
- How do I use the OpenUI Short Description token in a category template?
- I would like to use the "attribute quantity" feature that you recently added to the module to let my customers select quantities for each attribute. However, instead of text fields, I would like to use drop down lists so that they can select the quantities. Can this be done?
- I have a checkbox attribute that I want to default as checked. I normally would use a VMod, but can't with Cat page templates. Do you have any ideas how I could do this with your module?
- What I would like to see is a vertical bar only displayed betweenproducts, so if X is a product, a row would look like this:for 4 products: X | X | X | X for 3 products: X | X | X for 2 products: X | X for 1 product: X
- Using the new attribute quantity feature, I would like to make sure that the customer selects a set number of attributes. For example, I'm selling a three pack of soap and I would like them to select a color for each item in the "pack". How can I go about this?
- I would like to have quantity boxes for my attributes so customers can select a quantitiy for each one rather than having to add the same product several times. For example, I sell fishing flies in different sizes and I would like my customers to be able to go to a product page and enter the quantity that they want for each size. Can I do this?
- The prices displayed by the module are not properly displaying the price calculated by my discount module. How can I get it to correctly display the price?
- Adding both "Add All to Basket" and "Add to basket" buttons in the "List with Quantity" template.














