Miva Merchant 4 Module FAQs » Inventory Manager (BROK_INVENTORY)


{docurl}

Is it possible to display the inventory message for attributes? Most notably, for "select" and "Radio" type attributes? Is there any way to not display the attribute if it is out of stock?

(2004/10/25)The latest version of the Inventory Manager provides this functionality. You can now display a message, right after the usual prompt, regarding the inventory. Each notification level has an "attribute message" field in which you can configure a field specifically for that notificaton level to display for the attributes (so if the tracked attribute is at that level, that message will be displayed after the attribute prompt).

You can use the same tokens in the "attribute message" field (and the "short message" and "long message" fields) as you can in the "setup" fields on the "displaying inventory" tab (see the documentation for a list).

The most notable is %inv_count% to display the inventory count.

The "attribute message" is displayed only if the tracked item is at that particular level obviously, but by default, the Inventory Manager doesn't have a level which applies to "in stock" items. To work around this, create a new "Notification level" for in stock products. I named mine "In Stock". Set a very high cutoff (say 999999) so that the tracked items count will always fall under it's cutoff. Then assign this level to the tracked items. So any tracked item in your store which doesn't fall into one of the other levels will be in the "in stock" level. You can then configure an "attribute message" (such as "(%inv_count% in stock)") to use for that notification level.

If you are using the Template modules (eg. http://vikingcoders.com/go.mv?ID=BROK_PRODTEMPLATES) to display your product pages, then you can display this "attribute message" with a token in the form (assuming that you have registered the Inventory Manager w/ the token "BROK_INVENTORY):

%module1|BROK_INVENTORY|attr_message|%

Similarly, there is a new token:

%module1|BROK_INVENTORY|tracking|%

which returns 1 if the attribute (or product) inventory is being tracked and otherwise returns 0. You can use this in a conditioanl such as:

%begin_if|%module|BROK_INVENTORY|tracking|%|%
%prompt%%module1|BROK_INVENTORY|attr_message|%
%else
%prompt%
%end_if%

You can suppress the display of the attribute displayed by the attribute module by adding around the contents of the attribute field, the conditional token:

%begin_if|%module1|BROK_INVENTORY|permit_display|%|%

%end_if%

For attributes with option fields, such as "radio" and "select", you would place this conditional around the prompt field. So in the default field for "select" options, the whole contents would be:

%begin_if|%module1|BROK_INVENTORY|permit_display|%|%
%prompt%
%end_if%

and w/ the token to display the "attribute message":

%begin_if|%module1|BROK_INVENTORY|permit_display|%|%
%prompt%%module1|BROK_INVENTORY|attr_message|%
%end_if%



Last update: 2005-01-12 09:10
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