hazel.config

Hazel's settings are stored in the hazel.config file, which should be located in the same directory as the Hazel CGI. Here's a piece of a sample config file:

MEASUREMENTS:36-24-36 # Hubba Hubba! Shake it, Hazel!

MEASUREMENTS is the field name, "36-24-36" is the field value, and everything from the '#' character on is a "comment" which might be informative or amusing for you, but is disregarded by Hazel. (And that's a good thing for the sexist rascal who wrote that comment!)

The field descriptions have been split into two groups. This page describes all the basic fields (including everything required), and a separate page describes the rest of the fields.


Basic Fields

These fields define the locations of Hazel's support files, the basic addresses of your web server, information about your store, or options commonly changed by shopkeepers. You should at least read this section and understand what the required fields mean, as they'll be referred to throughout the documentation.

HAZEL_NAME required

This is the name of your Hazel CGI program. It must contain the word "Hazel" (case does not matter) somewhere within it. UNIX users should have no reason to change it from "hazel.cgi"; Windows users will probably have to set it to "hazel.exe". Don't get too fancy.

Sample Values

  1. hazel.cgi
  2. hazel-store2.cgi
  3. hazel.exe
  4. NT-Hazel.Exe

HAZEL_SERNO required
HARDGOODS_KEY required

HAZEL_SERNO is the unique serial number of your Hazel catalog. HARDGOODS_KEY is the encrypted string which tells Hazel whether the catalog is an evaluation version (and when it expires) or a registered version (which never expires).

There is also a SOFTGOODS_KEY which activates features to distribute software online, a SEARCH_KEY which allows shoppers to search the products file, and an OPTIONS_KEY which allows options such as size and color to be attached to SKU. You'll be given these when/if you purchase them. They aren't required.

Note: In previous versions of Hazel, HARDGOODS_KEY was "HAZEL_KEY".

Sample Values

  1. These will be given to you when you register Hazel.

CAT_DIR required

This is the directory which holds Hazel's support files -- her guts. It will contain a templates directory for her templates, a rules directory for her rules, a users directory for temporary shopper data, a loops directory for HZML loops, and her products file. If the optional ORDERS_DB field is present in the config file, a record of all your orders will be written to a file with that name in this directory.

Because this directory contains sensitive information, it should not be accessible from the web. This is very important. If you can view this directory from the web, anyone can. If anyone can view the directory, then anyone can probably view your orders and user files, which is a very bad thing.

Netsville cannot be held responsible for an insecure installation of this directory. It's no more our fault than it would be if you posted your own credit card number in plain text on your homepage.

Use forward slashes in this and all of your pathnames, as in the second example below. Hazel attempts to convert all backslashes ('\') to forward slashes ('/') in pathnames and URL, but you should get in the habit of doing it yourself.

Sample Values

  1. CAT_DIR:/web/netsville/hazel
  2. CAT_DIR:C:/Program Files/Netsville/Hazel

CGI_DIR required

This is the directory where you placed Hazel's CGI files, and where her hazel.config file is located. Some servers allow you to place CGI files anywhere, while others require them to be in a special directory. Some servers don't allow subdirectories under that special directory. Some servers are just plain broken. Your safest bet is to set your CGI root to where you know a CGI will work. Optimally, it's nice to have a hazel-cgi subdirectory to keep her files separate from your other CGI (counters, guestbooks, etcetera).

Sample Values

  1. CGI_DIR:/web/netsville/cgi-bin/hazel
  2. CGI_DIR:/web/netsville/bin/hazel
  3. CGI_DIR:E:/fnord/cgi-bin/hazel

DOC_DIR required

The document root contains HTML to be served by Hazel. Though Hazel doesn't serve images and other non-HTML documents, it's a good idea to keep them in same directory as her HTML, preferably in a subdirectory (ie. hazel, catalog, store, etcetera) under your server's root directory (the local FTP or telnet path where your site's homepage is located).

Sample Values

  1. DOC_DIR:/web/netsville/server_root/hazel
  2. DOC_DIR:/web/netsville/htdocs/hazel
  3. DOC_DIR:E:/fnord/server_root/hazel

HTTPS_ENABLED

Set HTTPS_ENABLED to 1 if you plan to use an SSL-enabled secure server.

Sample Values

  1. HTTPS_ENABLED:1 # Using a secure server.
  2. HTTPS_ENABLED:0 # Not.

HTTP_CGI_BIN required
HTTPS_CGI_BIN

These are the full URL to your Hazel CGI directories (locally known as CGI_DIR). The first is for normal, un-encrypted access and the second is for "secure" encrypted access.

If these two URL differ only in the http: part, then Hazel should have no problems running securely on your system. If the URL are different, then you may have to choose between Hazel serving all your pages securely, or serving them all unencrypted.

Note: In previous versions of Hazel, HTTPS_CGI_BIN was known as "HTTP_CGI_BIN_SECURE".

Sample Values

  1. HTTP_CGI_BIN:http://www.netsville.com/cgi-bin/hazel
  2. HTTP_CGI_BIN:http://www.netsville.com/bin/hazel
  3. HTTP_CGI_BIN:http://requiem.vv.com/cgi-bin/hazel
  4. HTTPS_CGI_BIN:https://www.netsville.com/cgi-bin/hazel
  5. HTTPS_CGI_BIN:https://secure.netsville.com/bin/hazel

HTTP_DOC_ROOT required
HTTPS_DOC_ROOT

These URL point to your DOC_DIR files. The same notes apply as with the HTTP_CGI_BIN entries.

Note: In previous versions of Hazel, HTTPS_DOC_ROOT was known as "HTTP_DOC_ROOT_SECURE".

Sample Values

  1. HTTP_DOC_ROOT:http://www.netsville.com/hazel
  2. HTTP_DOC_ROOT:http://requiem.vv.com/hazel
  3. HTTPS_DOC_ROOT:https://www.netsville.com/hazel
  4. HTTPS_DOC_ROOT:https://secure.netsville.com/hazel

START_PAGE required

START_PAGE should be the name of a file in your DOC_DIR which Hazel will serve when she is called without any action. This is the "front door" to your online store. It could be a table of contents, a list of products or product categories, or a welcome message. Kind of a homepage for your catalog.

Sample Values

  1. START_PAGE:index.html
  2. START_PAGE:start.html
  3. START_PAGE:frontdoor.html

ORDERS_DB

ORDERS_DB is the name of a file to be written in your catalog support directory whenever an order is received. Information about each order will be appended to the file as described in your order format template.

If you would rather there not be a record of orders saved to disk, leave this field blank.

Sample Values

  1. ORDERS_DB: # Don't write an order log.
  2. ORDERS_DB:orders.txt # Log orders to orders.txt

STORE_NAME required

This is the name of your store.

Sample Values

  1. STORE_NAME:Hazel's Canned Goods
  2. STORE_NAME:Quinn's Qogs
  3. STORE_NAME:Funky Mamas Unlimited

STORE_PHONE required

This is your store's sales and support number.

Sample Values

  1. STORE_PHONE:1-888-NETSVILLE
  2. STORE_PHONE:1-888-QUIN-QOG
  3. STORE_PHONE:1-888-FUNK-MOM

STORE_HOMEPAGE required

This is the URL to your store's main homepage. It is currently used only as a return link on the default receipt template.

Sample Values

  1. STORE_HOMEPAGE:http://www.netsville.com
  2. STORE_HOMEPAGE:http://requiem.vv.com
  3. STORE_HOMEPAGE:http://www.funky-mamas.gov

STORE_EMAIL required

This should be a single e-mail address. It will serve as a "Reply-To" field in the mail Hazel sends. Don't try to enter multiple e-mail addresses here. That's what ORDER_RECIPIENTS is for.

Sample Values

  1. STORE_EMAIL:hazel@netsville.com
  2. STORE_EMAIL:quinn@vv.com
  3. STORE_EMAIL:hazel@funky-mamas.gov

MAIL_SHOPPER

Set MAIL_SHOPPER to 1 if you'd like to send e-mail (derived from the shopper invoice template to the shopper when their order is submitted.

MAIL_PATH required for Unix only

This is the path to your server's mail program. We suggest you use sendmail with Hazel, as it doesn't allow any special "escapes" which could pose a security risk.

Note: Hazel 2.0 for Windows NT includes an internal mailer and does not require this field. If she gripes, just enter C:/ or any other value to shut her up.

Sample Values

  1. MAIL_PATH:/usr/lib/sendmail
  2. MAIL_PATH:/usr/sbin/sendmail
  3. MAIL_PATH:C:/WINDOWS/BLAT.EXE

MAIL_HOST required for Windows NT only

Specify the host you use to handle your mail. Usually, your Internet Service Provider has a machine for this purpose or you have installed a mail server program on a certain machine. Your web server and mailhost may in fact be one in the same.

Note: This field is ignored in the Unix versions of Hazel. Only the Windows NT version requires this field.

Sample Values

  1. mailhost.netsville.com
  2. mx0.mindspring.com
  3. somewhere.com

ORDER_RECIPIENTS

The ORDER_RECIPIENTS field should be a comma-delimited list of everyone who should receive e-mail notification of an order. If you don't want to send any mail, leave this blank.

Sample Values

  1. ORDER_RECIPIENTS:hazel@netsville.com
  2. ORDER_RECIPIENTS:quinn@vv.com,quinn@bga.com
  3. ORDER_RECIPIENTS:hazel@funky-mama.gov, hazel@netsville.com

ORDER_SUBJECT

ORDER_SUBJECT will be the subject of all mail sent by Hazel. It can be anything, but should be short and to the point. If ORDER_RECIPIENTS is blank, this field is pointless.

Sample Values

  1. ORDER_SUBJECT:*** Hazel Order ***
  2. ORDER_SUBJECT:Your Qog Is Ready
  3. ORDER_SUBJECT:Here Comes a Funky Mama!


Getting Started HZML Rules Extras Advanced Reference
Download
Walkthrough
Configuration
The Products File
Order Reporting
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