Previous | Next Main Index:   Frames | No Frames
Document:   Frames | No Frames

WebStore Sales Tax

The addition of sales tax to client orders is controlled by the value of $tax in the store's setup file, outlet.setup.
When $tax = 1, sales tax is calculated and displayed on the order form for those clients whose billing state or country contains a fixed decimal value for sales tax in element two of %states, %provinces, or %countries in outlet.state_country.setup, defined in $country_file in outlet.setup.
When the client's billing state, province, or country does not contain a value for sales tax, sales tax is not added to the client's order.
Setting $tax = '' disables sales tax calculation. Tax rates present in element two of %states, %provinces, or %countries in outlet.state_country.setup are disregarded.
Examples of state array from %states with 6.75% sales tax:
 KEY     zero    one       two       three
 '53' => ['TX',  'Texas',  '.0675'],
 '53' => ['TX',  'Texas',  '.0675',  '~~RATE~~ ~~STATE~~ Sales Tax'],
Tax labels may be stored in element three. WebStore will use the universal label defined in $tax_label in outlet.setup when element three is not defined or element three is set to ''.
Occurrences of    ~~RATE~~   ~~STATE~~   ~~PROVINCE~~   and   ~~COUNTRY~~   found in element three's tax label will be replaced with:
~~RATE~~        Tax rate in percentage format:  6.75%
~~STATE~~       US state from %states in outlet.state_country.setup
~~PROVINCE~~    Canadian province from %provinces in outlet.state_country.setup
~~COUNTRY~~     Country from %countries in outlet.state_country.setup
Example sales tax rate of .0675 and sales tax state of Texas:
Tax Label = '~~RATE~~ ~~STATE~~ Sales Tax'
Tax Label =  6.75% Texas Sales Tax