The uShopDiscount1 applet provides a means by which to allow
the store owner to offer discounts based on either the subtotal or as
a percentage of the subtotal. By setting the discount "TYPE" to
SUBTOTAL, the storeowner can offer discounts such as "$20 off purchases
of $100 or more" or even "$10 on purchases up to $75 and $25 for puchases
over $75". By setting the discount "TYPE" to PERCENT, the storeowner
can offer discounts such as "Everything is 25% Off!".
Note that this applet requires no input on the part of the customer - just put
the applet (which will appear as any image you want) on the page and
when the customer views it, the discount will take effect.
Note that the "discount" field will not appear in the (large) shopping cart
until the discount value is greater than zero. This means that if the discount
is set to something like "$100=$20" ($20 off purchases of $100 or more), for
example, then the discount line will not appear in the shopping cart until
the customer orders $100 worth of items.
Note: The WIDTH and HEIGHT of the applet should match the size of the image that you specify.
- image - The image to be displayed on the page - typically a .gif or .jpg
advertising the discount. This parameter can be
specified as the full URL to the image or as the path relative to
where the .class files are located. If the image is in the same
directory as the .class files, then you can just specify the image
- type - The type of discount. This can be either "SUBTOTAL" or "PERCENT".
Set this parameter to "SUBTOTAL" if you want to setup a discount table
based on the subtotal. Set this parameter to "PERCENT" if you want
to specify a flat percentage discount. (This parameter is used
in correlation to the rate parameter below).
- rate - The rate or discount table.
- If the type parameter is specified as "SUBTOTAL", then this
rate parameter can be used to setup a discount table based on the
subtotal. The format of the table is subtotal1=discount1,
subtotal2=discount2,subtotal3=discount3,.... For example:
"$100=$20,$250=$50" which is interpeted as "purchases that totol $100
or more will get a $20 discount and purchases that total $250 or more
will get a $50 discount.
You can specify up to 20 subtotal=discount rates - just separate each
one with a comma.
- If the type parameter is specified as "PERCENT", then this
rate parameter simply specifies the "Percent Off". Such as "25%" or
"50%". The percent sign is optional.
<APPLET CODE = "uShopDiscount1.class" WIDTH=205 HEIGHT=190>
<PARAM NAME=image VALUE="example_discount.gif">
<PARAM NAME=type VALUE="SUBTOTAL">
<PARAM NAME=rate VALUE="$100=$20">