Hazel, Taxes, and You

I've been staring at the screen for a half hour trying to think of something witty to say about taxes-- everything from the crude and simple "they suck" to marginally PC militia jokes. I give up. You know what they are. Take a few moments to shake your fist towards your local government, then read on.

What is taxable with Hazel? The total of all merchandise you haven't marked as tax exempt in your products file. Shipping charges are usually untaxable. If you must charge taxes for shipping, add the TAXABLE rule under its properties header.

If you haven't read the rules files, absorb them now. This document begins with a closer examination of sales tax rules, and ends with a primer on per-item taxes.

The total calculated discount can be accessed in your templates via the HZML token %HZT_TAX.


sales_tax.rules

Sales tax rules are defined in the sales_tax.rules file under the rules directory in your catalog root.

[Header] Type Description number below is the numeric part of the rule's action.
+ (default)
REGION STR The selected TAX_REGION. add number to total
STATE
COUNTRY
STR The state or country of the billing address. add number to total
POSTAL_CODE ZIP The postal code of the billing address. add number to total
  • total is the total tax rate calculated thus far. It always begins at 0.00.
  • Unless 100% or more is a fair tax in your part of the world, number should always be less than 1. Eg. 0.08 for 8% sales tax, 0.0875 for 8.75% sales tax.
  • You may also use SHIP_STATE, SHIP_COUNTRY, or SHIP_POSTAL CODE, which use shipping address values.
  • Because sales tax rules always add the number to the total, the "+" is optional.


Per-Item Tax

You can set a specific tax rate for a product by editing its TAX field in the products file. You can also specify different taxes for individual items depending on the TAX_REGION selected by the shopper. Instead of adding a TAX field, add a TAX_FOO field, where FOO is one of the tax region values selectable during checkout.

  SKUID: MWAND
  NAME: Magic Wand
  PRICE: 7.99
  TAX: 0.00       # Generally magic wands are tax-exempt, 
  TAX_CANADA:0.08 # But an 8% magic tax for TAX_REGION "CANADA".

  SKUID: GRAVL
  NAME: Piece of Gravel
  PRICE: 0.10
  TAX: 0.20        # Stiff 20% gravel tax.

The most common use of per-item taxes is to exempt an item. You'll likely not have to worry about the per-item per-region stuff.


Getting Started HZML Rules Extras Advanced Reference
Walkthrough
Configuration
Products File
Order Reporting
Platforms
Upgrading
Known Problems
Actions
HZML Tokens
HZML Tags
HZML Loops
HZML & HAM
Overview
Shipping
Sales Tax
Discounts
Surcharges
Tweaking
Customization
Input Fields
Softgoods
Search Engine
Optioned Products
Plugins
Design Tips
Themes
Currency
Payment Methods
Coupons
Regular Expressions
Perl API
hazel.config
Templates
HTML Basics
CGI and You
ChangeLog

Hazel Home - Help Contents - Searchable Knowledge Base - Live Technical Support