I would like to conditionally display something for a product but only if the current level is '3'. How do I do this?
To get this functionality, use the token/item:
<mvt:item name="BROK_INVENTORY" param="define_variable" />
This will define a global variable consisting of:
g.BROK_INVENTORY:tracking
g.BROK_INVENTORY:product_id
g.BROK_INVENTORY:attr_string
g.BROK_INVENTORY:error
g.BROK_INVENTORY:count
g.BROK_INVENTORY:level
g.BROK_INVENTORY:level_name
g.BROK_INVENTORY:short_message
g.BROK_INVENTORY:long_message
g.BROK_INVENTORY:attr_message
g.BROK_INVENTORY:permit_sale
g.BROK_INVENTORY:permit_display
You can then test the variable's values such as:
<mvt:if expr="g.BROK_INVENTORY:level EQ '3'">
the level is 3
</mvt:if>
or display a value with:
&mvt:global:BROK_INVENTORY:level_name;
which will display the current level's name.
Keep in mind that you'll need to use the item
<mvt:item name="BROK_INVENTORY" param="define_variable" />
at a point in the template where an individual product's information is being displayed. For example, it won't be properly defined in the global header and footer (at least not consistently) but could be used inside the:
<mvt:foreach iterator="item" array="basket:items">
</mvt:foreach>
in the "Basket Contents" template field of the BASK screen since in that iterator a specific product is being handled.
Last update: 2008-07-03 17:37
Author: Thor
Revision: 1.1
You cannot comment on this entry
Most Recent FAQ Entries: 
- I have the module configured to add the key ... (2008-08-13 14:50)
- What is the format for the htaccess file if ... (2008-08-12 14:50)
- Is there any way to look up a customer's ... (2008-08-06 18:04)
- I am looking for a module that will allow ... (2008-08-06 18:00)
- Is it possible to display a link in Phone ... (2008-08-06 12:05)
Top 10 
- 2754 views:
Adding Tokens to Evaluate Expressions - 2697 views:
Is there a way to "Limit" the number of ... - 2654 views:
Why won't you call me for technical support? I ... - 2549 views:
Are license keys valid for more than one store? ... - 2447 views:
I'm trying to enter a license key and get ... - 2425 views:
How do I install a module? - 2286 views:
How do I check for a module upgrade? - 2254 views:
How can display and change the parameters of an ... - 2097 views:
The total on my checkout pages are not correct. ... - 1932 views:
I have select and radio type attributes in my ...
















