Not sure if I will get a response as this thread is a little old. But Jim I have set it to run as you stated for the Pro version. It works for the most part, however with one small glitch.
- Code: Select all
[-- IF PRODUCT.QuantityOnHand "0" --]
<span style="color:red; font-size:16px;">Out of Stock</span>
[-- ELSE --]
<input type="image" name="Submit" src="[-- VAR.MyImages --]/images/btnAddToCartMi.gif" id="btnAddToCartMi">
[-- END_IF --]
This was the following code I used however once the quantity on hand reaches the the low stock threshold it will show it out of stock. Obviously we can set that to 0 as well and it would work perfectly, but we have no warning of the item being low before it's out of stock.
An example in case you don't understand what I'm saying. We have 10 widgets in stock and the low stock threshold is 5 and out of stock is 0. We sell 5 and meet the low stock threshold. It then marks the item out of stock even though we still have 5 in stock.
Should I be testing the quantity on hand in a different way such as comparing it to the out of stock quantity. If so would you happen to know the code i would use to compare the two.