home *** CD-ROM | disk | FTP | other *** search
- <!--- This template is used by other templates via CFINCLUDE; it
- is used to display the contents of the shopping cart in a
- small table (a less detailed view than _showitems.cfm). --->
-
- <!--- Don't let the browser cache this page. Otherwise we might
- be looking at a cached shopping cart which does not reflect
- what is truly in the cart. --->
- <CFHEADER Name="Expires" Value="#Now()#">
- <CFHEADER NAME="pragma" VALUE="no-cache">
-
- <CFQUERY DATASOURCE="CFexamples" NAME="GetCategories">
- SELECT * FROM StoreCategories
- </CFQUERY>
-
- <STYLE TYPE="text/css">
- #floater {
- position: absolute;
- left: 15;
- top: 150;
- width: 125;
- visibility: visible;
- z-index: 10;
- }
- </STYLE>
-
- <DIV ID="floater">
-
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
- <TR>
- <TD><IMG SRC="images/widget_top.gif" WIDTH=122 HEIGHT=26 BORDER=0></TD>
- </TR>
-
- <FORM ACTION="results.cfm" METHOD="POST">
- <TR>
- <TD BACKGROUND="images/widget_bg.gif" BGCOLOR="#CC9933"><NOBR> <FONT SIZE="-1"><INPUT TYPE="TEXT" NAME="Keyword" SIZE="10"></FONT> <INPUT TYPE="IMAGE" SRC="images/widget_go.gif" ALIGN="MIDDLE" BORDER=0></NOBR></TD>
- </TR>
- </FORM>
-
- <TR>
- <TD><IMG SRC="images/widget_divider.gif" WIDTH=122 HEIGHT=10 BORDER=0></TD>
- </TR>
-
- <!--- loop over categories --->
- <TR>
- <TD BACKGROUND="images/widget_bg.gif"><NOBR> <FONT FACE="MS Sans Serif, Helvetica" SIZE="-1" COLOR="#FFFFCC"><A HREF="showcategories.cfm"><IMG SRC="images/widget_click.gif" WIDTH=13 HEIGHT=16 BORDER=0 ALIGN="TOP"></A> Store Front</FONT></NOBR>
- <CFOUTPUT QUERY="GetCategories"><BR><NOBR> <FONT FACE="MS Sans Serif, Helvetica" SIZE="-1" COLOR="##FFFFCC"><A HREF="showitems.cfm?CategoryID=#CategoryID#"><IMG SRC="images/widget_click.gif" WIDTH=13 HEIGHT=16 BORDER=0 ALIGN="TOP"></A> #CategoryName#</FONT></NOBR></CFOUTPUT></TD>
- </TR>
-
- <TR>
- <TD><IMG SRC="images/widget_divider.gif" WIDTH=122 HEIGHT=10 BORDER=0></TD>
- </TR>
- <TR>
- <TD><IMG SRC="images/widget_inthebag.gif" WIDTH=122 HEIGHT=21 BORDER=0></TD>
- </TR>
- <TR>
- <TD BACKGROUND="images/widget_bg2.gif" ALIGN="RIGHT">
- <FONT FACE="MS Sans Serif, Helvetica" SIZE="1" COLOR="#00FF00">
- <CFIF ListLen(Session.StoreItems) IS 0>
- <NOBR>(empty cart) </NOBR>
- <CFELSE>
- <!--- Initialize total cost variable --->
- <CFSET TotalCost = 0>
-
- <!--- Loop over the list of items in the shopping cart --->
- <CFLOOP INDEX="CurrIndex" FROM="1" TO="#ListLen(Session.StoreItems)#">
-
- <!--- Fetch the actual item ID and quantities for current item --->
- <CFSET CurrItemID = ListGetAt(Session.StoreItems, CurrIndex)>
- <CFSET CurrQuant = ListGetAt(Session.StoreQuantities, CurrIndex)>
-
- <!--- Find out what the current item is called --->
- <CFQUERY DATASOURCE="CFexamples" NAME="GetItem">
- SELECT ItemName, ItemPrice FROM StoreItems
- WHERE ItemID = #CurrItemID#
- </CFQUERY>
-
- <!--- Display quantity and item name --->
- <CFOUTPUT QUERY="GetItem">
- <NOBR>#CurrQuant# x #ItemName# </NOBR><BR>
- </CFOUTPUT>
-
- <!--- Add total value of current item to total cost variable --->
- <CFSET TotalCost = TotalCost + CurrQuant * GetItem.ItemPrice>
-
- </CFLOOP>
-
- <NOBR>Total: <CFOUTPUT>#DollarFormat(TotalCost)#</CFOUTPUT> </NOBR>
-
- </CFIF>
- </FONT>
- </TD>
- </TR>
- <TR>
- <TD><IMG SRC="images/widget_midbottom.gif" WIDTH=122 HEIGHT=7 BORDER=0></TD>
- </TR>
- <TR>
- <TD BACKGROUND="images/widget_bg.gif"><NOBR> <FONT FACE="MS Sans Serif, Helvetica" SIZE="-1" COLOR="#FFFFCC"><A HREF="viewcart.cfm"><IMG SRC="images/widget_click.gif" WIDTH=13 HEIGHT=16 BORDER=0 ALIGN="TOP"></A> Details</FONT></NOBR><BR>
- <NOBR> <FONT FACE="MS Sans Serif, Helvetica" SIZE="-1" COLOR="#FFFFCC"><A HREF="checkout.cfm"><IMG SRC="images/widget_click.gif" WIDTH=13 HEIGHT=16 BORDER=0 ALIGN="TOP"></A> Checkout</FONT></NOBR></TD>
- </TR>
- <TR>
- <TD><IMG SRC="images/widget_bottom.gif" WIDTH=122 HEIGHT=8 BORDER=0></TD>
- </TR>
- </TABLE>
-
-
- </DIV>
-
- <CF_STALKER STYLE="floater">
-
- <!---
- The Allaire example app task force (Cheng, Reiber, Gilson) is very grateful
- to Spotted Antelope, Inc. for permission to use the stalker.cfm custom tag.
-
- Find Spotted Antelope at http://www.spottedantelope.com
- --->