Miva Merchant 5 Module FAQs » Inventory Manger 5.x


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

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

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry