Last Update: November 29, 2000


Copyright (c) 1999 - 2000; Microburst Technologies, Inc.
All Rights Reserved.








1. Introduction
This Tutorial is designed to help you get familiar with using the uCatalogTM applets to create an Interactive CD-ROM Catalog. Step by step, it will take you through the process of creating the catalog pages and configuring the order process. It's perfect for people wanting to get familiar with uCatalogTM or for those just wanting to get familiar with using Java Applets on web pages in general.


2. Tutorial Setup
Upon installing uCatalogTM on your local computer, you should have a directory structure setup that is similar to that displayed in the figure below.



Figure 1. Initial Directory Structure


For this tutorial, you will only be using files in the following three directories:
  1. classes - This directory contains all of the uCatalogTM class files and the uCatalogTM template files.
  2. images - This directory contains a few images that the tutorial uses.
  3. tutorial - This directory is the main directory where you will be creating the catalog pages for this tutorial.
Throughout this tutorial, you will primarily be working with the files located in the "tutorial" directory. The files contained in this directory are listed in Figure 2 and described below.



Figure 2. "tutorial" Directory Contents


  1. index.html - This is the "entrance" page to the tutorial's example CD-ROM catalog. We will be using it later for the special uCatalogTM initialization applet.
  2. tutorial_main.html - This is the main HTML page that handles setting up the frame-layout of the tutorial's catalog. The layout of the tutorial's example store will have two frames - A small frame on the left that will contain links to your catalog pages and a larger frame on the right into which the actual catalog pages will be displayed.
  3. tutorial_contents.html - This is the page that appears in the left frame. It contains links to the other pages and will also contain a small shopping cart applet.
  4. tutorial_welcome.html - This page is the first page to appear in the right frame. It contains a little "Welcome To My CD-ROM Catalog" information.
  5. tutorial_page1.html - This page will contain some product information and some uCatalogTM input applets.
  6. tutorial_page2.html - This page will contain some more product information and some more uCatalogTM input applets.
  7. tutorial_shoppingcart - This page will contain a large version of the uCatalogTM shopping cart applet.
  8. tutorial_orderform - This page will contain a special "order button" applet that is used to initiate the ordering process.

3. Getting Familiar With The Example Catalog Layout

STEP 1 - In order to get familiar with the layout of this tutorial's example catalog, start up your browser and open the file "index.html" that is located in your "tutorial" directory. (The "tutorial" directory was created when you unzipped/installed uCatalogTM on your computer). After the "index.html" file is opened and displayed in your browser, select "Enter" and then spend a few moments browsing the pages in the example catalog by selecting the links in the left frame.

Note that for this tutorial, we chose to keep the pages very basic. We also chose to layout the catalog using two frames. The small frame on the left will serve as a navigation menu with links to all of the catalog's web pages. This small frame will also contain a small shopping cart applet which is very popular and allows customers to see a simple list of the products that are in their shopping cart. The larger frame on the right will be used to display all of the catalog's product pages, a larger more detailed view of the shopping cart, and the form used to place the order.

Also, note that when designing your catalog, you do not have to use this frame layout. If fact, you do not have to use frames at all! You can design your catalog's web pages however you like using any HTML editor that you like.

And finally, note that at this point No uCatalog Applets have been used yet!. All of these example pages are just standard HTML. We will begin adding the uCatalogTM Applets in the next step.



4. Adding A Small Shopping Cart Applet
The steps in this section show how to add a small shopping cart applet to the left frame of the catalog.

STEP 2 - Using your favorite HTML editor, open up the file "tutorial_contents.html" for editing. If you do not have an HTML editor, any simple text editor will do (such as Note Pad).


STEP 3 - To add the small shopping cart applet to this page, locate the following line of HTML code:
<BR>(The Small Shopping Cart applet will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogCart2.class" CODEBASE="../classes/" WIDTH=160 HEIGHT=185>
<PARAM NAME="COLUMNS_NAME"               VALUE="16">
<PARAM NAME="COLUMNS_PRICE"              VALUE="10">
<PARAM NAME="SHOW_REMOVE_BUTTON"         VALUE="NO">
<PARAM NAME="LIST_FONT_SIZE"             VALUE="10">
<PARAM NAME="LIST_TEXT_COLOR"            VALUE="#000000">
<PARAM NAME="LIST_BACKGROUND_COLOR"      VALUE="#FFFFFF">
<PARAM NAME="BACKGROUND_COLOR"           VALUE="#8450CB">
</APPLET>


STEP 4 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice that there is now a small shopping cart applet in the top of the left frame. How did we do this? We used the standard HTML syntax to add an applet called "uCatalogCart2.class" to the page.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogCart2.class" CODEBASE="../classes/" WIDTH=160 HEIGHT=185>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogCart2.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=160" and "HEIGHT=185" settings indicate to make the applet 160 pixels wide and 185 pixels high.

<PARAM NAME="COLUMNS_NAME" VALUE="16">

This line specifies a value of 16 for the "COLUMNS_NAME" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_NAME" parameter allows you to specify the number of columns (i.e., characters) used for the NAME field in the shopping cart. In this case, the first 16 characters of the product's name will be displayed in the small shopping cart applet.

<PARAM NAME="COLUMNS_PRICE" VALUE="10">

This line specifies a value of 10 for the "COLUMNS_PRICE" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_PRICE" parameter allows you to specify the number of columns (i.e., characters) used for the PRICE field in the shopping cart. In this case, the first 10 characters of the product's price will be displayed in the small shopping cart applet.

<PARAM NAME="SHOW_REMOVE_BUTTON" VALUE="NO">

This line specifies a value of "NO" for the "SHOW_REMOVE_BUTTON" parameter. As defined in the uCatalogTM Applet Reference, the "SHOW_REMOVE_BUTTON" parameter allows you to specify whether to display a "Remove" button on this small shopping cart. Since this is parameter is set to "NO", the "Remove" button is NOT displayed.

<PARAM NAME="LIST_FONT_SIZE" VALUE="10">

This line specifies a value of 10 for the "LIST_FONT_SIZE" parameter. As defined in the uCatalogTM Applet Reference, the "LIST_FONT_SIZE" parameter allows you to specify the font size of this small shopping cart. In this case, a font size of 10 is used.

<PARAM NAME="LIST_TEXT_COLOR" VALUE="#000000">

This line specifies a value of "#000000" for the "LIST_TEXT_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "LIST_TEXT_COLOR" parameter allows you to specify the color of the text shown in this small shopping cart. In this case, a font color of #000000 (black) is used.

<PARAM NAME="LIST_BACKGROUND_COLOR" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "LIST_BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "LIST_BACKGROUND_COLOR" parameter allows you to specify the color of the background behind the text in the small shopping cart. In this case, the background color of the shopping cart list is set to #FFFFFF (white).

<PARAM NAME="BACKGROUND_COLOR" VALUE="#8450CB">

This line specifies a value of "#8450CB" for the "BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "BACKGROUND_COLOR" parameter allows you to specify the color of the background of the applet, in general. In this case, the background color of the applet is set to #8450CB in order to match the background color of the HTML page.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.

Note: As you have seen while adding this shopping cart applet to the HTML page, all of uCatalog's applets will have a variety of parameters to let you customize them for your catalog's needs. You can get a complete list and description of all of uCatalog's applets and applet parameters by looking through the uCatalogTM Applet Reference.

STEP 5 - We are now done editing the file "tutorial_contents.html", so you can close that file.



5. Adding Your First Input Applet
The steps in this section show how to add an input applet to your catalog. uCatalogTM Input Applets provide the means by which customers can select items and "Add" them to the virtual shopping cart.

STEP 6 - Using your favorite HTML editor, open up the file "tutorial_page1.html" for editing. If you do not have an HTML editor, any simple text editor will do (such as Note Pad).


STEP 7 - To add an Input Applet for a bookcase, locate the following line of HTML code:
(The Input Applet for product 1 will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogInput1.class" CODEBASE="../classes/" WIDTH=100 HEIGHT=30>
<PARAM NAME="id"                 VALUE="P00001">
<PARAM NAME="name"               VALUE="Bookcase">
<PARAM NAME="description"        VALUE="Oak; glass doors; interior lighting">
<PARAM NAME="weight"             VALUE="120">
<PARAM NAME="price"              VALUE="$299.00">
<PARAM NAME="classification"     VALUE="NONE">
<PARAM NAME="shipping_modifier"  VALUE="$0.00">
<PARAM NAME="taxable"            VALUE="YES">
<PARAM NAME="label"              VALUE="Add To Cart">
<PARAM NAME="popup"              VALUE="NO">
</APPLET>


STEP 8 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice by looking at page 1 that there is now an applet for adding the bookcase to the shopping cart. Select the "Add To Cart" button and notice that the product appears in the small shopping cart applet that we added in STEP 3.

Cool, huh? How did we do this? Again we used the standard HTML syntax to add an applet called "uCatalogInput1.class" to the page.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogInput1.class" CODEBASE="../classes/" WIDTH=100 HEIGHT=30>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogInput1.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=100" and "HEIGHT=30" settings indicate to make the applet 100 pixels wide and 30 pixels high.

<PARAM NAME="id" VALUE="P00001">

This line specifies a value of "P00001" for the "id" parameter. As defined in the uCatalogTM Applet Reference, the "id" parameter corresponds to a unique id for the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="name" VALUE="Bookcase">

This line specifies a value of "Bookcase" for the "name" parameter. As defined in the uCatalogTM Applet Reference, the "name" parameter corresponds to the name of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="description" VALUE="Oak; glass doors; interior lighting">

This line specifies a value for the "description" parameter. As defined in the uCatalogTM Applet Reference, the "description" parameter corresponds to a brief description of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="weight" VALUE="120">

This line specifies a value of 120 for the "weight" parameter. As defined in the uCatalogTM Applet Reference, the "weight" parameter corresponds to the weight of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="price" VALUE="$299.00">

This line specifies a value of "$299" for the "price" parameter. As defined in the uCatalogTM Applet Reference, the "price" parameter corresponds to the price of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="classification" VALUE="NONE">

This line specifies a value of "NONE" for the "classification" parameter. As defined in the uCatalogTM Applet Reference, the "classification" parameter corresponds to the classification (if any) of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that the "classification" parameter will normally be set to "NONE" unless you are setting up a price table as described in the uCatalogTM Applet Reference.

<PARAM NAME="shipping_modifier" VALUE="$0.00">

This line specifies a value of "$0.00" for the "shipping_modifier" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_modifier" parameter corresponds to any shipping cost modifiers that are to be associated with the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that typically the "shipping_modifier" parameter will be set to "$0.00"...unless you want to add any extra shipping fee for a particular product. See the description of the "shipping_modifier" parameter in the uCatalogTM Applet Reference for more information.

<PARAM NAME="taxable" VALUE="YES">

This line specifies a value of "YES" for the "taxable" parameter. As defined in the uCatalogTM Applet Reference, the "taxable" parameter corresponds to whether the product is taxable or not. In this case, the product will be taxed since the value is set to "YES" (taxable).

<PARAM NAME="label" VALUE="Add To Cart">

This line specifies a value of "Add To Cart" for the "label" parameter. As defined in the uCatalogTM Applet Reference, the "label" parameter corresponds to the label that will be displayed on the applet's "Add" button. In this case, the label on the button will be displayed as "Add To Cart".

<PARAM NAME="popup" VALUE="NO">

This line specifies a value of "NO" for the "popup" parameter. As defined in the uCatalogTM Applet Reference, the "popup" parameter corresponds to whether or not to display a popup window whenever the "Add" button has been pressed and the item has been added to the virtual shopping cart. In this case, a popup window will NOT be displayed when the "Add" button is pressed.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.


6. Adding An Input Applet With Options
The steps in this section show how to add an input applet that has options from which customers can select.

STEP 10 - The file "tutorial_page1.html" should still be open from the steps in the previous section, so to add an Input Applet for a T-shirt, locate the following line of HTML code:
(The Input Applet for product 2 will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogInput5.class" CODEBASE="../classes/" WIDTH=350 HEIGHT=30>
<PARAM NAME="id"                 VALUE="P00002">
<PARAM NAME="name"               VALUE="T-shirt">
<PARAM NAME="description"        VALUE="Short sleeve, crew-neck">
<PARAM NAME="option1"            VALUE="White,Black,Navy,Grey">
<PARAM NAME="option2"            VALUE="S,M,L,XL">
<PARAM NAME="weight"             VALUE="1">
<PARAM NAME="show_qty"           VALUE="NO">
<PARAM NAME="price"              VALUE="$ 15.00">
<PARAM NAME="classification"     VALUE="NONE">
<PARAM NAME="shipping_modifier"  VALUE="$0.00">
<PARAM NAME="taxable"            VALUE="YES">
<PARAM NAME="popup"              VALUE="NO">
<PARAM NAME="text_color"         VALUE="#000000">
<PARAM NAME="background_color"   VALUE="#FFFFFF">
</APPLET>


STEP 11 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice by looking at page 1 that there is now a new applet for adding the T-shirt to the shopping cart. Select the "Add" button and notice that the product appears in the small shopping cart applet that we added back in STEP 3.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogInput5.class" CODEBASE="../classes/" WIDTH=350 HEIGHT=30>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogInput5.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=350" and "HEIGHT=30" settings indicate to make the applet 350 pixels wide and 30 pixels high.

<PARAM NAME="id" VALUE="P00002">

This line specifies a value of "P00002" for the "id" parameter. As defined in the uCatalogTM Applet Reference, the "id" parameter corresponds to a unique id for the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="name" VALUE="T-shirt">

This line specifies a value of "T-shirt" for the "name" parameter. As defined in the uCatalogTM Applet Reference, the "name" parameter corresponds to the name of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="description" VALUE="Short sleeve, crew-neck">

This line specifies a value for the "description" parameter. As defined in the uCatalogTM Applet Reference, the "description" parameter corresponds to a brief description of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="option1" VALUE="White,Black,Navy,Grey">

This line specifies a list of values for the "option1" parameter. As defined in the uCatalogTM Applet Reference, the "option1" parameter corresponds to a list of options that are available for the product. You can actually specify as many options in this list as you want - each separated by a comma.

<PARAM NAME="option2" VALUE="S,M,L,XL">

This line specifies a list of values for the "option2" parameter. As defined in the uCatalogTM Applet Reference, the "option2" parameter corresponds to a list of options that are available for the product. You can actually specify as many options in this list as you want - each separated by a comma.

<PARAM NAME="weight" VALUE="1">

This line specifies a value of 1 for the "weight" parameter. As defined in the uCatalogTM Applet Reference, the "weight" parameter corresponds to the weight of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="show_qty" VALUE="NO">

This line specifies a value of "NO" for the "show_qty" parameter. As defined in the uCatalogTM Applet Reference, the "show_qty" parameter is used to specify whether or not to display a quantity entry box on the applet. In this case, no quantity entry box is displayed since the value is set to "NO".

<PARAM NAME="price" VALUE="$ 15.00">

This line specifies a value of "$15.00" for the "price" parameter. As defined in the uCatalogTM Applet Reference, the "price" parameter corresponds to the price of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="classification" VALUE="NONE">

This line specifies a value of "NONE" for the "classification" parameter. As defined in the uCatalogTM Applet Reference, the "classification" parameter corresponds to the classification (if any) of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that the "classification" parameter will normally be set to "NONE" unless you are setting up a price table as described in the uCatalogTM Applet Reference.

<PARAM NAME="shipping_modifier" VALUE="$0.00">

This line specifies a value of "$0.00" for the "shipping_modifier" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_modifier" parameter corresponds to any shipping cost modifiers that are to be associated with the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that typically the "shipping_modifier" parameter will be set to "$0.00"...unless you want to add any extra shipping fee for a particular product. See the description of the "shipping_modifier" parameter in the uCatalogTM Applet Reference for more information.

<PARAM NAME="taxable" VALUE="YES">

This line specifies a value of "YES" for the "taxable" parameter. As defined in the uCatalogTM Applet Reference, the "taxable" parameter corresponds to whether the product is taxable or not. In this case, the product will be taxed since the value is set to "YES" (taxable).

<PARAM NAME="popup" VALUE="NO">

This line specifies a value of "NO" for the "popup" parameter. As defined in the uCatalogTM Applet Reference, the "popup" parameter corresponds to whether or not to display a popup window whenever the "Add" button has been pressed and the item has been added to the virtual shopping cart. In this case, a popup window will NOT be displayed when the "Add" button is pressed.

<PARAM NAME="TEXT_COLOR" VALUE="#000000">

This line specifies a value of "#000000" for the "TEXT_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "TEXT_COLOR" parameter allows you to specify the color of the text of the applet. In this case, the text color of the applet is set to #000000 (black).

<PARAM NAME="BACKGROUND_COLOR" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "BACKGROUND_COLOR" parameter allows you to specify the color of the background of the applet, in general. In this case, the background color of the applet is set to #FFFFFF (white) in order to match the background color of the HTML page.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.


7. Adding An Input Applet With Various-Priced Options
The steps in this section show how to add an input applet that has various-priced options from which customers can select.

STEP 12 - The file "tutorial_page1.html" should still be open from the steps in the previous section, so to add an Input Applet for a Necklace, locate the following line of HTML code:
(The Input Applet for product 3 will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogInput4.class" CODEBASE="../classes/" WIDTH=350 HEIGHT=30>
<PARAM NAME="id"                 VALUE="P00003">
<PARAM NAME="name"               VALUE="Necklace">
<PARAM NAME="description"        VALUE="14K; 'No Tangle' chain">
<PARAM NAME="option1"            VALUE="16 inches, 18 inches + $30, 20 inches + $55">
<PARAM NAME="weight"             VALUE="0.5">
<PARAM NAME="show_qty"           VALUE="NO">
<PARAM NAME="price"              VALUE="$ 89.00">
<PARAM NAME="show_price"         VALUE="YES">
<PARAM NAME="classification"     VALUE="NONE">
<PARAM NAME="shipping_modifier"  VALUE="$0.00">
<PARAM NAME="taxable"            VALUE="YES">
<PARAM NAME="popup"              VALUE="NO">
<PARAM NAME="text_color"         VALUE="#000000">
<PARAM NAME="background_color"   VALUE="#FFFFFF">
</APPLET>


STEP 13 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice by looking at page 1 that there is now a third applet for adding a Necklace to the shopping cart. Select various options for the length of the Necklace and notice how the price of the Necklace is automatically changed based on the selected option.

Note that you can do this with any of the "option" parameters simply using the special "+" character to add a value to the base price or by using the special "-" character to subtract a value from the base price. More information below.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogInput4.class" CODEBASE="../classes/" WIDTH=350 HEIGHT=30>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogInput4.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=350" and "HEIGHT=30" settings indicate to make the applet 350 pixels wide and 30 pixels high.

<PARAM NAME="id" VALUE="P00003">

This line specifies a value of "P00003" for the "id" parameter. As defined in the uCatalogTM Applet Reference, the "id" parameter corresponds to a unique id for the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="name" VALUE="Necklace">

This line specifies a value of "Necklace" for the "name" parameter. As defined in the uCatalogTM Applet Reference, the "name" parameter corresponds to the name of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="description" VALUE="14K; 'No Tangle' chain">

This line specifies a value for the "description" parameter. As defined in the uCatalogTM Applet Reference, the "description" parameter corresponds to a brief description of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="option1" VALUE="16 inches, 18 inches + $30, 20 inches + $55">

This line specifies a list of values for the "option1" parameter. As defined in the uCatalogTM Applet Reference, the "option1" parameter corresponds to a list of options that are available for the product. NOTE how the "18 inch" and "20 inch" options have a "+" character associated with them. This is how you can indicate that an option will affect the base price of the product. You can add to the base price of a product by specifying "+" followed by the price modifier. Or you can subtract from the base price of a product by specify "-" followed by the price modifier. In this example, the 16 inch necklace costs the base price, the 18 inch necklace costs the base price + $30, and the 20 inch necklace costs the base price + $55.

<PARAM NAME="weight" VALUE="1">

This line specifies a value of 1 for the "weight" parameter. As defined in the uCatalogTM Applet Reference, the "weight" parameter corresponds to the weight of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="show_qty" VALUE="NO">

This line specifies a value of "NO" for the "show_qty" parameter. As defined in the uCatalogTM Applet Reference, the "show_qty" parameter is used to specify whether or not to display a quantity entry box on the applet. In this case, no quantity entry box is displayed since the value is set to "NO".

<PARAM NAME="price" VALUE="$ 89.00">

This line specifies a value of "$89.00" for the "price" parameter. As defined in the uCatalogTM Applet Reference, the "price" parameter corresponds to the price of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="show_price" VALUE="YES">

This line specifies a value of "YES" for the "show_price" parameter. As defined in the uCatalogTM Applet Reference, the "show_price" parameter is used to specify whether or not to display the price on the applet itself. In this case, we specified the value as "YES" so that the price is displayed and so it is easy to see the price change based on the option selected.

<PARAM NAME="classification" VALUE="NONE">

This line specifies a value of "NONE" for the "classification" parameter. As defined in the uCatalogTM Applet Reference, the "classification" parameter corresponds to the classification (if any) of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that the "classification" parameter will normally be set to "NONE" unless you are setting up a price table as described in the uCatalogTM Applet Reference.

<PARAM NAME="shipping_modifier" VALUE="$0.00">

This line specifies a value of "$0.00" for the "shipping_modifier" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_modifier" parameter corresponds to any shipping cost modifiers that are to be associated with the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that typically the "shipping_modifier" parameter will be set to "$0.00"...unless you want to add any extra shipping fee for a particular product. See the description of the "shipping_modifier" parameter in the uCatalogTM Applet Reference for more information.

<PARAM NAME="taxable" VALUE="YES">

This line specifies a value of "YES" for the "taxable" parameter. As defined in the uCatalogTM Applet Reference, the "taxable" parameter corresponds to whether the product is taxable or not. In this case, the product will be taxed since the value is set to "YES" (taxable).

<PARAM NAME="popup" VALUE="NO">

This line specifies a value of "NO" for the "popup" parameter. As defined in the uCatalogTM Applet Reference, the "popup" parameter corresponds to whether or not to display a popup window whenever the "Add" button has been pressed and the item has been added to the virtual shopping cart. In this case, a popup window will NOT be displayed when the "Add" button is pressed.

<PARAM NAME="TEXT_COLOR" VALUE="#000000">

This line specifies a value of "#000000" for the "TEXT_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "TEXT_COLOR" parameter allows you to specify the color of the text of the applet. In this case, the text color of the applet is set to #000000 (black).

<PARAM NAME="BACKGROUND_COLOR" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "BACKGROUND_COLOR" parameter allows you to specify the color of the background of the applet, in general. In this case, the background color of the applet is set to #FFFFFF (white) in order to match the background color of the HTML page.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.

STEP 14 - We are now done editing the file "tutorial_page1.html", so you can close that file.



8. Adding An Input Applet With A Quantity-Dependent Price
The steps in this section show how to add an input applet whose individual price is based on the quantity specified by the customer.

STEP 15 - Using your favorite HTML editor, open up the file "tutorial_page2.html" for editing. If you do not have an HTML editor, any simple text editor will do (such as Note Pad).


STEP 16 - To add an Input Applet for Golf Balls, locate the following line of HTML code:
(The Input Applet for product 4 will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogInput4.class" CODEBASE="../classes/" WIDTH=300 HEIGHT=30>
<PARAM NAME="id"                 VALUE="P00004">
<PARAM NAME="name"               VALUE="Golf Balls">
<PARAM NAME="description"        VALUE="Precision flight">
<PARAM NAME="option1"            VALUE="white,yellow,blue,red">
<PARAM NAME="weight"             VALUE="0.01">
<PARAM NAME="qty"                VALUE="1">
<PARAM NAME="show_qty"           VALUE="YES">
<PARAM NAME="price"              VALUE="1@$1.00,20@$0.75,50@$0.50">
<PARAM NAME="classification"     VALUE="GOLFBALL">
<PARAM NAME="shipping_modifier"  VALUE="$0.00">
<PARAM NAME="taxable"            VALUE="YES">
<PARAM NAME="popup"              VALUE="NO">
<PARAM NAME="text_color"         VALUE="#000000">
<PARAM NAME="background_color"   VALUE="#FFFFFF">
</APPLET>


STEP 17 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice by looking at page 2 that there is now an applet for adding a Golf Balls to the shopping cart. In order to observe the quantity-price calculations, add a couple golf balls and observe the price is $1.00 each. Then go ahead and add some more golf balls ... so that the total number of golf balls in the shopping cart is between 20 and 50. Observe that the price is now $0.75 each. Finally, add some more golf balls so that the total quantity of golf balls in the cart is greater than 50. Note how the price is now $0.50 each.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogInput4.class" CODEBASE="../classes/" WIDTH=300 HEIGHT=30>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogInput4.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=300" and "HEIGHT=30" settings indicate to make the applet 300 pixels wide and 30 pixels high.

<PARAM NAME="id" VALUE="P00004">

This line specifies a value of "P00004" for the "id" parameter. As defined in the uCatalogTM Applet Reference, the "id" parameter corresponds to a unique id for the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="name" VALUE="Golf Balls">

This line specifies a value of "Golf Balls" for the "name" parameter. As defined in the uCatalogTM Applet Reference, the "name" parameter corresponds to the name of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="description" VALUE="Precision flight">

This line specifies a value for the "description" parameter. As defined in the uCatalogTM Applet Reference, the "description" parameter corresponds to a brief description of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="option1" VALUE="white,yellow,blue,red">

This line specifies a list of values for the "option1" parameter. As defined in the uCatalogTM Applet Reference, the "option1" parameter corresponds to a list of options that are available for the product. You can actually specify as many options in this list as you want - each separated by a comma.

<PARAM NAME="weight" VALUE="0.01">

This line specifies a value of 0.01 for the "weight" parameter. As defined in the uCatalogTM Applet Reference, the "weight" parameter corresponds to the weight of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="qty" VALUE="1">

This line specifies a value of "1" for the "qty" parameter. As defined in the uCatalogTM Applet Reference, the "qty" parameter is the default quantity used when adding an item to the shopping cart. In this case, a value of "1" will be the initial quantity displayed in the quantity entry box.

<PARAM NAME="show_qty" VALUE="YES">

This line specifies a value of "YES" for the "show_qty" parameter. As defined in the uCatalogTM Applet Reference, the "show_qty" parameter is used to specify whether or not to display a quantity entry box on the applet. In this case, a quantity entry box is displayed since the value is set to "YES".

<PARAM NAME="price" VALUE="1@$1.00,20@$0.75,50@$0.50">

This line specifies a price table value as "1@$1.00,20@$0.75,50@$0.50" for the "price" parameter. As defined in the uCatalogTM Applet Reference, the "price" parameter corresponds to the price of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. For this example, the price is actually specified as a price table that is interpreted as:
QUANTITY           PRICE
1 - 19             $1.00 each
20 - 49            $0.75 each
50 or more         $0.50 each
You can specify as many quantity@price combinations as you like in the price table - each separated by a comma.

Note that the total quantity is determined by looking at the current contents of the shopping cart and summing the quantities of all items that have the same "GOLFBALL" classification. The "classification" is described more below.

<PARAM NAME="classification" VALUE="GOLFBALL">

This line specifies a value of "GOLFBALL" for the "classification" parameter. As defined in the uCatalogTM Applet Reference, the "classification" parameter corresponds to the classification (if any) of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. In this case, since we setup a quantity@price table, we gave this product a classification of "GOLFBALL". This way, the quantity@price calculation can be computed based on the total number of golf balls in the cart. That is, if a customer selects 15 blue golf balls and then selects 15 red golf balls, uCatalogTM will be able to look at the current contents of the shopping cart and recognize that the blue and red golf balls have the same classification and therefore will be treated as a total quantity of 30 when determining the price from the quantity@price table.

<PARAM NAME="shipping_modifier" VALUE="$0.00">

This line specifies a value of "$0.00" for the "shipping_modifier" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_modifier" parameter corresponds to any shipping cost modifiers that are to be associated with the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that typically the "shipping_modifier" parameter will be set to "$0.00"...unless you want to add any extra shipping fee for a particular product. See the description of the "shipping_modifier" parameter in the uCatalogTM Applet Reference for more information.

<PARAM NAME="taxable" VALUE="YES">

This line specifies a value of "YES" for the "taxable" parameter. As defined in the uCatalogTM Applet Reference, the "taxable" parameter corresponds to whether the product is taxable or not. In this case, the product will be taxed since the value is set to "YES" (taxable).

<PARAM NAME="popup" VALUE="NO">

This line specifies a value of "NO" for the "popup" parameter. As defined in the uCatalogTM Applet Reference, the "popup" parameter corresponds to whether or not to display a popup window whenever the "Add" button has been pressed and the item has been added to the virtual shopping cart. In this case, a popup window will NOT be displayed when the "Add" button is pressed.

<PARAM NAME="TEXT_COLOR" VALUE="#000000">

This line specifies a value of "#000000" for the "TEXT_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "TEXT_COLOR" parameter allows you to specify the color of the text of the applet. In this case, the text color of the applet is set to #000000 (black).

<PARAM NAME="BACKGROUND_COLOR" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "BACKGROUND_COLOR" parameter allows you to specify the color of the background of the applet, in general. In this case, the background color of the applet is set to #FFFFFF (white) in order to match the background color of the HTML page.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.


9. Adding Yet Another Input Applet
The steps in this section show how to add yet another Input Applet to the example catalog. Note, however, that uCatalogTM comes with a large variety of Input Applets to handle all sorts of options and pricing for your catalog. See the uCatalogTM Applet Reference for a complete list of uCatalog's applets.

STEP 18 - The file "tutorial_page2.html" should still be open from the steps in the previous section, so to add another Input Applet, locate the following line of HTML code:
(The Input Applet for product 5 will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogInput13.class" CODEBASE="../classes/" WIDTH=400 HEIGHT=80>
<PARAM NAME="name"               VALUE="Part">
<PARAM NAME="description"        VALUE="Electronic component">
<PARAM NAME="text_label"         VALUE="Part Number">
<PARAM NAME="weight"             VALUE="0">
<PARAM NAME="qty"                VALUE="1">
<PARAM NAME="show_qty"           VALUE="YES">
<PARAM NAME="min_price"          VALUE="$ 0.00">
<PARAM NAME="show_total"         VALUE="YES">
<PARAM NAME="classification"     VALUE="NONE">
<PARAM NAME="shipping_modifier"  VALUE="$0.00">
<PARAM NAME="taxable"            VALUE="YES">
<PARAM NAME="popup"              VALUE="NO">
<PARAM NAME="text_color"         VALUE="#000000">
<PARAM NAME="background_color"   VALUE="#FFFFFF">
</APPLET>


STEP 19 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice by looking at page 2 that there is now a second applet on the page. This applet is actually a special applet for allowing customers to enter the desired part number, price, and quantity. It can be useful if you do not want to add a separate Input Applet for every item in your catalog.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogInput13.class" CODEBASE="../classes/" WIDTH=400 HEIGHT=80>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogInput13.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=400" and "HEIGHT=80" settings indicate to make the applet 400 pixels wide and 80 pixels high.

<PARAM NAME="name" VALUE="Golf Balls">

This line specifies a value of "Part" for the "name" parameter. As defined in the uCatalogTM Applet Reference, the "name" parameter corresponds to the name of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. (Note that a generic name of "Part" was used here since the customer will actually be entering what part it is.)

<PARAM NAME="description" VALUE="Electronic component">

This line specifies a value for the "description" parameter. As defined in the uCatalogTM Applet Reference, the "description" parameter corresponds to a brief description of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="text_label" VALUE="Part Number">

This line specifies a value of "Part Number" for the "text_label" parameter. As defined in the uCatalogTM Applet Reference, the "text_label" parameter corresponds to the label that will appear next to the Product ID entry box. In this case, the text "Part Number" will appear as the label next to the Product ID entry box.

<PARAM NAME="weight" VALUE="0">

This line specifies a value of 0 for the "weight" parameter. As defined in the uCatalogTM Applet Reference, the "weight" parameter corresponds to the weight of the product that gets added to the shopping cart each time this applet's "Add" button is pressed.

<PARAM NAME="qty" VALUE="1">

This line specifies a value of "1" for the "qty" parameter. As defined in the uCatalogTM Applet Reference, the "qty" parameter is the default quantity used when adding an item to the shopping cart. In this case, a value of "1" will be the initial quantity displayed in the quantity entry box.

<PARAM NAME="show_qty" VALUE="YES">

This line specifies a value of "YES" for the "show_qty" parameter. As defined in the uCatalogTM Applet Reference, the "show_qty" parameter is used to specify whether or not to display a quantity entry box on the applet. In this case, a quantity entry box is displayed since the value is set to "YES".

<PARAM NAME="min_price" VALUE="$ 0.00">

This line specifies a value as "$ 0.00" for the "min_price" parameter. As defined in the uCatalogTM Applet Reference, the "min_price" parameter corresponds to the minimum price that the customer can enter for the product.

<PARAM NAME="show_total" VALUE="YES">

This line specifies a value of "YES" for the "show_total" parameter. As defined in the uCatalogTM Applet Reference, the "show_total" parameter is used to specify whether or not to display the current total based on the price entered and the quantity specified. In this case, the total is displayed since the value is set to "YES".

<PARAM NAME="classification" VALUE="NONE">

This line specifies a value of "NONE" for the "classification" parameter. As defined in the uCatalogTM Applet Reference, the "classification" parameter corresponds to the classification (if any) of the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that the "classification" parameter will normally be set to "NONE" unless you are setting up a price table as described in the uCatalogTM Applet Reference.

<PARAM NAME="shipping_modifier" VALUE="$0.00">

This line specifies a value of "$0.00" for the "shipping_modifier" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_modifier" parameter corresponds to any shipping cost modifiers that are to be associated with the product that gets added to the shopping cart each time this applet's "Add" button is pressed. Note that typically the "shipping_modifier" parameter will be set to "$0.00"...unless you want to add any extra shipping fee for a particular product. See the description of the "shipping_modifier" parameter in the uCatalogTM Applet Reference for more information.

<PARAM NAME="taxable" VALUE="YES">

This line specifies a value of "YES" for the "taxable" parameter. As defined in the uCatalogTM Applet Reference, the "taxable" parameter corresponds to whether the product is taxable or not. In this case, the product will be taxed since the value is set to "YES" (taxable).

<PARAM NAME="popup" VALUE="NO">

This line specifies a value of "NO" for the "popup" parameter. As defined in the uCatalogTM Applet Reference, the "popup" parameter corresponds to whether or not to display a popup window whenever the "Add" button has been pressed and the item has been added to the virtual shopping cart. In this case, a popup window will NOT be displayed when the "Add" button is pressed.

<PARAM NAME="TEXT_COLOR" VALUE="#000000">

This line specifies a value of "#000000" for the "TEXT_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "TEXT_COLOR" parameter allows you to specify the color of the text of the applet. In this case, the text color of the applet is set to #000000 (black).

<PARAM NAME="BACKGROUND_COLOR" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "BACKGROUND_COLOR" parameter allows you to specify the color of the background of the applet, in general. In this case, the background color of the applet is set to #FFFFFF (white) in order to match the background color of the HTML page.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.

STEP 20 - We are now done editing the file "tutorial_page2.html", so you can close that file.



9. Adding A Large Shopping Cart Applet
The steps in this section show how to add a large shopping cart applet to the "View Cart" page..

STEP 21 - Using your favorite HTML editor, open up the file "tutorial_shoppingcart.html" for editing. If you do not have an HTML editor, any simple text editor will do (such as Note Pad).


STEP 22 - To add the large shopping cart applet to this page, locate the following line of HTML code:
(The Large Shopping Cart Applet will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogCart1.class" CODEBASE="../classes/" WIDTH=490 HEIGHT=340>
<PARAM NAME="columns_id"                 VALUE="9">
<PARAM NAME="columns_name"               VALUE="16">
<PARAM NAME="columns_description"        VALUE="25">
<PARAM NAME="columns_weight"             VALUE="0">
<PARAM NAME="columns_quantity"           VALUE="6">
<PARAM NAME="columns_price"              VALUE="10">
<PARAM NAME="show_subtotal"              VALUE="YES">
<PARAM NAME="show_tax"                   VALUE="NO">
<PARAM NAME="show_shipping"              VALUE="NO">
<PARAM NAME="show_total"                 VALUE="NO">
<PARAM NAME="list_font_size"             VALUE="12">
<PARAM NAME="list_text_color"            VALUE="#000000">
<PARAM NAME="list_background_color"      VALUE="#FFFFFF">
<PARAM NAME="background_color"           VALUE="#FFFFFF">
</APPLET>


STEP 23 - Save the file and startup the catalog as we did in STEP 1 of this tutorial. (If your browser is already running, you many need to exit the browser and restart it to reload the newly modified page.)

You will notice that there is now a large shopping cart applet on the "View Cart" page.

Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogCart1.class" CODEBASE="../classes/" WIDTH=490 HEIGHT=340>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogCart1.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=490" and "HEIGHT=340" settings indicate to make the applet 490 pixels wide and 340 pixels high.

<PARAM NAME="columns_id" VALUE="9">

This line specifies a value of 9 for the "COLUMNS_ID" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_ID" parameter allows you to specify the number of columns (i.e., characters) used for the ID field in the shopping cart. In this case, the first 9 characters of the product's name will be displayed in the shopping cart applet.

<PARAM NAME="columns_name" VALUE="16">

This line specifies a value of 16 for the "COLUMNS_NAME" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_NAME" parameter allows you to specify the number of columns (i.e., characters) used for the NAME field in the shopping cart. In this case, the first 16 characters of the product's name will be displayed in the shopping cart applet.

<PARAM NAME="columns_description" VALUE="25">

This line specifies a value of 16 for the "COLUMNS_DESCRIPTION" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_DESCRIPTION" parameter allows you to specify the number of columns (i.e., characters) to display on each line for the DESCRIPTION field in the shopping cart. If the description is longer than the value specified here, then the description will automatically be wrapped to the next line the shopping cart. In this case, every 25 characters of the product's description will be displayed on it's own line in the shopping cart.

<PARAM NAME="columns_weight" VALUE="0">

This line specifies a value of 0 for the "COLUMNS_WEIGHT" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_WEIGHT" parameter allows you to specify the number of columns (i.e., characters) used for the WEIGHT field in the shopping cart. In this case, the weight is actually hidden since the value is set to "0".

<PARAM NAME="columns_quantity" VALUE="6">

This line specifies a value of 6 for the "COLUMNS_QUANTITY" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_QUANTITY" parameter allows you to specify the number of columns (i.e., characters) used for the QUANTITY field in the shopping cart. In this case, the first 6 characters of the product's quantity will be displayed in the shopping cart applet.

<PARAM NAME="columns_price" VALUE="10">

This line specifies a value of 10 for the "COLUMNS_PRICE" parameter. As defined in the uCatalogTM Applet Reference, the "COLUMNS_PRICE" parameter allows you to specify the number of columns (i.e., characters) used for the PRICE field in the shopping cart. In this case, the first 10 characters of the product's price will be displayed in the shopping cart applet.

<PARAM NAME="show_subtotal" VALUE="YES">

This line specifies a value of "YES" for the "SHOW_SUBTOTAL" parameter. As defined in the uCatalogTM Applet Reference, the "SHOW_SUBTOTAL" parameter allows you to specify whether or not to display the subtotal in the shopping cart. Since this is parameter is set to "YES", the subtotal is displayed in the shopping cart.

<PARAM NAME="show_tax" VALUE="NO">

This line specifies a value of "NO" for the "SHOW_TAX" parameter. As defined in the uCatalogTM Applet Reference, the "SHOW_TAX" parameter allows you to specify whether or not to display the tax in the shopping cart. Since this is parameter is set to "NO", the tax is NOT displayed in the shopping cart. NOTE: You will usually want to set this parameter to "NO" since the tax is usually based on where the customer is from - i.e., information that is not known until the customer fills out the order form.

<PARAM NAME="show_shipping" VALUE="NO">

This line specifies a value of "NO" for the "SHOW_SHIPPING" parameter. As defined in the uCatalogTM Applet Reference, the "SHOW_SHIPPING" parameter allows you to specify whether or not to display the shipping in the shopping cart. Since this is parameter is set to "NO", the shipping is NOT displayed in the shopping cart. NOTE: You will usually want to set this parameter to "NO" since the shipping is usually based on where the customer is from - i.e., information that is not known until the customer fills out the order form.

<PARAM NAME="show_total" VALUE="NO">

This line specifies a value of "NO" for the "SHOW_TOTAL" parameter. As defined in the uCatalogTM Applet Reference, the "SHOW_TOTAL" parameter allows you to specify whether or not to display the total in the shopping cart. Since this is parameter is set to "NO", the total is NOT displayed in the shopping cart. NOTE: You will usually want to set this parameter to "NO" since the total is based on the tax and shipping fees which are usually unknown until the customer fills out the order form.

<PARAM NAME="list_font_size" VALUE="12">

This line specifies a value of 12 for the "LIST_FONT_SIZE" parameter. As defined in the uCatalogTM Applet Reference, the "LIST_FONT_SIZE" parameter allows you to specify the font size of this large shopping cart. In this case, a font size of 12 is used.

<PARAM NAME="list_text_color" VALUE="#000000">

This line specifies a value of "#000000" for the "LIST_TEXT_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "LIST_TEXT_COLOR" parameter allows you to specify the color of the text shown in this large shopping cart. In this case, a font color of #000000 (black) is used.

<PARAM NAME="list_background_color" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "LIST_BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "LIST_BACKGROUND_COLOR" parameter allows you to specify the color of the background behind the text in the large shopping cart. In this case, the background color of the shopping cart list is set to #FFFFFF (white).

<PARAM NAME="background_color" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" for the "BACKGROUND_COLOR" parameter. As defined in the uCatalogTM Applet Reference, the "BACKGROUND_COLOR" parameter allows you to specify the color of the background of the applet, in general. In this case, the background color of the applet is set to #FFFFFF (white) in order to match the background color of the HTML page.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.

STEP 24 - We are now done editing the file "tutorial_shoppingcart.html", so you can close that file.



10. Setting Up The Order Process
Setting up the order process for your CD-ROM catalog, involves three main steps/components:
  1. Customizing the order form template (ucatalog_template.html).
  2. Setting up the uCatalogOrderButton applet.
  3. Setting up tax/shipping calculations via the uCatalogInitialize applet.

10.1 ucatalog_template.html

The "ucatalog_template.html" file is a template file for your order form. You can design this form to look almost anyway you want and to contain any fields you want ... using standard HTML. That is, providing you follow just a few simple guidelines, you can setup your order form to look virtually any way you want. For this tutorial, we will just be using the example "ucatalog_template.html" file that is located in the "classes" directory. To see detailed instructions on how to modify or create your own "ucatalog_template.html" file, refer to Section 8 in the uCatalogTM User's Guide.


10.2 uCatalogOrderButton Applet

The uCatalogOrderButton Applet is the means by which customers can initiate the order process. That is, the uCatalogOrderButton Applet will appear as a button (or whatever image you specify) on the "Place Order" page. Once the customer presses that button, the order process is initiated and the order form that you designed via the "ucatalog_template.html" file is displayed. In the next couple steps of this tutorial, we will add the "uCatalogOrderButton1" to the "Place Order" page.

STEP 25 - Using your favorite HTML editor, open up the file "tutorial_orderform.html" for editing. If you do not have an HTML editor, any simple text editor will do (such as Note Pad).


STEP 26 - To add the uCatalogOrderButton1 applet to this page, locate the following line of HTML code:
(The Order Button Applet will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogOrderButton1.class" CODEBASE="../classes/" WIDTH=206 HEIGHT=76>
<PARAM NAME="image"                        VALUE="example_order_button.gif">
<PARAM NAME="color1"                       VALUE="#FFFFFF">
<PARAM NAME="color2"                       VALUE="#0000FF">
<PARAM NAME="order_page_instructions"      VALUE="PLACING YOUR ORDER: To place your order, 
                                                  please fill out the forms below and then 
                                                  press Continue.">
<PARAM NAME="review_page_instructions"     VALUE="REVIEWING YOUR ORDER: Please review your 
                                                  order below and then select whether to save, 
                                                  print, or place your order online.">
<PARAM NAME="print_order_option"           VALUE="YES">
<PARAM NAME="print_button_label"           VALUE="Print Order">
<PARAM NAME="print_button_instructions"    VALUE="Click here to display an order form that 
                                                  can be <B>printed out for phone, fax, or 
                                                  mail orders</B>.">
<PARAM NAME="print_page_instructions"      VALUE="<DIV ALIGN=RIGHT>
                                                    My Company, Inc.<BR>
                                                    123 Main Street<BR>
                                                    Anytown, USA 12345<BR>
                                                    (555) 555-1234<BR>
                                                    Fax (555) 555-5678<BR>">
<PARAM NAME="online_order_option"          VALUE="YES">
<PARAM NAME="online_button_label"          VALUE="Order Online">
<PARAM NAME="online_button_instructions"   VALUE="Click here if you have a connection to the 
                                                  internet and wish to <B>place your order 
                                                  online via our secure server</B>.">
<PARAM NAME="online_order_instructions"    VALUE="Make sure that you are connected to the 
                                                  internet, then press <B>Continue</B>.">
<PARAM NAME="save_order_option"            VALUE="YES">
<PARAM NAME="save_button_label"            VALUE="Save Order">
<PARAM NAME="save_button_instructions"     VALUE="Click here to display an order form that 
                                                  can be <B>saved</B> so that you 
                                                  can print or complete your order online at a 
                                                  later time. <I>(Netscape users only!)</I>">
<PARAM NAME="save_order_instructions"      VALUE="Use your browser to save this HTML page 
                                                  for printing or online ordering at a later time.">
<PARAM NAME="script_url"                   VALUE="https://www.uburst.com/cgi-bin/ucatalog/ucatalog.pl">
</APPLET>


Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogOrderButton1.class" CODEBASE="../classes/" WIDTH=206 HEIGHT=76>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogOrderButton1.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=206" and "HEIGHT=76" settings indicate to make the applet 206 pixels wide and 76 pixels high.

<PARAM NAME="image" VALUE="example_order_button.gif">

This line specifies a value of "example_order_button.gif" for the "image" parameter. As defined in the uCatalogTM Applet Reference, the "image" parameter allows you to specify the image that will be displayed by this applet. In this case, the image "example_order_button.gif" located in the "classes" directory is specified.

<PARAM NAME="color1" VALUE="#FFFFFF">

This line specifies a value of "#FFFFFF" (white) for the "color1" parameter. As defined in the uCatalogTM Applet Reference, the "color1" parameter allows you to specify the default color of the border drawn around the specified image. In this case, a value of "#FFFFFF" is specified to match the background color of the page.

<PARAM NAME="color2" VALUE="#0000FF">

This line specifies a value of "#0000FF" (blue) for the "color2" parameter. As defined in the uCatalogTM Applet Reference, the "color2" parameter allows you to specify the border color when the mouse cursor is on top of this applet. In this case, a value of "#0000FF" (blue) is specified.

<PARAM NAME="order_page_instructions" VALUE="PLACING YOUR ORDER: To place your order, please fill out the forms below and then press Continue.">

This line specifies a value for the "order_page_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "order_page_instructions" parameter allows you to specify the instructions that will be displayed on the initial page of the order process. Note that HTML tags may be used in these instructions.

<PARAM NAME="review_page_instructions" VALUE="REVIEWING YOUR ORDER: Please review your order below and then select whether to save, print, or place your order online.">

This line specifies a value for the "review_page_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "review_page_instructions" parameter allows you to specify the instructions that will be displayed on the "Review Order" page of the order process. Note that HTML tags may be used in these instructions.

<PARAM NAME="print_order_option" VALUE="YES">

This line specifies a value of "YES" for the "print_order_option" parameter. As defined in the uCatalogTM Applet Reference, the "print_order_option" parameter allows you to specify whether or not to provide a "Print Order" option. Since this is parameter is set to "YES", a "Print Order" option will be available.

<PARAM NAME="print_button_label" VALUE="Print Order">

This line specifies a value for the "print_button_label" parameter. As defined in the uCatalogTM Applet Reference, the "print_button_label" parameter allows you to specify the text that will appear on the "Print" button.

<PARAM NAME="print_button_instructions" VALUE="Click here to display an order form that can be <B>printed out for phone, fax, or mail orders</B>.">

This line specifies a value for the "print_button_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "print_button_instructions" parameter allows you to specify the instructions that will be displayed next to the "Print" button on the "Review Order" page.

<PARAM NAME="print_page_instructions" VALUE="<DIV ALIGN=RIGHT> My Company, Inc.<BR> 123 Main Street<BR> Anytown, USA 12345<BR> (555) 555-1234<BR> Fax (555) 555-5678<BR>">

This line specifies a value for the "print_page_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "print_page_instructions" parameter allows you to specify the instructions that will be displayed on the "Print Order" page of the order process. Note that HTML tags may be used in these instructions.

<PARAM NAME="online_order_option" VALUE="YES">

This line specifies a value of "YES" for the "online_order_option" parameter. As defined in the uCatalogTM Applet Reference, the "online_order_option" parameter allows you to specify whether or not to provide a "Order Online" option. Since this is parameter is set to "YES", an "Order Online" option will be available.

<PARAM NAME="online_button_label" VALUE="Order Online">

This line specifies a value for the "online_button_label" parameter. As defined in the uCatalogTM Applet Reference, the "online_button_label" parameter allows you to specify the text that will appear on the "Online Order" button.

<PARAM NAME="online_button_instructions" VALUE="Click here if you have a connection to the internet and wish to <B>place your order online via our secure server</B>.">

This line specifies a value for the "online_button_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "online_button_instructions" parameter allows you to specify the instructions that will be displayed next to the "Online Order" button on the "Review Order" page.

<PARAM NAME="online_order_instructions" VALUE="Make sure that you are connected to the internet, then press <B>Continue</B>.">

This line specifies a value for the "online_order_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "online_order_instructions" parameter allows you to specify the instructions that will be displayed on the "Online Order" page of the order process. Note that HTML tags may be used in these instructions.

<PARAM NAME="save_order_option" VALUE="YES">

This line specifies a value of "YES" for the "save_order_option" parameter. As defined in the uCatalogTM Applet Reference, the "save_order_option" parameter allows you to specify whether or not to provide a "Save Order" option. Since this is parameter is set to "YES", a "Save Order" option will be available.

<PARAM NAME="save_button_label" VALUE="Save Order">

This line specifies a value for the "save_button_label" parameter. As defined in the uCatalogTM Applet Reference, the "save_button_label" parameter allows you to specify the text that will appear on the "Save Order" button.

<PARAM NAME="save_button_instructions" VALUE="Click here to display an order form that can be <B>saved</B> so that you can print or complete your order online at a later time. <I>(Netscape users only!)</I>">

This line specifies a value for the "save_button_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "save_button_instructions" parameter allows you to specify the instructions that will be displayed next to the "Save Order" button on the "Review Order" page.

<PARAM NAME="save_order_instructions" VALUE="Use your browser to save this HTML page for printing or online ordering at a later time.">

This line specifies a value for the "save_page_instructions" parameter. As defined in the uCatalogTM Applet Reference, the "save_page_instructions" parameter allows you to specify the instructions that will be displayed on the "Save Order" page of the order process. Note that HTML tags may be used in these instructions.

<PARAM NAME="script_url" VALUE="https://www.uburst.com/cgi-bin/ucatalog/ucatalog.pl">

This line specifies a value for the "script_url" parameter. As defined in the uCatalogTM Applet Reference, the "script_url" parameter allows you to specify the URL of the script on the secure server that will process online orders. For this example/tutorial, it is set to just link to our website, but if you want to accept online orders, then you will need to set the script up on your server. See the uCatalogTM User's Guide for more information about setting up the ucatalog.pl Perl script on your server.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.

STEP 27 - Save and close the "tutorial_orderform.html" file.


10.3 uCatalogInitialize Applet

The uCatalogInitialize Applet is the means by which you can setup some general settings for your catalog (such as configuring tax and shipping rates) and the means by which other initialization steps can be performed (such as reading your ucatalog_template.html file). Because some of these initialization steps may take some time to be performed (like reading in the ucatalog_template.html file) and because it is often desirable to have the other general preferences take effect as soon as possible, this uCatalogInitialize Applet is often put on the catalog's "entrance" page. In this tutorial, we'll add it to the first page that the customer opens....the "index.html" page.

STEP 28 - Using your favorite HTML editor, open up the file "index.html" for editing. If you do not have an HTML editor, any simple text editor will do (such as Note Pad).


STEP 29 - To add the uCatalogInitialize applet to this page, locate the following line of HTML code:
(The Initialization Applet will go here.)
and replace it with the following lines:
<APPLET CODE="uCatalogInitialize.class" CODEBASE="../classes/" WIDTH=201 HEIGHT=61>
<PARAM NAME="image"                 VALUE="ucatalog_logo.gif">
<PARAM NAME="link"                  VALUE="../tutorial/tutorial_main.html">
<PARAM NAME="cart_font"             VALUE="Verdana,Arial,Helvetica">
<PARAM NAME="cart_font_color"       VALUE="#000000">
<PARAM NAME="cart_background_color" VALUE="#FFFFFF">
<PARAM NAME="cart_title_color"      VALUE="#D0CADD">
<PARAM NAME="currency_symbol"       VALUE="$">
<PARAM NAME="show_euro"             VALUE="NO">
<PARAM NAME="tax_rate_default"      VALUE="0.0%">
<PARAM NAME="tax_table"             VALUE="FL,FLORIDA">
<PARAM NAME="tax_shipping"          VALUE="NO">
<PARAM NAME="shipping_table"        VALUE="Standard Shipping,FLAT_FEE,$5.00;
                                             Overnight Shipping,FLAT_FEE,$25.00">
<PARAM NAME="handling_fee_default"  VALUE="$0.00">
<PARAM NAME="billing_first_name"    VALUE="First Name">
<PARAM NAME="billing_last_name"     VALUE="Last Name">
<PARAM NAME="billing_address"       VALUE="Address">
<PARAM NAME="billing_city"          VALUE="City">
<PARAM NAME="billing_zip_code"      VALUE="Zip Code">
<PARAM NAME="billing_country"       VALUE="Country">
<PARAM NAME="shipping_first_name"   VALUE="Shipping First Name">
<PARAM NAME="shipping_last_name"    VALUE="Shipping Last Name">
<PARAM NAME="shipping_address"      VALUE="Shipping Address">
<PARAM NAME="shipping_city"         VALUE="Shipping City">
<PARAM NAME="shipping_zip_code"     VALUE="Shipping Zip Code">
<PARAM NAME="shipping_country"      VALUE="Shipping Country">
<PARAM NAME="shipping_method"       VALUE="Shipping Method">
<PARAM NAME="payment_method"        VALUE="Payment Method">
<PARAM NAME="cc_name_on_card"       VALUE="Name On Credit Card">
<PARAM NAME="cc_number"             VALUE="Credit Card Number">
<PARAM NAME="cc_expiration"         VALUE="Credit Card Expiration">
</APPLET>


Taking a closer look at the lines you just added:

<APPLET CODE="uCatalogInitialize.class" CODEBASE="../classes/" WIDTH=201 HEIGHT=61>

This line uses the standard HTML <APPLET> tag to add an applet called "uCatalogInitialize.class" to the page. The "CODEBASE" setting indicates that the class file is located in the relative directory "../classes/". The "WIDTH=201" and "HEIGHT=61" settings indicate to make the applet 201 pixels wide and 61 pixels high.

<PARAM NAME="image" VALUE="ucatalog_logo.gif">

This line specifies a value of "ucatalog_logo.gif" for the "image" parameter. As defined in the uCatalogTM Applet Reference, the "image" parameter allows you to specify the image that will be displayed by this applet. In this case, the image "ucatalog_logo.gif" located in the "images" directory is specified.

<PARAM NAME="link" VALUE="../tutorial/tutorial_main.html">

This line specifies a value for the "link" parameter. As defined in the uCatalogTM Applet Reference, the "link" parameter allows you to specify an HTML page to link customers to when they click on this applet with the mouse. In this case, customer will be linked to the "tutorial_main.html" page when they click on this applet.

<PARAM NAME="cart_font" VALUE="Verdana,Arial,Helvetica">

This line specifies a value for the "cart_font" parameter. As defined in the uCatalogTM Applet Reference, the "cart_font" parameter allows you to specify the font that will be used for the shopping cart table that gets automatically added to the "Review Order" and "Print Order" pages.

<PARAM NAME="cart_font_color" VALUE="#000000">

This line specifies a value for the "cart_font_color" parameter. As defined in the uCatalogTM Applet Reference, the "cart_font_color" parameter allows you to specify the color of the font that will be used in the shopping cart table that gets automatically added to the "Review Order" and "Print Order" pages.

<PARAM NAME="cart_background_color" VALUE="#FFFFFF">

This line specifies a value for the "cart_background_color" parameter. As defined in the uCatalogTM Applet Reference, the "cart_background_color" parameter allows you to specify the background color of the shopping cart table that gets automatically added to the "Review Order" and "Print Order" pages.

<PARAM NAME="cart_title_color" VALUE="#D0CADD">

This line specifies a value for the "cart_title_color" parameter. As defined in the uCatalogTM Applet Reference, the "cart_title_color" parameter allows you to specify the background color of the title section of the shopping cart table that gets automatically added to the "Review Order" and "Print Order" pages.

<PARAM NAME="currency_symbol" VALUE="$">

This line specifies a value of "$" for the "currency_symbol" parameter. As defined in the uCatalogTM Applet Reference, the "currency_symbol" parameter allows you to specify the default currency symbol that will be used in your catalog pages.

<PARAM NAME="show_euro" VALUE="NO">

This line specifies a value of "NO" for the "show_euro" parameter. As defined in the uCatalogTM Applet Reference, the "show_euro" parameter allows you to specify whether or not to display the EURO subtotals in addition to the default currency totals.

<PARAM NAME="tax_rate_default" VALUE="0.0%">

This line specifies a value for the "tax_rate_default" parameter. As defined in the uCatalogTM Applet Reference, the "tax_rate_default" parameter allows you to specify the default tax rate. See the uCatalogTM User's Guide for more information about setting the tax rates for your catalog.

<PARAM NAME="tax_table" VALUE="FL,FLORIDA">

This line specifies a value for the "tax_table" parameter. As defined in the uCatalogTM Applet Reference, the "tax_table" parameter allows you to specify the tax table values. See the uCatalogTM User's Guide for more information about setting the tax rates for your catalog.

<PARAM NAME="tax_shipping" VALUE="NO">

This line specifies a value for the "tax_shipping" parameter. As defined in the uCatalogTM Applet Reference, the "tax_shipping" parameter allows you to specify whether or not to tax the shipping charges.

<PARAM NAME="shipping_table" VALUE="Standard Shipping,FLAT_FEE,$5.00; Overnight Shipping,FLAT_FEE,$25.00">

This line specifies a value for the "shipping_table" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_table" parameter allows you to setup a shipping table. See the uCatalogTM User's Guide for more information about setting up the shipping tables for your catalog.

<PARAM NAME="handling_fee_default" VALUE="$0.00">

This line specifies a value for the "handling_fee_default" parameter. As defined in the uCatalogTM Applet Reference, the "handling_fee_default" parameter allows you to specify the default handling fee. See the uCatalogTM User's Guide for more information about setting up the handling fees for your catalog.

<PARAM NAME="billing_first_name" VALUE="First Name">

This line specifies a value for the "billing_first_name" parameter. As defined in the uCatalogTM Applet Reference, the "billing_first_name" parameter allows you to specify that this is a required field.

<PARAM NAME="billing_last_name" VALUE="Last Name">

This line specifies a value for the "billing_last_name" parameter. As defined in the uCatalogTM Applet Reference, the "billing_last_name" parameter allows you to specify that this is a required field.

<PARAM NAME="billing_address" VALUE="Address">

This line specifies a value for the "billing_address" parameter. As defined in the uCatalogTM Applet Reference, the "billing_address" parameter allows you to specify that this is a required field.

<PARAM NAME="billing_city" VALUE="City">

This line specifies a value for the "billing_city" parameter. As defined in the uCatalogTM Applet Reference, the "billing_city" parameter allows you to specify that this is a required field.

<PARAM NAME="billing_zip_code" VALUE="Zip Code">

This line specifies a value for the "billing_zip_code" parameter. As defined in the uCatalogTM Applet Reference, the "billing_zip_code" parameter allows you to specify that this is a required field.

<PARAM NAME="billing_country" VALUE="Country">

This line specifies a value for the "billing_country" parameter. As defined in the uCatalogTM Applet Reference, the "billing_country" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_first_name" VALUE="Shipping First Name">

This line specifies a value for the "shipping_first_name" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_first_name" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_last_name" VALUE="Shipping Last Name">

This line specifies a value for the "shipping_last_name" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_last_name" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_address" VALUE="Shipping Address">

This line specifies a value for the "shipping_address" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_address" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_city" VALUE="Shipping City">

This line specifies a value for the "shipping_city" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_city" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_zip_code" VALUE="Shipping Zip Code">

This line specifies a value for the "shipping_zip_code" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_zip_code" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_country" VALUE="Shipping Country">

This line specifies a value for the "shipping_country" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_country" parameter allows you to specify that this is a required field.

<PARAM NAME="shipping_method" VALUE="Shipping Method">

This line specifies a value for the "shipping_method" parameter. As defined in the uCatalogTM Applet Reference, the "shipping_method" parameter allows you to specify that this is a required field.

<PARAM NAME="payment_method" VALUE="Payment Method">

This line specifies a value for the "payment_method" parameter. As defined in the uCatalogTM Applet Reference, the "payment_method" parameter allows you to specify that this is a required field.

<PARAM NAME="cc_name_on_card" VALUE="Name On Credit Card">

This line specifies a value for the "cc_name_on_card" parameter. As defined in the uCatalogTM Applet Reference, the "cc_name_on_card" parameter allows you to specify that this is a required field.

<PARAM NAME="cc_number" VALUE="Credit Card Number">

This line specifies a value for the "cc_number" parameter. As defined in the uCatalogTM Applet Reference, the "cc_number" parameter allows you to specify that this is a required field.

<PARAM NAME="cc_expiration" VALUE="Credit Card Expiration">

This line specifies a value for the "cc_expiration" parameter. As defined in the uCatalogTM Applet Reference, the "cc_expiration" parameter allows you to specify that this is a required field.

</APPLET>

This </APPLET> tag is the standard HTML syntax for indicating the end of an applet.

STEP 30 - Save and close the "index.html" file.


10.4 Putting Everything Together

STEP 31 - Start up the catalog by opening the "index.html" file in your browser. Note that it may take 10 to 15 seconds to give the uCatalogInitialize Applet on the "index.html" page time to read the ucatalog_template.html file and perform other initialization procedures.

Once the uCatalogInitialize Applet appears (by displaying the ucatalog_logo.gif), click on the applet with the mouse in order to enter the main catalog pages of this tutorial. Go ahead and add some items to the cart and then try out the whole order process to see how it all works.


11. Summary
This concludes the uCatalogTM Tutorial. For additional information, see the references listed below: