uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
LIMIT number of products to max no?

Knowledge Base Lobby : uShop Support Conference : General Questions
Dec-14-17 02:03 PM EST
Original Message
LIMIT number of products to max no?
Author Gary Torello on 04-01-2002 at 11:16 (EST)
Hi again!

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?

THANKS!

E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: LIMIT number of products to max no? Bill Weiner, 2002-04-02 06:07:17 (1)

Messages In This Discussion
         1. RE: LIMIT number of products to max no?
        Author Bill Weiner on 04-02-2002 at 06:07 (EST)
Here are some steps that could be used to put a maximum limit check on your "Place Order" page:

STEP 1: On your "begin order process" page (or whatever page(s) that you have the "uShopOrderButton" applet on) ... try adding the following JavaScript function:

< SCRIPT LANGUAGE="Javascript" >
function checkQuantity()
{
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).

STEP 2: Also on that page, modify the "BODY" line of the page to call the new JavaScript function via the "onLoad" action.

For example, if your "BODY" line of your HTML page is:

< BODY BGCOLOR="#FFFFFF" >

Then change it to:

< BODY BGCOLOR="#FFFFFF" onLoad="checkQuantity();" >

STEP 3: And finally, on that page, don't forget to add the special "uShopJSI" applet so that the JavaScript can interface with uShop. The uShopJSI applet can usually put at the very bottom of your page with the following HTML:

< APPLET CODE="uShopJSI.class" CODEBASE="../classes/" NAME="uShopJSI" WIDTH="2" HEIGHT="2" >
< /APPLET >


NOTE: If you have any questions about using the uShopJSI applet with uShop or with just interfacing JavaScript with uShop, please refer to the "JavaScript Examples" in the uShop Applet Reference:

http://www.uburst.com/uShop/applets.html

Or the uShop Programmer's Guide:

http://www.uburst.com/uShop/reference/programmers_guide.html
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.