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

text

A. Dynamic table to display products. B. Product name, tagline, image, and description. C. Sale promotion image. D. Regular and current price. E. Add to cart button.

Content Sources

There are two content sources: the Products query from the E-Commerce database, and a Custom Merchant Shopping Cart. The GoLive documentation describes how to configure a .ecp file in your config/datasources folder to connect to a Custom Merchant provider.

A

All of the products appear in a single dynamic table bound to the Products query. A real online store could use a more elaborate design like the Catalog sample.

B

The product name, image, tagline, and description are all simple bindings. The description can include HTML or CSS for formatting.

C

Every product has a promotion image, even if the promotion is 'None'; the image for 'None' is blank. Using a blank image like this makes it easy to handle all of the products on the page in a uniform way.

D

The crossed out regular price is in a Show/Hide Container so that it is only visible when the current price and regular price are different. Here is the Show/Hide condition:

$Products->Value("RegularPrice") != $Products->Value("Price")

This expression is PHP to compare the regular price and current price. The Show/Hide container is visible when the condition is true, and hidden when it is false.

The regular and current prices both use the Format Currency filter to display the correct number of digits and currency symbol. The currency symbol is picked based on the localization settings of the Web server's operating system.

E

The Add to Cart button uses the Custom Merchant/Add to Cart Form Action. Here is what it looks like the Dynamic Bindings palette:

The name of the cart provider is the same as the .ecp file in the config/datasources folder. The other three parameters provide information about the product to add. The SKU identifies the product, the description is the name that appears in the user's shopping cart, and the price is the cost of a single item. Notice that the database field names do not need to match the field names used by the Shopping Cart.