MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

No Subject



Subject: Fix for erroneous "containated" msg & problem with "noframes"
From: balster@dmat.com or peimann@dmat.com


I just tried to install minivend 3.14 and ran into 2 minor bugs which I am
sending you the fixes for, and then I have one difficulty in my installation
which I wanted to ask if you have encountered before.  I did not see it in the
FAQ, so I thought I might ask.

#1)
In bin/minivend, about line 2920, the help lists one of the server switches as
      -unix            run with UNIX-domain socket
which should be:
      -unixmode        run with UNIX-domain socket

#2)
In bin/minivend, at about line 2961, I was ocassionally getting the message:
It seems your code is contaminated by a library with $', $`, or $&.|

This was happening whenever $overhead was zero (my server was too fast
on executing 5000 iterations of an empty loop).

I fixed this at about line 2956 by changing:
        my $overhead = (times)[0] - $start;
to:
        my $overhead = (times)[0] - $start;
        if ($overhead==0) $overhead=0.01;

#3)
The problem I am seeing is some weird behaviour with the "no frames" selection.

I can correctly access all of the pages in sample when I type in the URL to
them.  I can also click the "frames" version, although it doesn't seem to matter
if I do or don't.  I can type in the URL (without the ?sessionid) for the page 
which will come up when the "no frames" button is selected, and the page comes 
up fine.  

I get into trouble when I actually click the "no frames" selection 
(/cgi/vlink/noframes) under "DISPLAY" in the leftside frame.  
After I click "no frames", none of the HTML is processed any longer.  From that
point on, I only see plain text, as if the headers were changed from 
text/html to text/plain.  Reload button on netscape does not help, nor can I 
type in a URL which used to work.  If I try using MS Internet Explorer instead 
of netscape, then IE5 and MiniVend Server seem to go into an infinite retry 
loop (until the IE5 STOP button is pushed).  No screen comes up on IE5 when 
this condition starts.  After several (51) retries, minivend starts to spew 
messages like the following:
	WARNING: POSSIBLE BAD ROBOT.  51 accesses with
	no 30 second pause.

I can exit netscape and/or IE5 and the problem still persists.  Once I restart 
the minivend server, then I can hit reload on the browser, and the page shows 
up correctly, with the HTML script processed.  

I have now gone thru 3 installations with makecat, and the same problem exists 
in all of them.


We are running apache 1.3.0 (Unix) Debian/GNU, built 8/14/1998 22:22:23
Here is the section we added to /etc/apache/httpd.conf file:
<VirtualHost  test0 test0.dmat test0.dmat.com>
  Alias           /image         /home/site/test0/image/
  Alias           /image/        /home/site/test0/image/
  Alias           /Error.log     /home/site/test0/Error.log
  Alias           /Script.log    /home/site/test0/Script.log
  Alias           /Transfer.log  /home/site/test0/Transfer.log
  ErrorLog        /home/site/test0/Error.log
  DocumentRoot    /home/site/test0/html
  ScriptAlias     /cgi           /home/site/mall/cgi/
  ScriptAlias     /cgi/          /home/site/mall/cgi/
  ScriptAlias     /test0         /home/site/mall/cgi/vlink/
  ScriptAlias     /test0/        /home/site/mall/cgi/vlink/
  ScriptLog       /home/site/test0/Script.log
  ServerAdmin     peimann@dmat.com
  ServerName      test0.dmat.com
  TransferLog     /home/site/test0/Transfer.log

  <Directory /home/site/test0/
    AllowOverride   None
    Options         None
  </Directory>

/home/site/test0/Error.log has no messages
/home/site/test0/Transfer.log has large blocks of the following when IE5 starts
looping:
10.0.0.36 - - [27/Jul/1999:15:36:30 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15532
10.0.0.36 - - [27/Jul/1999:15:36:31 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15529
10.0.0.36 - - [27/Jul/1999:15:36:32 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15532
10.0.0.36 - - [27/Jul/1999:15:36:33 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15561
10.0.0.36 - - [27/Jul/1999:15:36:34 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15592
10.0.0.36 - - [27/Jul/1999:15:36:35 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15589
10.0.0.36 - - [27/Jul/1999:15:36:36 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15592
10.0.0.36 - - [27/Jul/1999:15:36:37 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15566
10.0.0.36 - - [27/Jul/1999:15:36:38 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15619
10.0.0.36 - - [27/Jul/1999:15:36:40 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15583
10.0.0.36 - - [27/Jul/1999:15:36:41 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15619
10.0.0.36 - - [27/Jul/1999:15:36:42 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15583
10.0.0.36 - - [27/Jul/1999:15:36:43 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15592
10.0.0.36 - - [27/Jul/1999:15:36:44 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15566
10.0.0.36 - - [27/Jul/1999:15:36:45 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15592
10.0.0.36 - - [27/Jul/1999:15:36:46 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15583
10.0.0.36 - - [27/Jul/1999:15:36:47 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15569
10.0.0.36 - - [27/Jul/1999:15:36:48 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15583
10.0.0.36 - - [27/Jul/1999:15:36:49 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15580
10.0.0.36 - - [27/Jul/1999:15:36:51 -0700] "GET /cgi/vlink/index?KyCKIewE;;197 HTTP/1.1" 302 15589
/home/site/test0/error.log has large blocks of the following when IE5 starts
looping:
10.0.0.49 ako7vpJT:10.0.0.36 - [27/July/1999:14:14:37 -0700] buysail /cgi/vlink/index WARNING: POSSIBLE BAD
ROBOT.  331 accesses with
> no 30 second pause.
>
10.0.0.49 ako7vpJT:10.0.0.36 - [27/July/1999:14:14:37 -0700] buysail /cgi/vlink/index WARNING: POSSIBLE BAD
ROBOT.  332 accesses with
> no 30 second pause.
>
10.0.0.49 ako7vpJT:10.0.0.36 - [27/July/1999:14:14:37 -0700] buysail /cgi/vlink/index WARNING: POSSIBLE BAD
ROBOT.  333 accesses with
> no 30 second pause.
>

the global /home/site/mall/Error.log file is empty
the global /home/site/mall/Transfer.log file is empty


Our minivend 3.14 was downloaded from www.minivend.com on 7/9/1999
the minivend.cfg file (443 lines) is:
## Catalog                     Default: blank
#
# Specify a catalog to be run by this MiniVend server. The three required
# parameters are the name, the directory, and the script name that (the path
# vlink is named to) will run the catalog.  Additional parameters are aliases
# for the catalog.
#
# If FullUrl is enabled, you will need to set the full server and script path.
#
# This is a multiple directive -- the number of catalogs that can be defined is
# limited only by your machine resources.
#
#Catalog  simple /home/user/catalogs/simple /cgi-bin/simple /cgi-bin/alias
#Catalog  simple /home/site/test0/simple /cgi-bin/simple /cgi-bin/alias
Catalog       buysail /home/site/test0 /cgi/vlink /cgi/slink
Catalog       test1 /home/site/test1 /cgi/test1 /test1



## AdminUser                    Default: blank
#
# The user and password which will allow access to the special mv_admin
# administration catalog. No default; if not present then access is
# disabled.
#
# The password is a normal encrypted string unless the global
# Variable MV_NO_CRYPT is non-blank and non-zero.
#
Variable   MV_NO_CRYPT   1
AdminUser  minivend:nevairbe


## AllowGlobal                  Default: blank
#
# Normally MiniVend does not allow references to global routines for catalog
# subroutines and UserTag definitions.  Set to the name of any catalogs allowed
# to use global routines and variables.  THIS IS UNSAFE unless you trust the
# user not only to write good Perl code, but to have access to all files
# readable and writable by MiniVend.
#
AllowGlobal _mv_admin


## CheckHTML                    Default: blank
#
# The name and arguments of an external program for checking page HTML.
#
#    CheckHTML  /usr/local/bin/weblint -s -
#
# Do not use redirection of I/O in this call. You will always receive
# stderr output. Activate on the page with [tag flag checkhtml][/tag]
# at the very top or very bottom.
#
# CheckHTML


## DisplayErrors                Default: No
#
# Controls whether program errors will be appended to the browser display.
#
# DisplayErrors Yes


## DomainTail                   Default: Yes
#
# Implements the domain/ip session qualifiers so that only the major domain is
# used to qualify the session ID.  This is a compromise on security, but it
# allows non-cookie-accepting browsers like AOL's V2.0 to use multiple proxy
# servers.
#
# Default is yes, since most everyone wants AOL to work.
#
# DomainTail


## DumpStructure                Default: No
#
# Causes MiniVend to dump complete configuration hash to a file 
# with a .structure extension. Useful for seeing what the catalog
# and MV configuration really are.
#
# DumpStructure


## FullURL                      Default: No
#
# Normally MiniVend determines which catalog to call by determining the
# SCRIPT_NAME from the CGI call. This means that different (and maybe virtual)
# hosts cannot use the same SCRIPT_NAME to call different catalogs. Set FullUrl
# to yes to differentiate based on the calling host.  You must then set the
# server name in the Catalog directive accordingly, i.e.
# yourdomain.com/cgi-bin/sample.
#
# FullUrl


## GlobalSub                    Default: blank
#
# Defines a F<global> subroutine for use by the B<[perl sub] subname arg
# [/perl]> construct.
#
# IMPORTANT NOTE: These global subroutines are NOT SUBJECT TO SECURITY CHECKS
# -- they can do most anything!  For most purposes, scratch subroutines
# or catalog subroutines are better.
#
# You may define as many as desired.
#
GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }


## HammerLock                   Default: 30
#
# The number of seconds after which a locked or running session could be
# considered to be lost due to malfunction.
#
# Controls the timeout for killing an apparently hung process, like a glimpse
# search, as well as the lock on a session.
#
# If you don't have long-running searches or long-running database imports,
# consider setting this to 15 seconds or less. If you may have long-running
# searches, consider setting to 60 seconds.  The default of 30 is probably a
# good bet for most catalogs.
#
# HammerLock


## HouseKeeping              Default: 60
#
# How often (in seconds) MiniVend will wake up to look for user reconfiguration
# requests and check for hung processes.
#
# If you have a very lightly used server then you could set this to a high
# number to allow MiniVend to be swapped to disk more readily.
#
HouseKeeping 5


## IpHead                    Default: No
#
# Implements the domain/ip session qualifiers so that only the first
# dot-quad of the IP address is used to qualify the session ID. This is a
# compromise on security, but it allows non-cookie-accepting browsers like
# AOL's V2.0 to use multiple proxy servers.
#
# DomainTail is preferable unless one of your HTTP servers does not do host
# name lookups.
#
# Default is no, and DomainTail must be set to 'no' for it to operate.
#
# IpHead


## IpQuad                    Default: 1
#
# Modifies IpHead to set the number of dot-quads checked.
#
# If you use PGP or CyberCash, you should probably use the 
# catalog.cfg directive "WideOpen" instead.
#
# IpQuad 1


## LockoutCommand            Default: blank
#
# The name of a command (as you would enter it from the shell) that will lock
# out the host IP of an offending system. The IP address will be substituted
# for the first occurrence of the string %s. See the docs under RobotLimit.
#
# LockoutCommand ipfwadm -I -i deny -S %s



## Mall                      Default: No
#
# Whether MiniVend will send cookies corresponding to only the CGI program in
# use.  Allows different stores in the same domain to each store separate
# cookie information -- affects cookie path.
#
# May be used to control other settings in the future.
#
# Mall


## MaxServers                Default: 4
#
# The number of servers that MiniVend will allow to serve requests
# simultaneously.  Set lower if you wish to conserve memory at all costs.
#
MaxServers 5


## NoAbsolute                 Default: No
#
# Whether MiniVend [file ...] and other tags can read any file on the system.
# The default is to allow any file to be read -- this should be changed in a
# multi-user environment.
#
# NoAbsolute


## PIDcheck                   Default: No
#
# If non-zero, enables a check of running MiniVend processes during the
# housekeeping routine. If a process has been running (or is hung) for
# longer than PIDcheck seconds then a kill -9 will be issued and the
# server count decremented.
# 
# During the housekeeping routine, the number of servers checked by
# MaxServers will be recounted based on PID files.
# 
# Default is 0, disabling the check. It is recommended that you
# use this only for MiniVend 3.12 or higher, and it is recommended that
# you *do* use it for that version.
# 
PIDcheck  300


## SafeUntrap                   Default: ftfile sort
#
# Sets the codes that will be untrapped in the Safe.pm module, used for
# embedded Perl and conditional operations.  You can see the Safe.pm
# documentation by typing 'perldoc Safe' at the command prompt.  The default is
# 'ftfile sort' (or '249 148' if using Perl 5.003), which untraps the file
# existence test operator and the sort operator.  Define it as blank to not
# allow any besides the very restrictive Safe.pm defaults.
#
# SafeUntrap


## SubCatalog                   Default: none
#
# Allows definition of a catalog which shares most of the characteristics of
# another catalog.  Only the items that are changed from the base catalog are
# added.  The parameters are 1) the catalog ID 2) the base catalog ID, 3) the
# directory to use (typically the same as the base catalog), and 4) the
# SCRIPT_NAME that will trigger the catalog. Any additional parameters are
# aliases for the SCRIPT_NAME.
#
# The main reason that this would be used would be to conserve memory in a
# series of stores that share most of the same pages or databases.
#
# SubCatalog   sample2 sample /usr/catalogs/sample /cgi-bin/sample2


## TcpHost                      Default: localhost
#
# The host(s) that will be allowed to generate MiniVend requests when running
# in INET mode.  You are responsible for security!  Remember that socket
# communications are not necessarily secure when going over a wire!
#
# TcpHost

## TcpMap                       Default: localhost#
#
# The port(s) that will be monitored for running MiniVend requests.
# Specified by a port name and then a catalog name (or - for all
# catalogs).
#
TcpMap  7786 -


## TcpPort                      Default: 7786
#
# The port that will be monitored for MiniVend requests when running in INET
# mode.
#
# This is deprecated by TcpMap.
#
# TcpPort


## TolerateGet                  Default: No
#
# Allows forms to use METHOD=GET instead of POST.
#
TolerateGet  Yes


## Variable                     Default: none
#
# Variable values that can be accessed on pages of ALL catalogs with
# @@VARIABLE@@ notation. A few special ones have MV_ prefixes, if you
# don't use that prefix you will be fine.
#
Variable TEST_VARIABLE Test of global variable OK.


## UserTag                      Default: none
#
# Custom tag for every catalog served by this MiniVend.
#
# UserTag

# [loc locale*] message [/loc]
#
# This tag is the equivalent of [L] ... [/L] localization, except
# it works with contained tags
#
UserTag loc hasEndTag   1
UserTag loc Interpolate 1
UserTag loc Order locale
UserTag loc Routine <<EOF
sub {
    my ($locale, $message) = @_;
    return $message unless $Vend::Cfg->{Locale};
    my $ref;
    if($locale) {
        return $message
            unless defined $Vend::Cfg->{Locale_repository}{$locale};
        $ref = $Vend::Cfg->{Locale_repository}{$locale}
    }
    else {
        $ref = $Vend::Cfg->{Locale};
    }
    return defined $ref->{$message} ? $ref->{$message} : $message;
}
EOF

# [var name=variablename global=1]
#
# This tag is the equivalent of __VARIABLE__ except that it will
# works in other variables
#
UserTag var Interpolate 1
UserTag var PosNumber 2
UserTag var Order name global
UserTag var Routine <<EOF
sub {
    $_[1] and return $Global::Variable->{shift @_};
    return $Vend::Cfg->{Variable}{shift @_};
}
EOF

# [summary  amount=n.nn
#           name=label*
#           hide=1*
#           total=1*
#           reset=1*
#           format="%.2f"*
#           currency=1* ]
#
# Calculates column totals (if used properly. 8-\)
# 
#
UserTag summary Order amount name currency format total reset hide
UserTag summary PosNumber 6
UserTag summary Routine <<EOF
use vars qw/%summary_hash/;
sub {
    my ($amount, $name, $currency, $format, $total, $reset, $hide) = @_;
	unless ($name) {
		$name = 'ONLY0000';
		%summary_hash = () if Vend::Util::is_yes($reset);
	}
	else {
		$summary_hash{$name} = 0 if Vend::Util::is_yes($reset);
	}
	$summary_hash{$name} += $amount if length $amount;
	$amount = $summary_hash{$name} if Vend::Util::is_yes($total);
	return '' if defined $hide && Vend::Util::is_yes($hide);
	return sprintf $format, $amount if $format;
    return Vend::Util::currency($amount) if $currency;
    return $amount;
}
EOF




# [db-date table format]
#
# This tag returns the last-modified time of a database table,
# 'products' by default. Accepts a POSIX strftime value for
# date format; uses '%A %d %b %Y' by default.
#
UserTag  db-date  Order table format
UserTag  db-date  PosNumber 2
UserTag  db-date  Routine <<EOF
sub {
    my ($format, $db) = @_;
    $format = '%A %d %b %Y';

	$db = 'products' unless $db;

    my $mtime = (stat($Vend::Cfg->{Database}{'file'}))[9];
    return POSIX::strftime($format, localtime($mtime));

}
EOF

# [db-count table]
#
# This tag returns the number of records in a database table,
# 'products' by default.
#
UserTag  db-count  Order table
UserTag  db-count  PosNumber 1
UserTag  db-count  Routine <<EOF
sub {
    my ($db) = @_;

    $db = 'products' unless $db;

    my $ref = Vend::Data::database_exists_ref($db)
        or return "Bad table $db";
    $ref = $ref->ref();
    my $count;
    while ($ref->each_record()) {
        $count++;
    }
    return $count;
}
EOF

UserTag bar-button Order page current
UserTag bar-button PosNumber 2
UserTag bar-button HasEndTag 1
UserTag bar-button Routine   <<EOR
sub {
	use strict;
	my ($page, $current, $html) = @_;
	$current = $Global::Variable->{MV_PAGE}
		if ! $current;
	$html =~ s:\[selected\]([\000-\377]*)\[/selected]::i;
	my $alt = $1;
	return $html if $page ne $current;
	return $alt;
}
EOR

### The old user database stuff
### DON'T ### include userdb.cfg

### The minivend administration stuff
#include admin/mv_admin.cfg

### Include if you want non-English error messages. Not complete.
# #include locale.error

#include flycat.cfg
#include form_mail.cfg




Our catalog /home/site/test0/catalog.cfg (1533 lines) is:
# Define the site-specific information
#
Variable    MALL_URL        http://mall.dmat.com/
Variable    MALL_BANNER     http://mall.dmat.com/images/mall.jpg

Variable    SERVER_NAME     test0
Variable    CGI_URL         /cgi
Variable    SECURE_SERVER   http://test0
Variable    ORDERS_TO       orderdesk@dmat.com
Variable    IMAGE_DIR       /images
Variable    DOCROOT         /home/site/mall/HTML
Variable    SAMPLEHTML      /home/site/mall/HTML/buysail
Variable    SAMPLEURL       http://test0/buysail

Variable    COMPANY         SailBoats International
Variable    COPYRIGHT_YEAR  1999
Variable    ADDRESS         601 Pine Avenue
Variable    CITY            Santa Barbara/CA/93117
Variable    PHONE           (805) 964-0733
Variable    TOLLFREE        (800) 555-1212
Variable    FAX             (805) 964-0734
Variable    LOGO            buysailbig.jpg
Variable    SMLOGO          boatcartoon.jpg
Variable    HEADERBG        BGCOLOR=#00F0F0
Variable    TABLEFG         BGCOLOR=#EEEEEE
Variable    HEADERTEXT      #000000
Variable    BARBG           #00F0F0
Variable    BARTEXT         #FF0000
Variable    BGIMAGE         blue_pap.gif
Variable    BGCOLOR         #FFFFFF
Variable    ENCRYPTOR       none
Variable    TAXAREA         CA
Variable    TAXRATE         CA=7.75
Variable    TAXSHIPPING     OH

## END SITE CONFIGURATION

# Used to enable order query security
Variable      MV_USERDB_ACL_TABLE  userdb
Variable      MV_USERDB_ACL_COLUMN acl

## Whether to NOT encrypt passwords
Variable      MV_NO_CRYPT      

## Set some menubars and headers
ConfigDir pages
Variable      LEFTSIDE   <leftside
Variable      RIGHTSIDE  <rightside
Variable      NO_RIGHT   <no_right
Variable      MENUBAR    <menubar
Variable      MENUBOTTOM <menubottom
Variable      LOGOBAR    <logobar
Variable      COPYRIGHT  <copyright
ConfigDir config

## Set these to enable CyberCash

# These are usually all you need for CyberCash 3
# Edit to suit
#
#Variable     CYBER_CONFIGFILE    /home/you/mck-kit/yourid75/mck-cgi/merchant_conf
#Variable     CYBER_VERSION       3.2

# Use these instead for CyberCash 2
# Edit to suit
#
#Variable     CYBER_PORT          8000
#Variable     CYBER_HOST          localhost
#Variable     CYBER_SECRET        test-secret-fdc
#Variable     CYBER_MODE          mauthonly
#Variable     CYBER_CURRENCY      usd
#Variable     CYBER_PRECISION     2

########################## TURN ON PARSING
# Allow substitution of site-specific information
########################## 

ParseVariables  Yes

###
###   These first three required for the catalog to run at all
###

########### MailOrderTo
##
## Default: UNDEFINED
#
# This MUST be defined, or the catalog will not load.
# The address to mail orders to.
#
#JLB:990726:MailOrderTo             __ORDERS_TO__
MailOrderTo             OrderDesk@dma.com


########### VendURL
##
## Default: UNDEFINED
#
# The URL that calls the main MiniVend dispatch program. Must
# be defined.  This will be suggested as the name to move the
# compiled dispatch program to. It should look something like:
#
#         http://YOUR_SERVER_NAME/cgi-bin/vlink
#
#JLB:990726:VendURL                 http://__SERVER_NAME____CGI_URL__
VendURL                 http://test0.dmat.com/cgi/vlink


########### SecureURL
##
## Default: blank
#
# If you are using an SSL or Secure HTTP server, this is the URL
# which will be used for processing orders securely.  For SSL, it
# is usually the same URL as normal, except that it uses
# 'https' instead of 'http'. Add the 'https' if you have a
# secure server.
#
SecureURL               __SECURE_SERVER____CGI_URL__

###
###   The following few directives should be defined
###   first in the file, as some other directives in the
###   configuration depend on their value.
###
###   The defaults work for most installations.
###


########### PageDir
##
## Default: pages
#
# The subdirectory of VendRoot where the actual MiniVend pages
# reside.
#
# PageDir


########### ProductDir
##
## Default: products
#
# The location of the product database files.
#
# ProductDir


########### DataDir
##
## Default: products
#
# The location of the extra database files.
#
# DataDir


###
###   The remaining directives can be defined in any
###   order, providing the ones above have been set first
###


########### Database
##
## Default: products products.asc 1
#
# Definition of an arbitrary database, in the form
# "Database database file type", where "file" is the name of an
# ASCII file in the same format as the products database.  The
# file is relative to VendRoot, and is put in DataDir if no
# path is provided.  Records can be accessed with the
# [data database field key] tag.
#

Database            products     products.asc      TAB
Database            products     INDEX             category
Database            pricing      pricing.asc       TAB
Database            transactions transactions.txt  TAB
Database            userdb       userdb.asc        TAB
Database            country      country.asc       TAB
Database            locale       locale.asc        TAB
Database            Ground       Ground.csv        CSV
Database            2ndDayAir    2ndDayAir.csv     CSV
Database            NextDayAir   NextDayAir.csv    CSV

# Here are some sample product database definitions for various SQL 
# database types. These might even work for you if the SQL package
# in question has an existing data source with that name -- these
# may be the defaults in the distributed packages.
#
# For mSQL to work you would do:  msqladmin create minivend
#
# For mysql to work you would do: mysqladmin create minivend
#
#Database            products products.asc dbi:mysql:minivend:localhost:3333
#Database            products products.asc dbi:mSQL:minivend:localhost:1114
#Database            products products.asc dbi:ODBC:TCP/IP localhost 1313
#Database            products products.asc dbi:Solid:TCP/IP localhost 1313

### Needed for Oracle, Solid and some others
#Database            products ChopBlanks   1

### Needed for Oracle and some others
#Database            products UPPERCASE    1

# Change some data type definitions
#Database            products COLUMN_DEF   code=char(20), nontaxable=char(4)
#Database            products COLUMN_DEF   price=char(20)
#Database            products COLUMN_DEF   title=char(64)

# Set some other parameters
#Database            products DELIMITER    TAB
#Database            products LongReadLen  128

# Not needed unless your database requires a login
#Database            products USER   you
#Database            products PASS   XXXXXX

# More database settings are discussed in the documentation.


########### ActionMap
##
## Default: blank
#
# Allows setting of button actions for particular names.  The
# predefined names are listed in the documentation, and would be
# overwritten if re-defined.
#
# Can be set as many times as necessary. Not case sensitive.
#
ActionMap            refresh change
ActionMap            refresh validate
ActionMap            cancel erase
ActionMap            submit next
ActionMap            control color


########### AdminDatabase
##
## Default: blank
#
# When set to one or more MiniVend database identifiers, any pages using data
# items from the specified database(s) will not be allowed for display unless
# the user the catalog operator -- i.e. is authenticated by one of Password ,
# MasterHost , or RemoteUser . The special page 'violation' will be displayed
# if another user attempts to access a page containing elements from the
# database(s).   
#
# AdminDatabase   inventory


########### AdminPage 
##
## Default: blank
#
# When set to one or more MiniVend page names, pages with that name will not be
# allowed for display unless the user the catalog operator -- i.e. is
# authenticated by one of Password , MasterHost , or RemoteUser . The special
# page 'violation' will be displayed if another user attempts to access the
# page(s). 
#
# AdminPage       config/menu


########### AlwaysSecure
##
## Default: blank
#
# Determines whether checkout page operations should always be
# secure.  Set it to the name of pages that should always be secure,
# separated by spaces and/or tabs.
#
AlwaysSecure         ord/checkout


########### AsciiBackend
##
## Default: blank
#
# A file name to log order fields in (set by BackendOrder).
# Unless preceded by a leading '/', will be placed relative to VendRoot.
# If the first character is a '|', it is the name of a program to send the
# fields to.
#
# AsciiBackend         etc/backend.asc


########### AsciiTrack
##
## Default: blank
#
# A file name to log formatted orders in. Unless preceded by a leading '/',
# will be placed relative to VendRoot.
#
AsciiTrack           etc/tracking.asc


########### BackendOrder
##
## Default: blank
#
# Controls the fields that are prepended to the item codes and quantities
# for the backend ordering capability.  These are the values from the
# user form in 'order.html'.  You can access any value in that
# hash. If blank, no backend ordering is in force.
#
#
# BackendOrder name,company,address,city,state,zip,country,account,mv_shipmode


########### ButtonBars
##
## Default: blank
#
# Button bars 0 to 15, specified with a Vend-style filename, i.e. no
# .html suffix, (even though the file will have one), relative
# to the MiniVend page directory. Called by the [buttonbar n] tag,
# numbers start from 0.
#
ButtonBars           buttonbar


########### CheckoutFrame
##
## Default: blank
#
# The frame name where the checkout page will go, if frames are
# enabled.
#
# CheckoutFrame


########### CheckoutPage
##
## Default: order
#
# The name of the default page to send the user to when the [finish-order]
# tag is used.
#
CheckoutPage         ord/basket


########### ClearCache
##
## Default: No
#
# The name of the default page to send the user to when the [finish-order]
# tag is used.
#
# A yes/no directive. When set to yes, each time the catalog is reconfigured or
# the MiniVend server is restarted the page and search caches will be cleared.
#
ClearCache  Yes


########### CollectData
##
## Default: blank
#
# The points at which to log various data items collected by MiniVend,
# such as failed or successful searches.  This allows you to find out what
# your customers are searching for and NOT finding -- perhaps you want to
# add it, or change your product description to match.
#
# The choices to enter are:
#
#   matched    Search strings that match
#   nomatch    Search strings that fail to match
#   page       Pages that are accessed
#   nopage     Pages that are not found
#   order      Various data about ordered items
#
# Enter as a space or comma-separated list, i.e.
#
# CollectData    matched,nomatch,page


########### CommonAdjust
##
## Default: blank
#
# Part of the price adjustment scheme -- see the documentation.
#
CommonAdjust   pricing:q2,q5,q10,q25,q100, ;products:price, ==color:pricing, ==size:pricing


########### ConfigDir
##
## Default: config
#
# The default directory where directive values will be read from when using the
# <file notation. The name is relative to the catalog directory unless preceded
# by a /.
#
# ConfigDir      variables


########### CookieDomain
##
## Default: blank
#
#  Allows you to set a domain so that two servers can handle traffic.  It must
#  have at least two periods or browsers will ignore it. 
#
#  CookieDomain   __SERVER_NAME__


########### CookieLogin
##
## Default: No
#
#  Allows users to save their username/password (for Vend::UserDB)
#  in a cookie. Expireation set by SaveExpire, renewed every time
#  they log in.
#
CookieLogin  Yes


########### Cookies
##
## Default: Yes
#
# Determines whether we will send (and read back) a cookie to
# get the session ID for links that go outside the catalog.
#
# Cookies No


########### CreditCardAuto
##
## Default: No
#
# Enter 'Yes' if you wish to enable MiniVend's encrypted credit card
# handling. This whatever is in EncryptProgram (preferably PGP) to encrypt
# credit card information according to a standard scheme.  See the
# documentation for more information.
#
#
CreditCardAuto      Yes


########### CustomShipping
##
## Default: blank
#
# The default database column which is the key to the custom shipping
# calculation. If left blank, no custom shipping calculation is done.
#
CustomShipping       Yes


########### CyberCash
##
## Default: No
# 
# Enables CyberCash processing. Mutually exclusive with
# CreditCardAuto.
#
# CyberCash          Yes


########### DefaultShipping
##
## Default: default
#
# Sets the initial shipping mode.
#
DefaultShipping      0


########### Delimiter
##
## Default: TAB
#
# One of TAB, PIPE, CSV, or your own custom delimiter. (It is not
# suggested that you use a custom delimiter). TAB means a tab-delimited
# database by default, PIPE a pipe-delimited one, and CSV a quote-comma
# format. TAB is STRONGLY recommended, as it makes search definitions
# much easier.
#
# Delimiter


########### DescriptionField
##
## Default: description
#
# The field that will be accessed with the [item-description] element.
#
# DescriptionField  short_desc


########### DisplayErrors
##
## Default: No
#
# If the administrator has enabled DisplayErrors globally, then setting this to
# "Yes" will display the error returned from MiniVend in case something is wrong
# with embedded Perl programs, tags, or (horrors!) MiniVend itself.  Usually you
# will only want to use this during development or debugging.
#
# DisplayErrors     Yes


########### DynamicData
##
## Default: blank
#
# When set to one or more MiniVend database identifiers, any pages using data
# items from the specified database(s) will not be cached or built statically.
#
# DynamicData         inventory


########### EncryptProgram
##
## Default: blank
#
# The fully-qualified path name of a program which will encrypt
# a credit card number for storage in the session database. The parameters
# %p and %f are substituted with the password and temporary file name
# to use, respectively.
#
#  !!!!PLEASE EDIT THIS!!!!
#
# The cat program is used for demonstration purposes -- you should
# use PGP instead.
#
#       EncryptProgram  /usr/local/bin/pgp -feat __ORDERS_TO__ 2>/dev/null
#
EncryptProgram  __ENCRYPTOR__


########### ExtraSecure
##
## Default: No
#
# Disallows access to pages which are marked with AlwaysSecure unless the
# browser is in HTTPS mode. A yes/no directive -- default is 'No'.
#
# ExtraSecure  Yes 


########### FieldDelimiter
##
## Default: 
#
# In conjunction with RecordDelimiter, allows custom database formats to be
# defined. See the documentation for use of this advanced feature.


########### FinishOrder
##
## Default: Finish Incomplete Order
#
# The value that will be used as the anchor text for the
# [finish-order] tag. Can be text or an image -- any legal
# HTML. This is deprecated -- we suggest [if items][page ord/basket]...[/if]
# instead.
#
# FinishOrder          <IMG SRC="contents.gif">
#

########### FormIgnore
##
## Default: blank
#
# Set to the name(s) of variables that should not be carried in the user
# session values. Must match exactly and are case sensitive.
#
# FormIgnore    mv_searchtype
 

########### FractionalItems
##
## Default: no
#
# Whether items in the shopping cart should be allowed to be
# fractional, i.e. 2.5 or 1.25.
#
# FractionalItems


########### FrameFlyPage
##
## Default: blank
#
# The MiniVend-style page name (i.e. no .html extension, relative to
# PageDir) which contains the special on-the-fly page for when frames are in
# use. If not set (the default), the standard flypage will be used.
#
# FrameFlyPage      frame_flypage


########### FrameLinkDir
##
## Default: blank
#
# The relative directory where on-the-fly pages will be sent during static page
# builds -- it is relative to StaticDir. Default is 'framefly'.
#
# FrameLinkDir      fr_fly


########### FrameOrderPage
##
## Default: blank
#
# The special page to use instead of 'order.html' for the order
# page.  This allows you to put the item-list in a separate window/frame
# from the name/address/account information.
#
# FrameOrderPage


########### FrameSearchPage
##
## Default: blank
#
# The special page to use instead of 'search.html' for the search
# page.  This allows you to define separate windows for frame and
# non-frame browsers.
#
# FrameSearchPage


########### FramesDefault
##
## Default: no
# 
# Whether the first access by a user will place them in frames mode.
# 
# FramesDefault


########### Glimpse
##
## Default: glimpse
#
# Controls the location of the external glimpse search engine,
# and whether Glimpse will be used.  Set to the path of your
# Glimpse program.  If you want special options, see the
# documentaton on the search engine.
#
# Glimpse  /usr/local/bin/glimpse


########### Help
##
## Default: blank
#
# Files with help/macro items, specified with a Vend-style filename,
# i.e. no .html suffix, (even though the file will have one),
# relative to the MiniVend page directory. Help items are
# keyed by name.  Called by the [help item] tag.
#
Help                    hintfile


########### ImageAlias
##
## Default: blank
#
# Aliases for images, ala Apache/NCSA ScriptAlias and Alias directives. 
# Relocates images based in a particular directory to another for MiniVend use
# -- operates *after* ImageDir. Useful for editing MiniVend pages with an HTML
# editor.
#
# ImageAlias  /images/  /thiscatalog/images/


########### ImageDir
##
## Default: blank
#
# Where the images are, relative to HTTP server DocumentRoot.
# This allows images to be referenced in a relative fashion
# and translated by MiniVend.  Useful for multi-catalog setups
# using common pages.  MUST HAVE A TRAILING SLASH.
#
#JLB:990726:ImageDir                __IMAGE_DIR__/
ImageDir                /images/


########### ImageDirInternal
##
## Default: blank
#
# Where the images are, relative to HTTP server DocumentRoot.
# This allows images to be referenced in a relative fashion
# and translated by MiniVend.  Useful for multi-catalog setups
# using common pages.  MUST HAVE A TRAILING SLASH.
#
#JLB:990726:ImageDirInternal        http://__SERVER_NAME____IMAGE_DIR__/
ImageDirInternal        http://test0.dmat.com/images/



########### ImageDirSecure
##
## Default: blank
#
# Where the images are for secure pages only.
# MUST HAVE A TRAILING SLASH.
#
# ImageDirSecure        __SECURE_SERVER____IMAGE_DIR__/
#JLB:990726:
ImageDirSecure        secure/images/


########### Locale
##
## Default: none (U.S.)
#
# Sets the special locale array. See the documentation. The below
# definition will cause monetary value of 3,400.00 in U.S. notation
# to be displayed as 3.400,00. To remove the decimal places, make
# frac_digits '0'.
# 
# Locale en_US mon_decimal_point .
# Locale en_US mon_thousands_sep ,
# Locale en_US frac_digits 2
# Locale en_US currency_symbol $
# Locale en_US p_cs_precedes 1

########### LocaleDatabase
##
## Default: none
#
# Sets a database that will be used as the basis for the Locale
# settings. The columns are the locales, the rows the keys.
#
LocaleDatabase  locale


########### LogFile
##
## Default: etc/log
#
# The file where global data collected (set by CollectData) is logged.
#
# LogFile


########### MasterHost
##
## Default: blank
#
# The IP address that can reconfigure this server (if the reconfigure
# program is served that way). Default is blank, disabling remote
# check of IP address.
#
# MasterHost


########### MixMatch
##
## Default: No
#
# Sets whether quantity price breaks will be on TOTAL quantity or
# per-item quantity. Default is no mix and match, pricing is on
# a per-item basis.
#
# MixMatch


########### Mv_Background
##
## Default: blank
#
# Background patterns, 1 through 15.  Start with a BEGIN,
# then define up to 15 backgrounds for the 15 schemes.
#
Mv_Background BEGIN __BGIMAGE__

########################## Turn off parsing

########### Mv_BgColor
##
## Default: blank
#
# Background colors, 1 through 15.  Start with a BEGIN tag,
# then define up to 15 colors for the 15 schemes.  Enter
# 'none' for the default.
#
Mv_BgColor           BEGIN __BGCOLOR__

ParseVariables  No


########### Mv_LinkColor
##
## Default: blank
#
# Link colors, 1 through 15.  Start with a BEGIN tag, then
# define up to 15 colors for the 15 schemes.  Enter 'none' for
# the default.
#
Mv_LinkColor         BEGIN none white black ltgreen


########### Mv_TextColor
##
## Default: blank
#
# Text colors, 1 through 15.  Start with a BEGIN tag, then
# define up to 15 colors for the 15 schemes.  Enter 'none' for
# the default.
#
Mv_TextColor         BEGIN none ltgreen blue none


########### Mv_VlinkColor
##
## Default: blank
#
# Visited link colors, 1 through 15.  Start with a BEGIN tag, then
# define up to 15 colors for the 15 schemes.  Enter 'none' for
# the default.
#
Mv_VlinkColor        BEGIN none orange purple ltgreen


########### Mv_AlinkColor
##
## Default: blank
#
# ALINK colors, 1 through 15.  Start with a BEGIN tag, then
# define up to 15 colors for the 15 schemes.  Enter 'none' for
# the default.
#
Mv_AlinkColor        BEGIN none brown brown brown

########### NewEscape
##
## Default: No
#
# A yes/no directive. When set to Yes, it disallows the old-style
# period escaping of one-click search spec strings, and allows
# HTTP-style escaping of passed arguments (the [page name arg]
# tag, among others). 
#
NewEscape  Yes


########### NewReport
##
## Default: Yes
#
# When set to No, it allows the old-style $variable interpolation on
# MiniVend order reports.  The default prevents clashes with embedded Perl
# code.
#
# NewReport  No


########### NewTags
##
## Default: No
#
# When set to Yes, it defaults all pages to using the new
# page syntax. This can be counteracted with an [old] tag at the
#
NewTags    Yes


########### NoCache
##
## Default: blank
# 
# The names of MiniVend pages that are not to be cached (if I<Page Cache> is
# being used) or built statically (if I<STATIC PAGE BUILDING> is in use).  If
# the name is a directory, then no pages in that directory (or any below it) be
# cached or built statically.
#
NoCache    ord special results new_account flypage


########### NoImport
##
## Default: blank
#
# When set to one or more MiniVend database identifiers, those database(s) will
# never be subject to import. Useful for mSQL or DBI databases, or databases
# that will *never* change.
#
# NoImport   inventory
 

########### NonTaxableField
##
## Default: blank
#
# The name of the field in the products database that is set (to 1 or yes)
# if an item is not to be taxed. Will log an error and tax it anyway
# if the field doesn't exist in the database.
#
# NonTaxableField


########### OfflineDir
##
## Default: offline
#
# The location of the offline database files for use with the MiniVend offline
# database build command. Set to "offline" as the default, and is relative to
# VendRoot if there is no leading slash.
#
# OfflineDir    /usr/data/minivend/offline


########### OldShipping
##
## Default: No
#
# Defines compatibility with older MiniVend shipping files -- they will break
# if using formulas where 'x' is used as the substituted-for string for the
# accumulated total.
#
# OldShipping  Yes
 

########### OrderCounter
##
## Default: blank
#
# The name of the file (relative to VendRoot if no leading /) that
# maintains the order number.
#
OrderCounter    etc/order.number


########### OrderFrame
##
## Default: _top
#
# The frame name where the order page will go, if frames are
# enabled.
#
# OrderFrame


########### OrderLineLimit
##
## Default: 0 (unlimited)
# 
# The number of items that the user is allowed to place in the shopping cart --
# a robot defense.  See the docs.
# 
# OrderLineLimit   50


########### OrderProfile
##
## Default: blank
#
# An unlimited number of order profiles, specified relative to the
# MiniVend page directory. Called by the mv_order_profile selector on an order
# form, numbers start from 0.
#
# The order profiles themselves are a set of parameters defining the order
# checking and lookup parameters, and can be conditional based on the
# MiniVend [if ...][/if] tagging.  The [value ..], [data ..], and
# [field ..] tags can be used.
#
OrderProfile    etc/order.profiles


########### OrderReport
##
## Default: etc/report
# 
# The location of the simple order report file. 
#
# OrderReport  pages/ord/report.html


########### PageCache
##
## Default: No
#
# When set to Yes, it will enable the cacheing of pages if the client
# browser has cookie capability.
#
# PageCache  yes


########### PageSelectField
##
## Default: blank
#
# Sets a products database column which can be used to select the on-the-fly
# template page. This allows multiple on-the-fly pages to be defined. If the
# field is empty (no spaces, either!) then the default flypage will be used.
#
# PageSelectField    display_page


########### Password
##
## Default: blank
#
# The encrypted password that, when entered and sent as RECONFIGURE_MINIVEND by
# the reconfigure program, will be checked against the user entry to enable
# reconfiguration.
#
# If you use MiniVend's htpasswd.pl (from 2.03 or higher) it will write the
# catalog configuration file if given 'catalog.cfg' as the file name. The demo
# starts with an encrypted blank password, allowing you to just hit enter.
#
Password                sWbRjRhdHtEec


########### PriceBreaks
##
## Default: blank
#
# The quantities where price breaks should be placed.  Used to set up the
# pricing.asc entries to match actual pricing. Unlimited number of breaks --
# only enter the lowest quantity it applies to.
#
# If present, there must be a valid I<pricing> database.
#
# This directive should normally be disabled unless you are using quantity
# pricing (as in this demo).  This feature is somewhat deprecated
# by CommonAdjust.
#
# PriceBreaks          2 5 10 25 100


########### PriceAdjustment
##
## Default: blank
#
# A MiniVend item attribute (see UseModifier) which contains a value upon which
# a price adjustment to the item may be made. This feature is somewhat deprecated
# by CommonAdjust.
#
# PriceAdjustment size


########### PriceCommas
##
## Default: yes
#
# Whether commas will be inserted in prices displayed by MiniVend.
#
# PriceCommas


########### PriceDivide
##
## Default: 1
#
# The number the price should be divided by to get the price in units (dollars
# or such).
#
# PriceDivide 100


########### PriceField
##
## Default: price
#
# The field in the product database that will be accessed with the [item-price]
# element.
# 
# If set to a non-existent field enables the CommonAdjust scheme
# for all products.
#
PriceField   no_price


########### Random
##
## Default: blank
#
# Random messages 0 to 15, specified with a Vend-style filename, i.e. no .html
# suffix, (even though the file will have one), relative to the MiniVend page
# directory. Called by the [random] tag.
#
Random               rand1 rand2 rand3 rand4 rand5


########### ReadPermission
##
## Default: user
#
# Controls the permissions of the session database, and error.log file.  This
# only takes effect if the program is creating a new file.
#
ReadPermission  group


########### ReceiptPage
##
## Default: blank
#
# The page to be displayed as a receipt after the user has submitted an order.
# Replaces the standard 'confirmation' page.
#
ReceiptPage          ../etc/receipt


########### RecordDelimiter
##
## Default: blank
#
# In conjunction with FieldDelimiter, allows custom database formats to be
# defined. See the documentation for use of this advanced feature.


########### RemoteUser
##
## Default: blank
#
# The value of the HTTP environment variable REMOTE_USER that will enable
# reconfiguration.
#
# You need to enable HTTP basic authentication for this to work.
#
RemoteUser   balster


########### ReportIgnore
##
## Default: blank
#
# Fields to ignore for the purposes of mailing an order. A COMMA-SEPARATED
# list. Fields beginning with 'mv_' are ignored automatically.  This only makes
# a difference if NewReport is set to No.
#
# ReportIgnore


########### RequiredFields
##
## Default: blank
#
# Fields that the user MUST fill at least something in before
# their order can be processed. A COMMA-SEPARATED list.
#
RequiredFields       name


########### RobotLimit
##
## Default: 0 (unlimited)
#
# Defines the number of consecutive pages a user session may access without a
# 30 second pause.  If the limit is exceeded, then the command defined in the
# Global directive LockoutCommand will be executed.
#
RobotLimit       50


########### Rotate
##
## Default: blank
#
# Rotating messages 0 to 15, specified with a Vend-style filename, i.e. no
# .html suffix, (even though the file will have one), relative to the MiniVend
# page directory. Called by the [rotate] tag.  IF YOU CHANGE THEM, THEY WON'T
# TAKE EFFECT UNTIL A RESTART.
#
Rotate  rotate1 rotate2 rotate3 rotate4


########### SalesTax
##
## Default: blank
#
# The FIELD NAMES which are the keys to the sales tax calculation. This is
# defined in ProductDir/salestax.asc, and is most commonly zipcode and/or
# state, one of the fields on the order report. If left blank, no sales tax
# calculation is done.  If an entry for that field name is not found, it uses
# the field 'default', which must be defined in the file.  The default can be
# 0.
#
SalesTax         state


########### SaveExpire
##
## Default: 30 days
# The length of time that saved sessions will persist before being expired. See
# SessionExpire for the format.
#
# SaveExpire    8 weeks


########### ScratchDir
##
## Default: etc
#
# The directory where scratch files will be written, notably cached searches.
#
ScratchDir  tmp


########### SearchCache
##
## Default: No
#
# Determines whether cacheable searches will be cached. It requires the
# presence of the directory 'SearchCache' in the ConfDir directory (default
# would be etc/SearchCache).
#
# SearchCache  Yes


########### SearchFrame
##
## Default: blank
#
# The frame name where search results will go, if frames are enabled.
#
# SearchFrame


########### SearchProfile
##
## Default: blank
#
# An unlimited number of search profiles, specified relative to the MiniVend
# page directory. Called by the mv_profile selector on a search form, numbers
# start from 0.
#
# The search profiles themselves are a set of variables defining the search
# parameters, and can be conditional based on the MiniVend [if ...][/if]
# tagging.
#
SearchProfile        etc/search.profiles


########### SendMailProgram
##
## Default: /usr/lib/sendmail
#
# The location of the sendmail binary, needed for mailing orders.  Must be
# found at startup.
#
# SendMailProgram


########### SeparateItems
##
## Default: No
#
# Changes the default when ordering an item via MiniVend to allowing multiple
# lines on the order form for each item. 
#
# SeparateItems Yes


########### SessionDatabase
##
## Default: session
#
# The base name of the session database. You don't normally need to
# set this.
#
# SessionDatabase


########### SessionExpire
##
## Default: 1 day
#
# The time after which user sessions will expire.
#
# SessionExpire


########### Shipping
##
## Default: 0
#
# A flat shipping charge that will be added to any order. A
# zero value disables it.
#
# Shipping


########### SpecialPage
##
## Default: blank
#
# Sets a special page to other than its default value.
#
SpecialPage          badsearch      special/badsearch
SpecialPage          canceled       special/canceled
SpecialPage          catalog        index
SpecialPage          checkout       ord/checkout
SpecialPage          confirmation   special/confirmation
SpecialPage          failed         special/failed
SpecialPage          interact       special/interact
SpecialPage          missing        special/missing
SpecialPage          needfield      special/needfield
SpecialPage          nomatch        special/nomatch
SpecialPage          noproduct      special/noproduct
SpecialPage          notfound       special/notfound
SpecialPage          order          ord/basket
SpecialPage          search         results
SpecialPage          order_security special/order_security
SpecialPage          violation      special/violation


########### Static 
##
## Default: No
#
# A yes/no directive. Enables static page building and display features.
#
Static   No


########### StaticAll
##
## Default: No
# A yes/no directive.  Tells MiniVend to try and build all pages in the catalog
# statically when called with the static page build option.
#
StaticAll   Yes

########### StaticDepth
##
## Default: 1
# 
# The number of levels of static search building that will be done if a search
# results page contains a search. Set to 0 to disable re-scanning of search
# results pages.
#
# StaticDepth 2

########### StaticDir
##
## Default: static
#
# The absolute path of the directory which should be used as the root for
# static pages. The user ID executing MiniVend must have write permission on
# the directory (and all files within) if this is to work.
#
StaticDir   __CATDOCROOT__/pages

########### StaticFly
##
## Default: No
#
# A yes/no directive. If set to Yes, static builds will attempt to generate
# a page for every part number in the database using the on-the-fly page build
# capability.
#
StaticFly   Yes


########### StaticPage
##
## Default: blank
#
# Tells MiniVend to build the named page (or pages, whitespace separated) when
# employing the static page-building capability of MiniVend. Not necessary if
# using StaticAll.
#
# StaticPage   info/about_us  info/terms_and_conditions


########### StaticPath
##
## Default: blank
#
# The path (relative to HTTP document root) which should be used in references
# built by and referred to by the page-building capability of MiniVend.
#
StaticPath __CATDOCURL__/pages


########### StaticPattern
##
## Default: blank
#
# A perl regular expression which is used to qualify pages that are to be built
# statically. The default is blank, which means all pages qualify.
#
# StaticPattern  ^info|^help


########### Sub
##
## Default: blank
#
# Defines a catalog subroutine for use by the [perl sub] subname arg [/perl]>
# construct.
#
# You may define as many as desired.
#
# Sub


########### TaxShipping
##
## Default: blank
#
# A comma or space separated list of states or jurisdictions that
# tax shipping cost, i.e. UT.
#
#
TaxShipping          __TAXSHIPPING__ ,


########### UpsZoneFile
##
## Default: blank
#
# The file containing the UPS zone information,  specified relative to the
# MiniVend page directory.
#
UpsZoneFile   products/ups_zone.asc


########### UseCode
##
## Default: yes
#
# Determines whether the product code will be used as the base for the
# [item-link] file name.
#
# UseCode


########### UseModifier
##
## Default: no
#
# Whether modifier information will be tabulated and forwarded (like size
# or color information).
#
#
UseModifier size color


########### UserTag
##
## Default: none
#
# Define a MiniVend tag fully as powerful as the built-in ones.
#
#
UserTag quick-table HasEndTag
UserTag quick_table Interpolate
UserTag quick-table Order  border
UserTag quick_table Routine <<EOF
sub {
    my ($border,$input) = @_;
    $border = " BORDER=$border" if $border;
    my $out = "<TABLE ALIGN=LEFT$border>";
    my @rows = split /\n+/, $input;
    my ($left, $right);
    for(@rows) {
        $out .= '<TR><TD ALIGN=RIGHT VALIGN=TOP>';
        ($left, $right) = split /\s*:\s*/, $_, 2;
        $out .= '<B>' unless $left =~ /</;
        $out .= $left;
        $out .= '</B>' unless $left =~ /</;
        $out .= '</TD><TD VALIGN=TOP>';
        $out .= $right;
        $out .= '</TD></TR>';
        $out .= "\n";
	}
    $out .= '</TABLE>';
}
EOF

# This UserTag sets a default font face, size, color
# or more in a table without having to type it in every
# time.
# 
# Usage:
# [table-font face="arial, helvetica" size="-1"]
# <TABLE><TR><TD>Test.</TD></TR></TABLE>
#    Will do multiple tables.
# <TABLE><TR><TD>Test.</TD></TR></TABLE>
# [/table-font]
#
UserTag table-font Order face
UserTag table-font PosNumber 1
UserTag table-font addAttr 1
UserTag table-font hasEndTag
UserTag table-font Routine <<EOR
sub {
	my ($face, $opt, $table) = @_;

	my @parms;
	push(@parms, qq{FACE="$face"})
		if $face;
	for(qw/size color/) {
		push(@parms, qq{\U$_\E="} . $opt->{$_} . '"')
			if $opt->{$_};
	}
	push(@parms, $opt->{extra})
		if $opt->{extra};
	my $front = "<FONT " . join(" ", @parms) . '>';
	$table =~ s:(<T[HD][^>]*>):$1$front:ig;
	$table =~ s:(</T[HD]\s*>):</FONT>$1:ig;
	return $table;
}
EOR


########### Variable
##
## Default: none
#
# Variable values that can be accessed on MiniVend pages with __VARIABLE__
# notation.
#


########### WritePermission
##
## Default: user
#
# Controls the permissions of the session database, and
# error.log file.  This only takes effect if the program is
# creating a new file.
#
# Though it is highly discouraged, if you can't run vlink SUID
# you can set this to 'world' and have MiniVend work.
#
WritePermission group



Search for: Match: Format: Sort by: