Adobe
GoLive 6 Dynamic Content Samples
Overview
Database Design
Products
Shopping Cart
Shipping Address
Billing Address
Place Order
Thanks
Edit Promotions
Edit Products

In some online stores all of the dynamic content comes from a Custom Merchant provider; the provider manages everything about the store including products, shopping carts, and orders. In other online stores the provider only handles the shopping cart and orders, and the details about a product are sent to the provider whenever a user clicks an Add to Cart button. In this case the product information is stored either statically in each web page or in a database. There is no real difference between the two kinds of stores, except that in the first kind you retrieve product information using an XML content source, whereas in the second you use a database.

This sample uses the second design. The product database includes two tables, one for the product information and one for the product promotions. The relation connecting the two indicates that many products can be running with the same promotion. The Products query joins the two tables together so that each product is matched up with the appropriate promotion image.

Promotions

The Promotions table contains product promotions like '20% Off', 'Top Seller', and 'None'. Each promotion has an image that appears next to the products running with that promotion. In this sample the store owner must manually change a product's price when he changes its promotion. A more complete store might include database logic to recalculate prices automatically.

Some Custom Merchant providers allow you to configure more elaborate promotions using the provider's web interface. In this case, the provider automatically calculates the effects of the promotion whenever you access a user's shopping cart or order form.

ProductData

Each product has a name, a description, a tagline, a regular price, a current price, and a unique ID so that the Custom Merchant provider can keep track of the items in an order. In an e-commerce application, the term 'SKU' is often used in place of 'ID'.

Products

The Products query adds the appropriate promotion image to the rest of the product data.

Shopping Cart

A Custom Merchant Shopping Cart is just like a database table: there is one record for each item in the cart. Each item is described by fields like Name, Price, SKU, and Quantity. You bind information in a shopping cart the same way you bind information in a database table.

Order Form

A Custom Merchant Order Form keeps track of a user's shipping, billing, and credit card information, as well as the tax and totals for the items in his cart. As with the shopping cart, you bind information in an order form the same way that you bind information from any other dynamic content source.

Every Custom Merchant provider keeps track of a different set of fields for the shopping cart and order form. The ones that the test provider uses are typical, but you will probably need to change your pages slightly when you hook up an e-commerce site to a real Custom Merchant provider.