A new ASP-style syntax is supported (and is used in this section):
<HTML MV=mvasp><BODY>This is HTML
<%
$Document->write('This is code');
%>
HTML again.
<%
$Document->write('Code again.');
%>
A new Perl object set is there to support the ASP, but
it also is available via
[perl arg=new]
$Document->write("Your name is $Values->{name}");
[/perl]
Objects supported are:
$CGI->{key} Hash reference to submitted values
$Document->write() Writes to page
$Carts->{cartname} Direct reference to shopping carts
$Config->{key} Direct reference to $Vend::Cfg
$Items->[n] Direct reference to current cart
$Scratch->{key} Direct reference to scratch area
$Session->{key} Direct reference to session area
$Tag->tagname(@args) Call a tag as a routine (UserTag too!)
$Values->{key} Direct reference to user form values
&Log($msg) Log to the error log
<% = "Here is a ",
$Tag->page('mvasp'),
"test link generated by MV's ASP-style syntax.";
%>
Tag parameters quoted with parameter=`code` are the equivalent of
parameter="[calc]code[/calc]".
Tag parameters can be quoted with | to strip whitespace:
[page href=|
[value name="whatever"]
|]
is equivalent to
[page href="[value name="whatever"]"]
Tag parameters can be quoted with | to strip whitespace:
[page href=|
[value name="whatever"]
|]
is equivalent to
[page href="[value name="whatever"]"]
Tag parameters can be quoted with @ to insert a scratch
value:
[value name=foo set=@bar@]
[value name=foo set="[scratch bar]"]
This can be useful when setting large values into variables,
as it is much more efficient than the previous method.
Input values filters can be set up by quoting with ! and
an operation:
This guarantees that the value of "phone" will be digits only
when sent to MiniVend. Filters include:
uc UPPER CASE
lc lower case
digits only digits
word only A-Z a-z _ 0-9
urlencode space becomes %20
entities < becomes <
strip strip leading/trailing whitespace
no_white strip all whitespace
gate set to blank unless scratch variable
with same name is non-blank
n (where n is an integer) length limit
remove delete existing filter (if any)
Filters can also be created with Filter directive
and/or [input-filter op="uc"][/input-filter]
Filter directive allows filtering of certain CGI variables
for input conditioning; this is not session dependent and
automatically operates on any iteration of the variable...
Filter phone digits 10
That removes all non-digit values from the variable "phone",
then limits length to 10. Any session-based filters are applied
after this one.
[input-filter name=foo] CODE [/input-filter]
Sets a routine passed to the equivalent of a "[calc]" tag.
The value to be filtered is placed in the variable "$mv_filter_value",
and the name is set to "$mv_filter_name". It is possible to
do something like:
[input-filter name=country]
my $touched = '[tag touch country][/tag]';
my $val = $mv_filter_value;
my $prospect = &tag_data('country', 'name', $val);
return $prospect || $val;
[/input-filter]
That will return the name of a country if it is found as a key
in the database (assuming the simple demo country definitions).
Small improvements in the parser, notably optimization when
positional parameters are used.
ECML is supported via the Vend::ECML module. To map the
checkout form values from MiniVend UserDB names, with an [ecml ...]
tag:
[ecml state]
is equivalent to:
The [price] tag now supports pricing with attributes (size/color etc.).
If you do
[price code=99-102 size=XL color=RED]
[price code=99-102 size=L color=RED]
[price code=99-102 size=L color=BLUE]
in the demo, this will demonstrate it.
The idiom:
#include directory/*
now is supported (and used in the demo minivend.cfg file). This
includes all files in that directory (but not subdirectories)
and allows you to include the whole directory. It should make
maintaining multiple servers a bit easier.
Made some minor changes in the demo:
updated flypage to show attribute-based price tag
added [email to=addr from=addr subject=subj] message [/email]
UserTag which is better then the form_mail GlobalSub. It will
allow $Tag->email() to be used, among other things.
Static build should work out of the box if you
have DBM and define:
StaticDBM static
MiniVend 3.15 Features
Users maintain a "shopping cart" for ordered items
Multiple independent or shared catalogs allow one server to run many storefronts or a
"mall"
Complete SQL database support, inluding ODBC, via the powerful Perl DBI/DBD interface
Complete built-in database, no SQL is required to run MiniVend
SSL support means secure and practical credit card ordering
PGP support for secure off-site mailing of orders
Built in support for CyberCash
Catalogs can be of almost unlimited size with excellent performance
Multi-server mode for very high capacity on systems with sufficient memory
Full-featured user database and access control
Cookie support allows browsers to leave catalog and come back without losing session
state -- browsers that don't accept cookies will still work fine
Multiple shopping carts allow buy-sell operations or classified ad exchanges
Built-in addressable database support with virtually unlimited rows and columns and
field sizes -- no SQL is required to run Minivend
Many, many, other features
Powerful search capability
Fast binary search
One-click scan and search -- build a whole search in a single HREF
Complete Glimpse interface
Range searching, numeric and alphanumeric
Delayed search feature for immediate response even on long searches
Embed searches within searches
Independent field search selection and return
Search any file, build results from any database
Complete control of appearance
Over 90 predefined tag functions
Powerful user-definable tags
Tags can be embedded within HTML tags to work with popular HTML editors
Catalog pages automatically selected -- either built "on the fly" from the
database or pre-made for popular items
Embedded Perl and conditional HTML allow complex and flexible catalog pages to be
completely built from the database
ASP-style programming supported
Full frames support
Full client-side imagemap support, including frame targets and form submits
Flexible Ordering Process
Single- or multi-level order screens with configurable field verification
Shipping calculation, mixed modes, with UPS table lookup
Sales tax calculation, with fully independent non-taxable item and taxed shipping
Fully-configurable discounts with coupons or across-the-board discounts
Fully-configurable quantity pricing
Powerful global subroutines and user-definable tags allow communication
with any other system interface for back end order entry
Fully configurable order reports
Route orders to multiple fulfillment houses with complete configurability
Easy to configure for downloadable product delivery
Easy Administration
Automated installation and configuration
Numerous administration utilities
Runs under Perl 5.004 and almost any UNIX
Runs under Perl 5.004 and 32-bit Windows
Works well with all browsers
Andrew Wilcox wrote Vend, the copylefted shopping cart
software. MiniVend was originally based on Vend V0.2, but has been
greatly enhanced, adding powerful relational database functions, user-definable
tags, support
for frames, powerful searching, remote administration, superfast
server mode, conditional HTML, user-customizable help and displays, and
much more. This version of MiniVend includes an automatic configuration
and installation utility, and continues to be free under the GNU copyleft.