Miva Merchant 4 Module FAQs » Category Page Templates (BROK_CTGYTEMPLATES)


Is it possible to display a product which is randomly selected from a category?

(2004/02/27)Yes. I have added the token %catprod|field|catcode|##|% to the module. It is used in the exact same manner as the token is used in the Storefront Page Templates module (for those familiar with that module as well). And you can look to that module's documentation (http://mikeworks.com/docs/BROK_SFNTTEMPLATE.html) for details. The "field" is the particular data you want to display: name, code, thumbnail, price, etc. The "catcode" is the code of the category from which you want to randomly pick a product, and "##" is a number 01-99 which relates that token to other tokens. So all %catprod tokens numbered 01 will display the information for the same randomly selected product.

The token can be used in the template's "main template" and also "subcategory" fields. So you could put it in the "subcategory main template" to display a product randomly selected from the subcategories listed. The %catprod token is processed after the regular tokens so you can use the %catcode% token IN the %catprod token to dynamically change the category:


would display the name and code of a product randomly selected from the currently "pointed to" category. If you put it into the "subcategory main template" that would be the sub-category who's data is being displayed, so it would display info on a product randomly selected from that subcategory.

Last update: 2004-12-08 13:47
Author: Support
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Records in this category