Do this John:
<cfset Total = 0>
<cfoutput>
<cfset ThisItemTotal =
#ListGetAtShoppingCart_Qty,ListFind(ShoppingCart_Product,productId))"*"#prod
uctPrice#")#>
<tr>
<td> #productname# </td>
<td> #productDesc# </td>
etc...
<td> #ListGetAt(quantitylist,ListFind(productlist ,productId))#</tD>
<td>
#DollarFormat(ThisItemTotal)#
</td>
<cfset Total = Total + ThisItemTotal>
</tr>
</cfoutput>
<cfoutput>Total </cfoutput>
~JustinMacCarthy
----- Original Message -----
From: "Jon Tillman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 02, 2000 5:55 AM
Subject: Re: need help calculating total order price
> On Tue, 01 Aug 2000, DJMixes.Com spewed forth into the void:
> > You could put all the calculated prices into an array then use
arraysum() to
> > add them up and get the total.
>
> any idea how to get the <cfoutput> from the original query to populate the
> array?
>
> >
> > <cfset PriceArray = ArrayNew(1)>
> > <cfset PriceArray[1] = "9.99">
> > <cfset PriceArray[2] = "29.95">
> > etc..
> > <cfset TheTotal = ArraySum(PriceArray)>
> > <cfoutput>
> > #TheTotal#
> > </cfoutput>
> >
> > If this is not correct, please feel free to correct it. :)
> >
> > Derek
> >
> >
> > "Jon Tillman" <[EMAIL PROTECTED]> wrote in message
> > news:<0008012041130Q.10197@ghosttribe>...
> > > I have a shopping cart that does the following:
> > >
> > > 1) takes a productID and finds (among other things) its price
> > >
> > > 2) reads the quantity of that item selected
> > >
> > > 3) multiplies the quantity by the price
> > >
> > > 4) displays it with the following:
> > >
> >
#DollarFormat("#ListGetAt(ShoppingCart_Qty,ListFind(ShoppingCart_Product,pro
> > ductId))#"*"#productPrice#")#
> > >
> > > What I need it to do is to take multiple instances of the calculated
price
> > and
> > > add them together to produce a grand total for the order. Any ideas
how to
> > do
> > > that? I am getting desperate!
> > >
> > > --
> > > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> > > Jon Tillman
> > > LINUX USER: #141163
> > > ICQ: 4015362
> > > [EMAIL PROTECTED]
> > > http://tillman.freehosting.net
> > > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> >
> --------------------------------------------------------------------------
> > ----
> > > Archives: http://www.mail-archive.com/[email protected]/
> > > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
> > the body.
> >
>
> --------------------------------------------------------------------------
----
> > Archives: http://www.mail-archive.com/[email protected]/
> > To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
> --
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> Jon Tillman
> LINUX USER: #141163
> ICQ: 4015362
> [EMAIL PROTECTED]
> http://tillman.freehosting.net
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.