When I attempt to add a product with insufficient inventory or when I try to increase the quantity of a product in the basket past the available inventory the page simply refreshes. How can I display a message to the user about what happened?
The module stores the inventory message in the variable g.InventoryMessage. The inventory message can be displayed with the token:
%var|g.InventoryMessage|%
and conditionally displayed with the conditional:
%begin_if|len('%var|g.InventoryMessage|%')|%
%var|g.InventoryMessage|%>
%end_if%
This won't display anything unless you attempt to increase the quantity past the available inventory or attempt to add a product to the basket which is out of stock. The message itself (the value stored in g.InventoryMessage) is not currently configurable but you don't have to display it and could instead do something like:
%begin_if|len('%var|g.InventoryMessage|%')|%
There is insufficient inventory on hand to add that product or change the quantity
%end_if%
Last update: 2007-11-16 14:20
Author: Thor
Revision: 1.1
You cannot comment on this entry
Most Recent FAQ Entries: 
- Alternate ways to display the product and attribute data ... (2008-09-02 18:40)
- Adding both "Add All to Basket" and "Add to ... (2008-09-01 09:46)
- When adding a product to the basket from an ... (2008-08-27 19:02)
- 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)
Top 10 
- 2939 views:
Adding Tokens to Evaluate Expressions - 2866 views:
Is there a way to "Limit" the number of ... - 2791 views:
Why won't you call me for technical support? I ... - 2678 views:
Are license keys valid for more than one store? ... - 2577 views:
I'm trying to enter a license key and get ... - 2566 views:
How do I install a module? - 2409 views:
How do I check for a module upgrade? - 2372 views:
How can display and change the parameters of an ... - 2217 views:
The total on my checkout pages are not correct. ... - 2016 views:
I have select and radio type attributes in my ...
















