I'm playing with the script for a second possible application.. It will be used to browse/search, and send in requests for "library materials".. ($0 price items that will then be shipped on loan to a membership base)
is there a way to limit the number of products in this scenario to a maximum of say 5?
Here are some steps that could be used to put a maximum limit check on your "Place Order" page:
var itemCount = document.uShopJSI.getTotalQuantity();
if (itemCount > 5)
alert("Limit 5 per customer.");
< /SCRIPT >
You can put that script pretty much anywhere on the page (it won't be visible).
For example, if your "BODY" line of your HTML page is:
< BODY BGCOLOR="#FFFFFF" >
Then change it to:
< BODY BGCOLOR="#FFFFFF" onLoad="checkQuantity();" >
< APPLET CODE="uShopJSI.class" CODEBASE="../classes/" NAME="uShopJSI" WIDTH="2" HEIGHT="2" >
< /APPLET >
Or the uShop Programmer's Guide: