Listing 1:

<!--- Test Implementation --->
<cfset cartitems = querynew("price,discounttype,event")>
<cfset queryaddrow(cartitems, 3)>
<cfset QuerySetCell(cartitems, "price", 15.00, 1)>
<cfset QuerySetCell(cartitems, "discounttype", "", 1)>
<cfset QuerySetCell(cartitems, "event", "Wharton China Business Forum", 1)>
<cfset QuerySetCell(cartitems, "price", 15.00, 2)>
<cfset QuerySetCell(cartitems, "discounttype", "Child", 2) >
<cfset QuerySetCell(cartitems, "event", "Wharton China Business Forum", 2) >
<cfset QuerySetCell(cartitems, "price", 15.00, 3) >
<cfset QuerySetCell(cartitems, "discounttype", "Senior", 3) >
<cfset QuerySetCell(cartitems, "event", "Wharton China Business Forum", 3) >
<html>
<head>
<title>My Cart</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<cfset ticketpricing = createObject("component","com.TicketLeap.Ticket")>
<cfset ticketpricing.Init("Sales")>
<table width="70%" border="1" cellspacing="2" cellpadding="2" align="center">
<tr>
<th>Event</th>
<th>Original&nbsp;Price</th>
<th>Ticket</th>
<th>Your&nbsp;Price</th>
</tr>
<cfoutput query="cartitems">
<tr>
<td nowrap><strong>#event#</strong></td>
<td><em>#dollarformat(price)#</em></td>
<td>#discounttype#</td>
<td>#dollarformat(ticketpricing.getPrice(price, discounttype, zip
code))#</td>
</tr>
</cfoutput>
</table>
</body>
</html>