Miva Merchant 5 Module FAQs » Inventory Manager 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?

NOTE: in the latest versions of the module (updating is always a good idea) this is best accomplished using the values set by the module in the l.all_settings and l.settings variable (i.e. it now uses the same approach as Merchant itself). Details can be found in this FAQ on the subject:
Displaying and Controlling the Inventory Data

To get this functionality, use the token/item:

<mvt:item name="BROK_INVENTORY" param="define_variable" />

This will define a global variable consisting of:


You can then test the variable's values such as:

<mvt:if expr="g.BROK_INVENTORY:level EQ '3'">
the level is 3

or display a value with:


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">


in the "Basket Contents" template field of the BASK screen since in that iterator a specific product is being handled.

Last update: 2009-07-17 11:51
Author: Thor
Revision: 1.2

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