For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

salestax

Returns the sales tax amount for the subtotal of all the items in the cart.

Summary

  • [salestax name noformat]

Parameter Description Default
name Name of the cart to report on. main
cart Alias for name. main
convert Convert the amount according to the PriceDivide value for the current locale. No
display Display the currency identifier as a symbol, as plain text or not at all. symbol
locale Override the current locale for the currency format. None
noformat suppress currency formatting. No

Examples

Tag expansion example

[salestax]
$1.75

Perl example

$Tag->salestax({
    name => $name,
    noformat => $noformat,
});

or similarly with positional parameters:

$Tag->salestax($name, $noformat, $attribute_hash_reference);

Description

Returns the sales tax amount for the subtotal of all the items in the cart.  If there is no key field to derive the proper percentage, such as state or zip code, it returns 0.  See the SalesTax local configuration directive.

Note

Note

The output of this tag can be overridden with the use of the [assign] tag.

Parameters

name

The name of the cart to calculate sales tax on.  The default is "main".

convert

If true then convert the amount according to the PriceDivide value for the current locale.

See the [currency] tag for a usage example.

display

The 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.

locale

This 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.

Note

Note

Setting this parameter causes the convert parameter to also be set, unless you specify "convert=0".

noformat

If true then suppress currency formatting from the value returned from this tag.  See the [currency] tag.

See Also

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Thursday 16 November 2006 at 10:37 AM (CST)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us