Additional Features
You can insert variables into the warning message text in the resource files:
{0} Will be replaced the selected quantity.
{1} Will be replaced by the available stock.
{2} Will be replaced by the product’s description.
For example, the following message:
“You are trying to order {0} copies of {2}, but only {1} are available in stock.”
would appear to the user as:
“You are trying to order 250 copies of Spring Catalogue, but only 100 are available in stock.”
Additionally you can create a non-editable printing option called “AvailableStock” to be able to show the stock level to a user outside of the warning message. The name of this field is case sensitive and has no space.