{docurl}
No Categories found.
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
The component tokens discussed in the Inventory Manager documeantation should work in the "Product Attribute Template".
Say you want to modify the attribute template so out of stock "select" type options are not displayed in the drop-down boxes displayed on the product page (the PROD screen). To accomplish this you would modify the "Product Attribute Template" of the "Product Display" page template.
In that template you'll find the html/code that displays the "select" type attributes:
<select name="Product_Attributes[&mvt:attribute:index;]:value">
<mvt:foreach iterator="option" array="attribute:options">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR ( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<option value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
<mvt:else>
<option value="&mvte:option:code;">&mvte:option:prompt;</option>
</mvt:if>
</mvt:foreach>
</select>
To make the display of the options dependent on their current inventory level you would add the token & conditional above and around the dispaly of the options:
<select name="Product_Attributes[&mvt:attribute:index;]:value">
<mvt:foreach iterator="option" array="attribute:options">
<mvt:item name="BROK_INVENTORY" param="attr_display" />
<mvt:if expr="g.BROK_INVENTORY:attr_display">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR ( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<option value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
<mvt:else>
<option value="&mvte:option:code;">&mvte:option:prompt;</option>
</mvt:if>
</mvt:if>
</mvt:foreach>
</select>
If you have any particular questions about the token usage open a ticket in our help desk at http:///www.vikingcoders.com/helpdesk/ and we'll be happy to help.
Last update: 2010-02-08 20:53
Author: Michael Brock
Revision: 1.2
You cannot comment on this entry
Records in this category
- Inventory Manager is not reducing the inventory count when customers add products to their basket. Why?
- Runtime error when performing an import: Array index must be positive integer
- How can I display an inventory "status" message in the basket (either on the BASK screen or during checkout) so that customers can see if the product is back-ordered?
- I would like to conditionally display something for a product but only if the current level is '3'. How do I do this?
- Using the module's tokens inside of the "Product Attribute Display" field
- Displaying and controlling the inventory data














