You also should create a few pages such as badsearch.html and nomatch.html to catch certain conditions. badsearch.html handles cases in which invalid search data is passed into the search engine. nomatch.html handles conditions in which no items are found with the given search criteria. You might also want to create special pages. For example, you might be having a close-out sale. You can then link to these pages by using the
Using MiniVend, you also can use frames for your shopping site. Some special minivend.cfg variables such as
FrameSearchPage enable you to specify special pages for use with frames. Frames are given names for specifying the
TARGET value of an
<A HREF> tag. There are also the special frame names _
_self. To tell MiniVend that frames are in use, you should use the
[frames_on] tag in the first page that the customer accesses to enter the store. The
[framebase] tag sets the base target for a page.
Some demo pages that enable the use of frames are contained within the MiniVend package. If you're interested in this feature, I encourage you to take a look at the sample shopping site.
Additional Tools for Administration of Your Site
Also included with MiniVend are a few tools for the administration of your shopping cart site, which you learned about earlier. In the following sections, I describe two of the tools that might make your life easier as the caretaker of your online store.
vendpage One of the administrative tools available for you to use is the
vendpage program. This tool takes existing HTML files and converts them to MiniVend pages, redefining links in the format used by MiniVend. It follows a few simple rules:
- Any link that starts at the root or with a protocol specification is left as is.
- All relative links are changed relative to the PageDir directory specified in the configuration file.
- Links to names in the same document remain unchanged.
- Image specifications that are relative are changed such that they must be placed in the images directory relative to the HTTP servers DocumentRoot.
- Comments that begin and end with
[/vend]are stripped and passed on as vend tags.
For more information on this tool, refer to the
vendpage documentation, which is contained in the MiniVend package.
mat Another useful tool is the
mat program, as shown in Figure 13.8. It enables you to modify the current configuration remotely through a standard Web interface. With this tool, a user from any platform (that has a Web browser available) can start the MiniVend server, view error logs, and even modify the configuration settings. You will obviously want to put this tool into a protected CGI executable directory so that ordinary users cannot modify your store. Refer to Chapter 3 for more information on how to create a protected directory.
Figure 13.8. The
mat remote administration tool from within the browser.