Miva Merchant 4 Module FAQs » Storefront Template (BROK_SFNTTEMPLATE)


Using %random Token to Pass Data to a Third Party Module Using %module|

How can I pass the product code (or any other data) from a randomly selected product (using the %random token) to a third party module using the %module| token?

The Storefront Template has been tweaked up a bit to permit this in (version 4.16c compiled, version 4.11 uncompiled).

This version fixes a few bugs in the display/processing of third party tokens. It also adds a new third party token structure:

%modules2|module code|position|%

This token works exactly like the %modules| token and calls the same function in the third party module but it is processed last. So you can use other tokens within this token to represent product codes, etc.

For example, in my testing, I used the token:


to pass a the product code of a random product to the third party module. So, the token %random|code|01|% is processed first and replaced with the product code, then at the end, the %module2 token itself is processed. Note that %module| tokens continue to be processed first, before any other tokens (this permits your module to insert tokens into the template which will later be processed.

Last update: 2003-07-30 22:39
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