Softgoods

Softgoods Hazel allows you to specify certain products as "softgoods" which can be delivered to the customer at the time of purchase. Each softgoods product ordered is assigned a cryptic string (a "pickup-id"), which Hazel records in her hazel-cat/pickups.txt file; when a PICKUP action is encountered with an ITEM of a recognizable pickup-id, she sends the file to the browser.

The basic function of softgoods Hazel is identical to the normal version, with certain features added for facilitating softgoods delivery. Shipping features of Hazel are disabled unless you've also purchased a hardgoods key. If you want to offer softgoods and hardgoods, we suggest starting with a hardgoods catalog, then purchasing a softgoods key (at a discounted price). We'll then send you information on how to add softgoods to your hardgoods catalog.

Adding Softgoods

Adding a softgoods product to your catalog is simple. Just add a field to the product's record telling Hazel where to find the downloadable file, then add some extra text to some of your templates to instruct the shopper how to download the product deliverable.

First, add a hazel-cat/softgoods directory to your catalog. This directory will contain all files you wish to be downloadable as softgoods. It may contain subdirectories.

Add the softgood to your catalog's products file. To enable that product as a softgood, simply add a PICKUP_FN line with its filename relative to your directory.

Here's a sample product entry:

SKUID: MP3ABC
NAME: A Wonderful Song (MP3 Format)
PRICE: 5.00
PICKUP_FN: mp3/abc.mp3

If a shopper ordered skuid MP3ABC, after completing the order, he'd have the option of downloading the file you've saved as hazel-cat/softgoods/mp3/abc.mp3 on your server.

The %HZH_SOFTGOODS_REGISTERED HZML token is set true if softgoods have been selected for delivery in the current order. To ask Hazel to initiate a softgoods download, issue the PICKUP action with an ITEM value of a particular pickup-id.

The following text can be pasted into your shopper_invoice.txt template. When rendered by Hazel, it will give the shopper a list of links to click to download their softgoods.

<Hazel-True Token="%HZH_SOFTGOODS_REGISTERED">
The "softgoods" you've ordered can be downloaded from the URL listed below. 
 They will be available until approximately one hour from now.

<Hazel-Loop Type="Pickups">
* %HZI_NAME: %HZU_MAIN_NONSECURE?action=pickup&item=%HZI_PICKUP_ID
</Hazel-Loop>

</Hazel-True>

Set DEFAULT_PICKUP_EXPIRES in hazel.config to the number of seconds a pickup is valid after completion of an order. It is overridden by a PICKUP_EXPIRES field on an individual softgood in the products file.

As of Hazel 3.510/4.052, the following pickup download loop is preferred.

<Hazel-Loop Type="Pickups">
* %HZI_NAME: %HZI_PICKUP_URL
</Hazel-Loop>

%HZI_PICKUP_URL is a URL formatted more like a traditional one, with the actual filename on the end, which aids in saving the downloaded file as its original filename (a problem with some browsers.)

BEWARE!

Fraud is the most important consideration when deploying softgoods. By default, we suggest you include your pickup links only in your shopper_invoice.txt template. In that case, you've at least got the shopper's email address for some accountability.

When selling softgoods, you'll want to use a payment gateway to collect payment instantly. Otherwise, you're sending files to people who haven't really paid you yet.

When using a payment gateway, Hazel's final "finishing" move is called via a script provided to you by Netsville. Each payment method has its own finishing name. For example, the Authorize.net interface signals order completion by issuing a FINISH_AUTHNET action to Hazel.

To prevent circumvention of the usual checkout process, you can add the following lines to your hazel.config file:

RESTRICT_COMPLETION:FINISH_AUTHNET
CMDLINE_ACTIONS:FINISH_AUTHNET

Doing so will ensure that an order can only be "finished" when routed through the proper Authorize.net interface. See each particular payment interface package for the finish action it uses.


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