Pages in the catalog are written in regular
HTML with extensions to support catalog ordering. To distinguish them from regular
HTML, these extended elements use
[square brackets] instead of angular brackets. We will usually call them MiniVend tags or just tags.
These tags perform various display and modification operations for the user session. The tag names and their general function are:
accessories Access product accessory functions
area Insert a re-written MiniVend URL
areatarget Insert a re-written MiniVend URL with frame
body Insert a predefined <BODY ...> HTML tag
buttonbar Insert a predefined buttonbar
calc Perform Perl calculations (low overhead)
/calc
cart Set the current shopping cart name
checked Conditionally check an HTML check/radio box
comment Insert comments in MiniVend pages
/comment
compat Define regions to be interpreted with old syntax
/compat
col Used with [row] -- rudimentary text tables for order reports
/col
condition Sets a condition inside [if explicit] and others
/condition
currency Formats a number like currency for current locale
/currency
data Access a database or user session element
default Insert a variable but with a default response if blank
description Output a product description
discount Set a product discount coupon
/discount
discount-price Show the discounted price
else Defines else region for [if ...], [if-field ..] and others
/else
elsif Defines elsif region for [if ...]
/elsif
field Access a product database field
file Insert the contents of a file
finish-order DEPRECATED. Conditionally show a "check basket" link.
fly-list Show an item "on-the-fly" in an arbitrary page
/fly-list (new tags mode only)
framebase DEPRECATED. Set a <BASE FRAME="..."> only if in frames mode.
frames-off Turn off MiniVend frames mode.
frames-on Turn on MiniVend frames mode.
help DEPRECATED. Show a help message only if help is enabled.
if Perform any of many conditional tests
/if
if-data Display region only if database element non-empty
/if-data
if-field Display region only if field non-empty
/if-field
if-loop-data Display region only if database element non-empty
/if-loop-data
if-loop-field Display region only if field non-empty
/if-loop-field
if-modifier Display only if item attribute/modifier set
/if-modifier
if-sql-data Display region only if database element non-empty
/if-sql-data
if-sql-field Display region only if field non-empty
/if-sql-field
include Include a file with complete MiniVend interpretation
item-accessories Product accessory functions (set select box)
item-code Insert current item SKU/code/part number
item-data Insert data entry corresponding to current SKU
item-description Insert description corresponding to current SKU
item-discount Show amount of discount for current SKU
item-field Insert product database entry corresponding to current SKU
item-increment Count for list
item-last Stop displaying if condition is met
/item-last
item-link DEPRECATED. Auto-HTML link to product page.
item-next Skip item if condition is met
/item-next
item-list Iterate over a shopping cart
/item-list
item-modifier Show value of item attribute/modifier
item-param DEPRECATED. Show element from positional list.
item-price Display price of item with any discounts/price breaks/adjustments
item-quantity Show quantity ordered on shopping cart line
item-subtotal Subtotal for the item (item-quantity * item-price)
last-page DEPRECATED.
/last-page
lookup Lookup an item in a database if not already set
loop Iterate over an arbitrary list
/loop
loop-accessories Product accessory functions (set select box)
loop-change Grouping of items in list display
/loop-change
loop-code Insert current item SKU/code/part number
loop-data Insert data entry corresponding to current SKU
loop-description Insert description corresponding to current SKU
loop-field Insert product database entry corresponding to current SKU
loop-increment Count for list
loop-last Stop displaying if condition is met
/loop-last
loop-link DEPRECATED. Auto-HTML link to product page.
loop-next Skip item if condition is met
/loop-next
loop-price Display price of item
matches Show number of matches from search
modifier-name Place a variable name that corresponds to an attribute
more Show region of search list only if more matches
more-list Display more matches list with links to next series
/more-list
sql Perform any of several types of SQL query
sql-code Insert current item SKU/code/part number
sql-data Insert data entry corresponding to current SKU
sql-description Insert description corresponding to current SKU
sql-field Insert product database entry corresponding to current SKU
sql-increment Count for list
sql-link DEPRECATED. Auto-HTML link to product page.
sql-param Show element from returned SQL queries.
sql-price Display price of item
no-match Define area of search results page displayed when no match
/no-match
new Set new syntax for this page
nitems Show number of items for a shopping cart
old Set old syntax for this page
order Create HTML link to order an item
/order
on-change Grouping of items in list display
/on-change
page Create A HREF with re-written URL to call MiniVend page
/page
pagetarget Create A HREF with re-written URL for frames MiniVend page
/pagetarget
perl Embed output of arbitrary Perl in the page
/perl
post DEPRECATED. Force region to be interpreted last.
/post
price Show price of an item
process-order Create URL for MiniVend form processing, retain security setting
process-search Create URL to call MiniVend form-based search
process-target Create URL to call MiniVend form processing
quantity-name Place a variable name that corresponds to item quantity
random Insert a random banner
rotate Insert a rotating banner
row Used with [col] -- rudimentary text tables for order reports
/row
salestax Show amount of salestax for shopping cart
scratch Access a scratch variable
search Do a MiniVend search, output list of returned item codes
search-list Display output of a MiniVend search
/search-list
selected Conditional selection of drop-down <SELECT ...>
set Set a scratch variable
/set
shipping Calculate shipping
shipping-desc Show shipping description
sort Set sort order for iterating lists
/sort
subtotal Calculate subtotal without tax or shipping
tag Miscellaneous functions
/tag
then Define THEN region for [if ...]
/then
total-cost Calculate order total with tax, handling, and shipping
uniq Remove duplicate search returns
userdb Access user database functions
value Display form value
The syntax for each tag is displayed in the documentation below.
The first page displayed in the catalog, if no argument is supplied to the vlink or tlink cgi-bin program, is ``catalog.html''. This page will contain links to other
catalog pages with the [page pagename] tag. Individual products can be ordered by the [order <item-code]> element, which brings up the shopping basket page. The shopping
basket page contains an [item-list], which builds information on each item ordered, and optionally has input
boxes for the customer to type in their name and address. If desired, the
customer can be ``stepped through'' the order process (as is demonstrated
in the supplied demos). Once the order has been sent the receipt page is
displayed.
Unless you are using the HTTP cookie support, you will normally not want to include regular hypertext links to pages outside of the catalog. Such links will not include the session id, which means that if the customer follows an external link back to the catalog the list of products ordered so far will have been lost.
Inline images, on the other hand, are served in the normal fashion. You should include a regular < IMG SRC=``URL''> element, where the URL refers to a graphic image. You cannot use relative image names as you would in an HTML document! MiniVend has the capability of defining an image directory (with the ImageDir and ImageDirSecure directives) that automatically adjusts your image path to a set base directory.
MiniVend has a powerful static page-building capability. This allows you to pre-build catalog pages that don't contain dynamic elements (such as order/shopping basket status) into HTML, then automatically point the browser to those pages when appropriate. This reduces the number of pages that MiniVend must parse in real time, and can increase server capacity by orders of magnitude. See STATIC PAGE BUILDING.