![]() |
| > Home > Documentation > Latest documentation > Interchange tags > total-cost |
|
total-costReturns the total cost of all the items in the current shopping cart, including sales tax (if any). Summary
ExamplesTag expansion exampleIn a cart that happens to currently total $12.00:
would output $12.00, and:
would output 12.00 (note the absence of the currency symbol). Perl example
or similarly with positional parameters:
DescriptionReturns the total cost of all the items in the current shopping cart, including sales tax (if any). ParametersnameThe name of the shopping cart you want the total cost from. The default shopping cart name in Interchange is "main", but you can have as many as you need for your application. convertIf true then convert the amount according to the PriceDivide value for the current locale. See the [currency] tag for a usage example. displayThe currency identifier will usually be displayed as a symbol (i.e. "£" or "$" etc.). If this parameter is set to "text" then the currency identifier will be displayed as plain text (i.e. "GBP" or "USD" etc.), depending upon the locale settings. If this parameter is set to "none" then the currency identifier will not be displayed at all. See the [currency] tag. localeThis parameter allows you to override the current locale that would be used to format the result and provide the exchange rate. See the [currency] tag.
noformatIf true then suppress currency formatting from the value returned from this tag. See the [currency] tag.
|
| Home | Legal nonsense | Privacy policy | Contact us |