O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a Shopping Cart

Now that a storefront has been constructed with Add To Cart links for each product, it’s time to build the actual shopping cart. This section creates two versions of a ColdFusion template called StoreCart.cfm.

If the StoreCart.cfm template is visited without any URL parameters, it displays the items in the cart and gives the user the opportunity to either change the quantity of each item or check out, as shown in Figure 22.2. If a MerchID parameter is passed in the URL, that item is added to the user’s cart before the cart is actually displayed. You will notice that the Add To Cart links generated by the <cf_MerchDisplay> Custom Tag (refer to Listing 22.1) do exactly that.

Figure 22.2. From the Shopping Cart page, users ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required