uShopOrderDeluxeCGI.class
The uShopOrderDeluxeCGI applet is an order form which collects the
customer's personal and payment information and then securely sends the
information to your secure server. To use this applet, you must have
configured the ushop_cgiscript.pl in your cgi directory on your secure server.
NEW This applet has a section that allows the customer to
specify a different shipping address. Also, like the uShopOrderCustomCGI
applet, this applet allows you to customize the labels on a few of the fields.
See also ushop_cgiscript.pl.
In addition, this applet also allows you to setup shipping, tax, and payment
options as described below.
Parameters
- scriptpath - The full path to the ushop_cgiscript.pl on your server. Example:
"http://www.mystore.com/cgi-bin/ushop_cgiscript.pl".
- payment - This parameter lets you specify a list of payment methods that
you accept. Separate each method with a comma. Example: "Visa,
Master Card, Discover, COD" would allow customers to choose
to pay by Visa, Master Card, Discover, or COD.
- validate - This parameter lets you specify whether you want to let uShop
validate the credit card information before sending the order.
uShop has the ability to validate credit card numbers by verifying
the number of digits, checking the prefix, and performing a mod 10
checksum check on the card numbers. Supported credit card types
are MasterCard, Visa, Amex, Diners Club/Carte Blanche, Discover,
enRoute, and JCB. Set this parameter to "YES" is you want to
validate the card numbers. Otherwise, set this parameter to "NO".
The default value is "NO".
- taxrate - The default tax rate. Specify this as a value 0.00 through 1.00
(ie. "0.06" or "0.07") - DO NOT use a percent (%) sign.
- taxtable - This parameter allows you to override the default tax rate for
customers from specified states. That is, in this parameter you
can specify special tax rates for specific states. The format
should be "<state>=<taxrate>,<state>=<taxrate>,...". You can
specify as many states as you want. Example: "FL=0.06,FLORIDA=0.06,
TX=0.07,TEXAS=0.07" would charge customers from Florida and Texas
tax rates of 6% and 7%, respectively.
- shipping - This parameter allows you to specify what shipping methods are
available and how to calculate the shipping for each method. See
the page on shipping setup
for additional information on setting up Shipping.
- handling - This parameter allows you to specify a default handling fee that
will be added to all orders. Example: "$2.00" would charge
customers an additional $2.00 per order.
- handlingtable - This parameter allows you to override the default handling
rate for customers from specified countries. That is, in this
parameter you can specify special handling fees for specific
countries. The format should be "<country>=<handlingfee>,
<country>=<handlingfee>,...". You can specify as many countries
as you want. Example: "USA=$1.00,United States=$1.00,U.S.A.=$1.00,
US=$1.00,CANADA=$1.00" would charge customers who live in the US
or Canada a $1.00 handling fee.
- message - An optional message that will be included on the bottom of the
order receipt that is sent to the customer.
- return_url - This parameter lets you specify a URL to be used as a "BACK" link
on the order receipt page. That is, if you specify a full URL here,
uShop will add a "BACK" link on the bottom of the order receipt page
to link to the specified URL. Example: "http://www.uburst.com".
- thankyou_url - Instead of letting uShop create an order receipt page after an
order is placed, this parameter lets you specify a URL of a custom
thankyou page (or any web page) that you want to appear after an
order is place. Example: "http://www.uburst.com".
- label1 - The label to appear by the first text entry box. You can specify
any label you want such as "First Name:", "Name:", "Company:", etc.
The default value is "*First Name:".
- label2 - The label to appear by the second text entry box. You can specify
any label you want such as "Last Name:", "Customer ID:", "Company:",
etc. The default value is "*Last Name:".
- clearcart - This parameter specifies whether to clear the shopping cart
and order form after the customer has submitted the order. Valid
values are "YES" or "NO". The default value is "NO".
- background - The background color of the applet. You can specify an
RGB value separated by commas ("integer,integer,integer" where
each integer is a value between 0 and 255) or specify one of
the predefined colors: white, black, lightGray, gray, darkGray,
red, green, blue, yellow, magenta, cyan, pink, and orange. The
default value is "white".
Note: Optional parameters are in italics
Example
In this order form example the first two fields have been configured to ask for the
customer's Name and Customer ID. In addition, the order form has been
setup:
- To send the order information to the ushop_cgiscript located in our cgi-bin directory.
- To accept Visa, Master Card, Discover, and American Express payment methods.
- NOT to validate credit card numbers.
- To charge no tax, except for customers from Florida - who are charged 6% sales tax.
- To allow 3 shipping methods: UPS based on subtotal, FED EX based on total weight, and
Over Night at a flat rate of $50.00.
- To charge no handling fees for customers in the US and a $5.00 handling fee for
customers outside the US.
- To add the message "Thank you for shopping with us." to all order receipts.
- To add a BACK link to "http://www.uburst.com" on the order receipt page.
- NOT to clear the shopping cart when the order is place.
- And to have a light gray background color.
<APPLET CODE = "uShopOrderDeluxeCGI.class" WIDTH=450 HEIGHT=790>
<PARAM NAME=scriptpath VALUE="http://www.uburst.com/cgi-bin/ushop_cgiscript1p3.pl">
<PARAM NAME=payment VALUE="Visa,Master Card,Discover,American Express">
<PARAM NAME=taxrate VALUE="0.00">
<PARAM NAME=taxtable VALUE="FL=0.06,FLORIDA=0.06">
<PARAM NAME=shipping VALUE="UPS,BY_SUBTOTAL,20=$5.00,35=$7.00,50=$10.00,$15.00;
FED EX,BY_WEIGHT,10=$5.00,20=$10.00,$25.00;
Over Night,FLAT_RATE,$50.00">
<PARAM NAME=handling VALUE="$5.00">
<PARAM NAME=handlingtable VALUE="US=$0.00,USA=$0.00,U.S.=$0.00,U.S.A.=$0.00,United States=$0.00">
<PARAM NAME=message VALUE="Thank you for shopping with us.">
<PARAM NAME=return_url VALUE="http://www.uburst.com">
<PARAM NAME=clearcart VALUE="NO">
<PARAM NAME=label1 VALUE="*Name: ">
<PARAM NAME=label2 VALUE="*Customer ID: ">
<PARAM NAME=validate VALUE="NO">
<PARAM NAME=background VALUE="lightGray">
</APPLET>