The good news? Hazel can adapt to just about any shipping method. The bad news? Well, you've got to implement it. The other good news? Hazel makes this almost painless (somewhere between a pinch and a bee sting) via her rules files.
If you haven't read the rules files, absorb them now. This document begins with a closer examination of shipping rules, and ends with a primer on per-item shipping charges.
The total calculated shipping charge can be accessed in your templates via the HZML token
There should be a shipping rules file METHOD.rules for each shipping method you provide, where METHOD is the shipping method that file describes. These files should be placed in the shipping directory under the rules directory in your catalog root.
|[Header]||Type||Description||number below is the numeric part of the rule's action.|
|NUM||The price, weight, total quantity, or total unique SKUID of items unhandled by per-item shipping.||add number to total||add header value multiplied by number to total|
|REGION||STR||The selected ||add number to total||multiply total by number|
|STR||The state or country of the shipping address.||add number to total||multiply total by number|
|POSTAL_CODE||ZIP||The postal code of the shipping address.||add number to total||multiply total by number|
Shipping rules may contain a special PROPERTIES header. Its contents are key:value pairs which describe the shipping method. They are
NAME(the pretty word for the shipping method), and
TAXABLE(1 if the shipping method is taxable.) Here's an example:
If you need to charge special shipping for certain products, add a
SHIPPINGfield to its entry in your products file with a value of the flat charge for shipping each item.
Per-item shipping is useful for clumsy items which would break the financial poetry of your shipping rules, or for tiny items which require neglible shipping and handling.
Normally, when all selected products have their own shipping values, Hazel doesn't bother interpreting the chosen ship method's rules file. Prefixing a per-item shipping value with a plus sign (+) will ensure that shipping rules are executed even if all items have a custom shipping value. This is useful if, for example, you want to add a shipping surcharge for a particular ship method.
HZML & HAM
CGI and You