Question
Possible Noob question involving column totals
I am running cf8 and ms sql 05. I consider myself an
"advanced" beginner at coldfusion but getting better.
I tried searches on this forum & google but the solutions i found didnt work well for me.
I have a shopping cart that i wrote and i am unable to add up the totals for all products before it is sent to the database. i wanted the price totals for all products selected to be displayed but, alas i have been ripping out my hair on this as i cant get it to work. i know there is a real simple solution to this.
thanks in advance.
<cfif isdefined("url.action")>
<cfif url.action is "delete">
<cfset session.cart.removeitem(url.position)>
</cfif>
</cfif>
<cfset arcart = session.cart.getCart()>
Your Delivery Order
<td> Product</div></td>
<td><div align="center">Quantity</div></td>
<td><div align="center">Price</div></td>
<td> </td>
<cfoutput>
<cfloop from="1" to="#arraylen(arCart)#" index="counter">
<td>#arCart[counter].sheds.getsheds()#</td>
<td>#arCart[counter].quantity#</td>
<td>#dollarformat(arCart[counter].sheds.getprice())#</td>
<td><a href="cart.cfm?action=delete&position=#counter#">Delete</a></td>
</cfloop>
</cfoutput>
I tried searches on this forum & google but the solutions i found didnt work well for me.
I have a shopping cart that i wrote and i am unable to add up the totals for all products before it is sent to the database. i wanted the price totals for all products selected to be displayed but, alas i have been ripping out my hair on this as i cant get it to work. i know there is a real simple solution to this.
thanks in advance.
<cfif isdefined("url.action")>
<cfif url.action is "delete">
<cfset session.cart.removeitem(url.position)>
</cfif>
</cfif>
<cfset arcart = session.cart.getCart()>
Your Delivery Order
<td> Product</div></td>
<td><div align="center">Quantity</div></td>
<td><div align="center">Price</div></td>
<td> </td>
<cfoutput>
<cfloop from="1" to="#arraylen(arCart)#" index="counter">
<td>#arCart[counter].sheds.getsheds()#</td>
<td>#arCart[counter].quantity#</td>
<td>#dollarformat(arCart[counter].sheds.getprice())#</td>
<td><a href="cart.cfm?action=delete&position=#counter#">Delete</a></td>
</cfloop>
</cfoutput>