Listing 1
<cffunction name="cartTotal" output="false"
access="private" returnType="numeric" hint=
"This method calculates the total price of all
the items in the shopping cart. It simply loops
over the cart and multiplies item price by quantity."
>
... method code ...
<cfreturn total>
</cffunction>
<cffunction name="cartTotal" output="false"
access="private" returnType="numeric" hint=
"This method calculates the total price of all
the items in the shopping cart. It simply loops
over the cart and multiplies item price by quantity.">
<cfargument name="addSalesTax" type="boolean"
default="false" required="false" hint=
"Should we add sales tax to the cart total.
If true, argument state will be required.">
<cfargument name="state" type="string"
default="" required="false" hint=
"State to use when applying sales tax. Will be
needed if addSaleTax=true.">
<cfargument name="discount" type="numeric"
default="0" required="false" hint=
"Numeric discount to apply to cart total.">
... method code ...
<cfreturn total>
</cffunction>