Design Notes

Dynamic-CD Example - Shopping Cart - Order items

Shopping Cart home page


CategoryItems available
Trivia Earth tranquilities mouse mat (SC_TV_001) 3.99
Heat seeking fly swatter (SC_TV_002) 39.99
Bonsai Redwood (SC_TV_003) 19.99
Transporter unit - 100 mile range (SC_TV_004) 199.99
Transporter unit - 1000 mile range (SC_TV_005) 399.99
Mobile phone base station (SC_TV_006) 1999.99


This database cannot be accessed from our Internet Server.
Please first download the development kit and run the Shopping Cart example
on your personal computer.

Design Notes
To see the ASP source for this page click here
This script shows how to display the product list, with clickable links to order each item.  It also reports the number of items in the current order.

Either all the product categories are shown, or the selected category.  If you click on the "Books" "CDs" or "Trivia" image map, then this script is passed a "QueryString" URL parameter called "View" that is retrieved using  Request.QueryString .  If a "View" parameter is provided then only that category of items is shown, ie where it matches the Categories table Description field.

Two nested database queries are used.  The first query retrieves all the information in the Categories table, sorted by the Order field.  As each category is found, a second query finds all parts in that category: the Category ID field in the Parts table must match the current Categories ID.

The script lists all appropriate parts in a table.  For each item, an order link is provided, followed by the product description, partno and price.  The order link consists of a call to cart.asp with a "QueryString" parameter called "order" with the order part number, eg cart.asp?order=SC_BK_001.

This script finally opens or creates the Orders database with the current cart items.  It retrieves all the order lines and reports the total number of items in the order.