Applet: uShopDiscount2

The uShopDiscount2 applet provides the means by which you specify a percent discount for all items with a given classification. This allows you to setup such discounts as:

"Save 10% on all Music CDs
and Save 15% on all DVDs!"

Note that the discounts setup by this applet will not take effect until the customer views a page with this applet on it and then adds and item with one of the discounted classifications. So for this reason, it is recommended that you put this applet on one of your store's main entrance pages or in the same frame as the small shopping cart applet... so that the discount can be registered as soon as possible.


<APPLET CODE="uShopDiscount2.class" CODEBASE="../classes/" WIDTH=161 HEIGHT=66>
<PARAM NAME="image"                 VALUE="example_discount2.gif">
<PARAM NAME="discount_table"        VALUE="MUSICCD=10%">


Name Description
codebase This parameter is actually part of the <APPLET> tag and therefore should be specified on the first line of the Applet (see example). It allows you to specify the location of this applet's class file. The recommended value is "../classes/". See codebase for more information.
discount_table The discount table that will be applied. The format of this table is classification1=discount1, classification2=discount2, and so on...where each classification=discount combination is separated by a comma and the discount is given as a percent. For example, supposed you wanted to setup the following classification discount table:

10% discount for all items with a classification of "MUSICCD" 15% discount for all items with a classification of "DVD" 20% discount for all items with a classification of "GAME"

To do this, you would set the "discount_table" to:


Note that the "classification" of each item in your store can be set via the "classification" parameter of each input applet.
image This parameter allows you to specify the image that the applet will appear as. Note that due to the security restrictions built into IE, when loading any image by an applet, the image must be located in the same directory as the applet's class file. So be sure that the image that you specify here is located in your "classes" directory. Note that for this applet, you do not have to specify any image at all here - but rather, you can make this applet virtually invisible by setting the WIDTH and HEIGHT to 2 x 2.
link If desired, this parameter allows you to make this applet a link to any other page. This is sometimes desireable if the applet is on a special "Enter Store" page - in which case, you can make this applet a link to a page inside your store. The format of this parameter is simply the name (and relative path) to the page that you want to link to. If you do not want this applet to be a link, simply leave this parameter blank or set it to "NONE".
target If this applet is also configured to be a link, then this parameter allows you to specify the "target" page for the link. The default value of this parameter is "".