I'm stumped and could sure use help!  How can I get a total number of all items 
ordered?  The item and quantities picked of each item display, but I've run out of 
ideas for outputting the total amounts.  Listlen doesn't work.  Any other ideas?  
thanks!!!!!!

<CFLOOP LIST="#fieldnames#" INDEX="ListElement">
<cfquery name="getproducts" datasource="mydatabase">
Select Price, Prod_desc, prodcode
>From Prodcodes
Where prodcode = '#listelement#'
</cfquery>
  <CFSET ThisName=Evaluate(Listelement)>
  <CFSET ThisValue=Evaluate(ThisName)>
<CFSET #OrderQty# = #ThisValue#>
<CFSET #OrderSubtotal# = #getproducts.price#>
<cfset #itemsubtotal# = #thisvalue# * #Getproducts.Price#>
<cfif '#thisvalue#' neq "0">

<CFOUTPUT>
                <table>
        <tr>
        <td valign="middle" align="left" height="30"><font 
size="2">#getproducts.prod_desc#<br></font></td>
                <td valign="middle" height="30" align="center"><font 
size="2">#NumberFormat(Getproducts.Price,'$9(9999.99)')#</font></td>
                <td valign="middle" height="30" align="center"><font 
size="2">#thisvalue#</font></td>
                <td valign="middle" height="30" align="center"><font 
size="2">#NumberFormat(itemsubtotal,'$9(9999.99)')#</font></td>
                
        </tr>
        </table>
</CFOUTPUT>
</cfif>
</cfloop> 
<cfoutput>
        <tr>
        <td height="11"><font size="2"><b>Subtotal</b> </font></td>
        <td height="11">&nbsp;</td>
        <td height="11" align="center" valign="middle"><font 
size="2">#itemsordered#</font></td>
        <td height="11" valign="top" align="right">&nbsp;<font 
size="2">#NumberFormat(OrderSubTotal,'$9(9999.99)')# </font></td>
        </tr>
<tr>
        <td height="11"><font size="2"><b>Sales Tax</b> </font></td>
        <td height="11">&nbsp;</td>
        <td height="11">&nbsp;</td>
        <td height="11" valign="top" align="right">&nbsp;<font 
size="2">#NumberFormat(SalesTax,'$9(9999.99)')# </font></td>
        </tr>
    <tr>
        <td height="11"><font size="2"><b>Shipping</b> </font></td>
        <td height="11">&nbsp;</td>
        <td height="11">&nbsp;</td>
        <td height="11" valign="top" align="right">&nbsp;<font 
size="2">#NumberFormat(Shipping,'$9(9999.99)')#</font></td>
        </tr>

    <tr>
        <td height="11"><font size="2"><b>TOTAL</b></font></td>
        <td height="11">&nbsp;</td>
        <td height="11" align="center" valign="middle"><font 
size="2">#TotalQty#</font></td>
         <td height="11" valign="middle"><p align="right"><font 
size="2">#NumberFormat(OrderTotal,'$9(9999.99)')# </font></td>
        </tr>
</table>

</cfoutput>


------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts or send a message with 
'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to