{docurl}
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/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|%
%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
%fields|xx|%
: used the text type attribute area, xx is the size of the text entry field (must be 2 digits, eg. 05)%fields|xx|yy|%
: used in the memo type attribute area. xx is the cols and yy is the number of rows (xx and yy must be 2 digits).%fieldsL|xx|yy|%
: when used in the text type attribute area, xx is the size of the text entry field, and yy is the maxlength.%fields|text|%
: when used in the select type attribute area, the text will be displayed as the default option in the drop down list and will have a null value. If the attribute is required, the selection of the default will cause the customer to have to select a different option from the list.%prodbuy%, %prodbuy2%
: will add product to basket and send customer to checkout. Quantity added is NOT set to 1 by default. The quantity will be taken from the%prodqtybox| token OR the %hiddenqty|xxx|%
token.%hiddenqty|xxx|%
: will add a hidden tag to pass the quantity xxx (must be three digits, eg. 010) when the product is added to the basket or purchased. Cannot be used with the%prodqtybox| token OR the %prodaddone% or %prodbuyone%
tags (which have a default of quantity 1)
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.
Last update: 2007-04-26 14:01
Author: Support
Revision: 1.3
You cannot comment on this entry
Records in this category
- Prices Displaying Incorrectly
- Displaying Customer IP
- Using Tokens to Evaluate Expressions
- Using OpenUI Tokens
- Adding Additional Product Images
- Hiding Specific Product Prices
- %next% and %previous% Tokens Not Functioning After Changing %prodnameL% Token
- Using Tokens to Add Attributes Automatically
- Adding Borders and Alt Tags to Images
- Displaying Original Price As a Strike-Through If Customer's Price Is Lower
- Adding
- Adding Additional / Alternate Product Images
- Using Tokens To Conditionally Control Text Based on Price or Availability Group
- Displaying Radio Options In Rows
- Displaying Different Attributes (i.e. Colors) in 3 or More Rows
- Using "Add to Basket" AND "Buy One Now" Buttons In The Same Template
- Attributes Not Showing Within Merchant 4.00
- Displaying Related Products As Thumbnails 3 Across
- Using Pop-Up Windows to a Larger Image
- Compatibility With SB's Hi-res Image Module
- Where Can I Find The Latest Tokens?
- Is it possible to modify the contents of the "select" type attibutes?
- I would like to have my attributes display differently within a single product depending on the attribute. For example, I would like the first "select" type attribute to have a default of
- I'm not displaying the attributes on my product page so I'm not using the %attributes% token. However, I want the customer to be prompted to select the attributes when they add the product to their basket, but it isnt' working. How can I do that?
- When I use the code: %begin_if|len(OUI_Products2.d.shortdesc)|% it sometimes shows the short description for some other product.
- Is it possible to display the attribute prompt as the default message for "select" type attributes?
- Can I have a "Email for more info" link on my page which is automatically populated with the product code and name?
- Is it possible to have the module default to showing more than 10 templates at a time?
- I'm running into problems in that some of my tokens are not being processed correctly. For example, I'm trying to do this: %begin_if|%module|modcode:position%|% ... %end_if%but it just generates errors or the %module simply shows up on the page. What could be wrong?
- In the PROD TEMPLATE, is there a way to use tokens in the "Add to Basket alt:"
- I am unable to find tokens for the following fields in the Product Page. Product Display Header: Product Display Footer: Sub-Global Header: Sub-Global Footer:
- How do I conditionally test for the existence of an image on the server (not the image assigned to the product but one I upload myself)?
- I'd like to display my attribute options with their own "add to basket" button. Something like: product1 color1
color2 attribute2 color1 color2 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?
- I would like to control the size of the text and memo fields in my attributes. How?
- I would like to use a token within another token, such as: %begin_if|%module|mymod|1|%|% stuf %end_if% But this isn't working correctly. Why?
- I would like to use the %begin_if|expression|% token to dispaly something if the product has a value in a field stored in the Additional Fields Manager (http://vikingcoders.com/go.mv?ID=DEN_PRODFIELDS). How can I go about it?
- I'm using your Affiliate Manager module and I would like to display some text only if the customer followed a particular affiliate's referral link. How can I do that?
- 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?
- Is there a token I can us to display the fonts as I set them in admin?
- I am attempting to use a token from a third party module in the "Product template" area but it's not working. What might be causing this?
- 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?
- 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?
- I would like to customize the titles for my Product pages. How 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?
- Is it possible to use the OpenUI's tokens in this module's templates?
- Is there any way to introduce additional product images?
- The price of some of my products is determined by the attributes but I don't want to display the 0.00 price for those products. Can I hide the price just for those products?
- I recently changed the %prodnameL% token in the Category Page Templates module with my own html so that I could add an image title:%prodname% However, now the %next% and %previous% tokens aren't working in the Product Page Templates module (i.e. they are not appearing).
- I have a module which shows the price for an attribute automatically in the attribute box (so I don't have to manually code each one). However it doesn't appear to be compatible. Can I do this with the template modules?
- Displaying Attribute Price + Product Price, with a discount
- Can I configure the module so that the Related Products are added to the basket when the main product is added
- Can I configure the module so that I can add a "add all to basket" button for the Related Products so that I can specify a quantity for each and add them all at once?














