The fourth major release of the Hazel shopping cart system marks a major evolution. Much of her internals have been re-written, optimized, and fitted for future optimization and modular plugin functionality.
Netsville will continue to sell Hazel version 3 ("H3") at current prices, while offering Hazel version 4 ("H4") to those who desire her more advanced and enhanced features.
Here are a few of those features.
Search, Options, Unlimited Products
The search engine and optioned products features, optionally available at an extra cost for H3, are included in the price of H4. In addition, an H4 license doesn't make distinctions between less than 100 and unlimited products-- you always get unlimited products.
With H3, one was required to buy either a hardgoods or softgoods license, or pay extra to enable one or the other features. H4 includes softgoods with every license, a bonus for those who may want to allow purchase of immediately downloadable goods in addition to shippable ones.
One of the major improvements on the Hazel code in version 4 is the addition of hooks for custom plugins. These plugins can augment Hazel's behaviour within a very wide scope, adding actions, modifying how she works with existing actions, how she saves orders, accesses products, and much more. Here are a few examples of plugins currently in use by Hazel 4 users:
The inventory plugin adds support for an additional inventory.txt file which contains stock levels for your products. The levels are decremented when items are ordered through Hazel, and you can access stock levels in your templates simply with the dynamically applied %HZI_STOCK HZML token.
The "members" plugin adds user accounts to Hazel. You can store arbitrary shopper information associated with user accounts, accessed with their chosen usernames and password.
Includes the ability to resend forgotten passwords to the registered email address of users, changing passwords, and custom templates for every step of the membership process.
Actually two plugins: one to access Hazel product data from a MySQL database, and one to update inventory cells in that database (as per the inventory plugin.)
Search Engine Enhancements
Hazel's search engine has been re-written. In earlier versions, Hazel would search your products file one "page" at a time. That is, she searched only for the number of matching products you wished to be displayed, then resumed her search if the shopper wanted to view more matches.
H4 searches your entire products file, then saves all matches in a file associated with the shopper. This speeds response when a shopper is browsing through several pages of matches, and allows you, the shop designer, to provide a list of total matching products, pages of matching products, and jumping between arbitrary pages of matches.
In addition to this fundamental change, Hazel now ranks matching products according to how many of the entered search terms were found. This results in a tremendous usability bonus for the shopper, who will now see the most relevant results of his match right up front, while still being able to view possible matches on successive pages.
Hazel also provides a powerful new search_term.rules rules file. This file is consulted whenever Hazel is given words for a search query. It can be used to convert plural words to singular ones, correct common spelling mistakes, and generally tune user queries for better results.
Regular Expression Support
H4 supports regular expressions, powerful pattern-matching descriptions. They are supported in Hazel-Choice, Hazel-True, Hazel-False HZML elements via the RE attribute, and in the new Hazel-Regex HZML element. Designers have access to up to 10 parenthetical submatches within their RE patterns.
Hazel's standard actions can be augmented with your own custom ones. You can add any number of new Hazel actions (eg. action=FOO) simply by adding a corresponding HTML file (lowercased, eg. foo.html) to your hazel-cat/templates/actions subdirectory.
That action name can then be used as a header in your hazel-cat/rules/field.rules file (eg. [FOO]), allowing you to control user input fields passed to it.
There are several HZML additions exclusive to H4:
- Support for FEXISTS and RE attributes in Hazel-Truth tags.
- Support for the DELETE attribute in the Hazel-Comment tag, for stripping out sections of your HZML files before they reach the browser.
- Support for the TOKEN attribute in the Hazel-Vset tag. In addition to setting %HZV namespace tokens, you can now set tokens in %HZE (shopper input data), %HZM (configuration settings) and other namespaces.
- New Hazel-Dims HZML element allows you to extract the dimensions of GIF, JPG, or PNG files on your server.
- New ARGSTR attribute for the Hazel-Slurp tag, allowing you to send custom command parameters to called scripts.
- New Hazel-Regex element for powerful pattern matching.
- New Hazel-Subst element for replacing fixed strings, regular expression patterns, or converting values to all upper or lower case.