W H A T ' S N E W
MiniVend 3.09 is a release that optimizes speed and adds features
that allow operation with some HTML editors.
* SQL optimizations make dramatic differences in table
construction speed. MiniVend now uses internal structures to
maintain SQL column headings. This means that if you change
your SQL table structure, you must restart Minivend, but you
gain quite a bit of speed.
[if-data]/[item-data], [(if-)?loop-data], and [(if-)?sql-data]
tags are optimized across rows in the corresponding iterative
list. This means that two selects are done where dozens might
have been done before. Speed really increases.
This optimization works for [if-field]/[item-field] and friends
as well if there is only one products table (i.e. you didn't
set ProductFiles). If you have more than one, you should use
[item-data products ...] instead of [item-field ...] for best
speed when appropriate.
* To improve page response time, you can specify a SEND=1
attribute to any new-syntax MiniVend tag -- it sends the
output that has accumulated to that point. If you have named
your link program to begin with nph- (i.e. nph-simple instead
of simple) the program will start sending output immediately.
This can greatly improve apparent response time on large search
or loop lists.
The nph-executable can also be optionally used with an
alias:
Catalog simple /catalogs/simple /cgi-bin/simple /cgi-bin/nph-simple
If you reduce your vlink buffer size to 512 bytes, this will
improve likelihood of immediate response at some cost in CPU
utilization. (This change requires editing vlink.c and compiling --
don't worry about it if you don't know how to do that.)
* Search cache is *much* improved. Paging and caching should now
be completely reliable. If the user hits reload, it will refresh the
page, as Pragma: no-cache is honored. Search paging is cached as well.
You can invalidate the cache for the next page only with
[set mv_no_cache]1[/set].
* You can encase a set of links in:
[set mv_no_count]1[/set]
[page whatever]A page[/page]
[page whereever]Also a page[/page]
[set mv_no_count]0[/set]
The link count will be updated but not appended, making links
repeatable. This allows the browser to highlight visited links,
especially nice for paged searches.
* The last search can be reproduced with the [data session last_search]
via [page href="[data session last_search]"]. This includes
links to different pages of a multi-page search return.
* If you don't have the MD5 module for some reason (get it!)
MV does some better cache key generation with checksums,
reducing the likelihood of a collision.
* Fixed spurious "ClearCache" error at startup.
* MiniVend tags can now be contained within HTML tags, allowing MV
to work somewhat with most any HTML editor. The problem before was
that tags could not be placed between table rows with certain HTML
editors (like FrontPage and Netscape Composer). It is triggered by
including MV="tag arg arg.." as the *first* attribute of the HTML tag.
(Actually it can be later in the tag if no ] or > characters intervene.)
For example:
[loop-field title]
[loop-code]
will display:
Sunflowers 00-341
The Starry Night 00-342
Arguments can be combined with tags if there is whitespace
in the first mv="tag arg.." call:
will display:
1 row
2 row
3 row
There are some differences in operations depending on the tag --
for instance,
will replace the instance of HREF with its own HREF. This allows
hrefs to work both for static HTML and MiniVend pages.
Also, will pair with the matching
, but also "look ahead" for an [elsif ...] and [else] in
the next table rows (or tag set -- could be
, etc).
The combination will work for
cognitively-challenged HTML editors like Netscape Composer -- it
will retranslate the entities that it auto-translates. And you can
use --
Netscape and Microsoft editors won't auto-delete those when they
read the file. ( I really have learned to hate Netscape Composer
during the testing of this -- when loading a page, it deletes many
things it doesn't understand, without asking or even *telling* you.
Sheesh. Microsoft FrontPage, much to my surprise, is much better --
it allows you to add extended attributes keeps them in the tag. There
might be hope for it yet. In fact, look for me to add a "MiniVend"
menu for the FrontPage editor in the release.)
A special case comes with since the tag doesn't
support extended attributes (at least in FrontPage) there is now an
attribute MV.OPTION=varname for the loop tag. It has the effect of
SELECTED to the which is has the same value as the loop-code.
It will work limited circumstances like:
[shipping-desc [loop-code]] [shipping [loop-code]
or
MV.OPTION="country" >
[loop-code]
Bear in mind this is very preliminary editor support, there will
be lots of anomalies and deficiencies. More shall be revealed....
* Now can test for more than one condition via [and ...] and
[or ...]. This works like:
[if value whatever]
[or value whomever]
[and value however]
Do it. 2 out of 3 is enough.
[/if]
The last condition pertains, and there is no parentheses,
so you can't do [if ...][and ....][or ...]. But you could
still do:
[if value whomever]
[and value whatever]
Do it. 2 out of 3 is enough.
[elsif value whomever]
[and value however]
Do it. 2 out of 3 is enough.
[/elsif]
[/if]
* If conditions not containing an operator now have the
comparison optimized away, removing a call to Safe. This
means much faster compares for things like [if value whatever]
and [if data table::column::row], where there is no equality
or regex pattern check.
* UPS-style lookup now can have up to 27 zones, can handle
alphanumeric postal codes (i.e. Canada), can use more than
three significant digits, can multiply weights by a factor
for pound/kg conversion, and is much better documented.
* [body ...] tag now accepts additional arguments to modify
a preset scheme. [body 1 TEXT=GREEN] will send the preset
scheme "1" with an additional parameter. Also can put in
an HTML body tag with to make
HTML editor processing easier.
* SQL search type can now be specified in a profile, a demi-bug
fixed.
* Greatly improved independent field matching that supports
the standard Perl operators plus "em" for exact match. Full
case sensitivity is included.
* When doing independent field matching a suitable qualifying
search is made when available. This greatly speeds searches
that depend on several conditions.
* [subtotal], [total-cost], [salestax], [shipping], and [price]
tags now all have a "noformat" option which just returns a raw
number.
* [price ...] tag fixed to fit documented behavior.
* Precision error in [salestax] fixed. Salestax and shipping
now use Locale->frac_digits places of precision (normally 2). Be
careful if you use frac_digits less than 2 -- if you want
even-dollar pricing you could instead use price_picture for
currency formatting and keep frac_digits at 2.
* [random], [rotate], [calc] and [currency] tags now auto-interpolate in
new mode.
* UPS-style lookup now can be used in up to 27 originating zones
in one catalog, non-numeric lookups are allowed, and lookups can
be more than three characters in length.
* Shipping can now be set to use the PriceDivide setting for
currency rate conversion, either global or individual.
* A new import format, Lotus Notes/structured text, is added.
Very useful for editing databases by hand.
* UseModifier can be set in scratch variables with a simple
[set mv_UseModifier]size color[/set], so you can have any number
of options for an item without having to set them all.
* Added order profile checks for "state", "province",
"province_or_state", "postcode", "ca_postcode", and "zip". Sorry,
only US/Canada supported, but you can add a check yourself
in a GlobalSub:
GlobalSub <{'values'} hash
# $var is the passed name of the variable
# $val is current value of checked variable
my($ref, $var, $val) = @_;
if ($ref->{country} =~ /^(PT|portugal)$/i) {
return $val =~ /^\d\d\d\d$/ ? 1 : 0;
}
else {
return 1;
}
}
}
}
EOF
Now you can specify in an order profile:
postcode=pt_postcode
There must be an underscore preceding the routine name in this
case. Very elaborate checks are possible, of course. If some user
takes on the polyglot it would be appreciated if they contribute
the routines.
To you MiniVend hackers out there, this is a general technicque you can
use to override MV subroutines. For the most part, I try to keep the
same call interface, and this should make updates *much* easier.
* You can set a form variable value with the new "set" attribute
for the [value ...] and [default ...] tags.
Set the variable name to "Mike Heins" and do not return a value:
[value name=name set="Mike Heins"]
Set the country to "US", but only if not already defined, and return
the value:
[default name=country default=US set=1]
New syntax only, for safety reasons.
* Added a -r option to the "expire" script. When using GDBM
sessions (and only GDBM) this will recover disk space and
shrink a large session file.
MiniVend 3.08 is a maintenance release, but as usual adds a few
features:
* Syntax of [search] tag much improved. Added auto
search for loop tag, allowing specification with
[loop search="se=searchstring/sf=searchfield"].
Use of search profiles is improved.
* Microsoft did not fix Excel in Office '97 as earlier
reported -- its TAB-delimited exports still surround
any field containing a comma with quotes. A new import
parameter has been added to deal with this.
* ProductFiles added to the list of directives updated
with a locale change.
* "display" option added to [item-accessories ...] tag,
to display only the *label* for the selected option.
* Radio and check box options added to [item-accessories ...]
tag. These display checkbox or radio groups for options. Can
also group boxes in tables, including columns if passed a
numerical parameter.
* Can now select options based on database field keyed
on something besides item code.
Fixes for:
* MiniVend used MakeMaker to install some distributed copies
of non-core Perl modules (and a modified Carp.pm). If you
installed with the parameter UNINST=1 then it would remove
the module. That is bad news, and it is fixed. The module
Carp.pm was removed from the distribution, and other modules
are installed only by copying if appropriate versions are
not available, and are only installed in a private library
directory.
* Continuing "tar" problems with makecat. The system tar
program is now used for UNIX machines.
* Bad domain passing in a cookie. This should remove the
last problems with proxy servers losing sessions, providing
the secure server and regular HTTP server are in the same
domain for cookie purposes.
* Update of shopping cart caused loss of session only when
in master item/sub-item mode. Fixed.
MiniVend 3.07 is a major release adding complete POSIX-style
I18N features and many other tag language enhancements.
* Complete multiple currency sets based on locale. Uses
standard POSIX definitions.
* POSIX gettext/LC_MESSAGES style message display
for multiple language capabilities. A script called
localize is included which helps build Locale definitions.
* Price number display greatly enhanced.
* Sort lists now can specify a beginning entry
and a length, allowing pageable browse lists. Previous
versions needed to be done entirely in Perl. Demo
includes example.
* Simple demo now uses NewTags by default. Several
deficiencies cleaned up. Locale example (French front
page and currency) example given. Several additional
examples given. Examples using deprecated features
changed to use current features.
* Added simple user login facility as an add-on module.
documented in UserDB.pm and shown in the demo. This is
also a useful example of how you can add your own extensions
to MiniVend.
* All iterative lists now have an [item-next] and [item-last]
(or [loop-next] and [loop-last]) capability for exiting and
skipping entries in loops.
* PriceAdjustment now handles embedded MiniVend
tags, allowing completely flexible product pricing.
* OrderProfile and SearchProfile now can be specified
in the page.
* Cookies now set for every path and domain in Mall
mode.
It also fixes some bugs/deficiencies:
* Static builds handle #name anchors when you use
[pagetarget page#name].
* Fixed simple demo so scratch directory 'tmp' gets
created on new install.
* Documentation corrections.
* Search [more-list] did not work under Windows -- fixed.
MiniVend 3.06 fixes some bugs with 3.05 and adds some features.
* Catalog permissions configuration for multi-user,
multi-catalog servers greatly improved.
* Added [if ordered ...] back in, inadvertantly deleted
in 3.05.
* Added ! comparisons for [if ....][/if], [if-data ...],
[if-field ...] and the like.
* Made UserTag available globally in minivend.cfg.
* Only call CPAN if it was previously used by somebody.
* PriceAdjustment can now be absolute, where an
adjustment value of =10.99 will set the price
directly to 10.99. Previously the adjustment was
only relative to the single price for the item.
* Added new CONTINUE modifier to allow more flexible
specification of long database fields during ASCII
import. DITTO format allows you to add additional text
on the next line, while UNIX accepts \ as a line
continuation. This allows you to maintain very
large description fields while still remaining within
the 255 character limit of many databases and
spreadsheets.
* Added passed default to [default variable]
tag, now can be [default variable passed-default].
* We can't always use POSIX::strftime anymore because of
bad RedHat 5.0 Perl release. 8-( A substitute routine is
provided and should be selected if POSIX::strftime doesn't
work. Instructions provided for making a good Perl, should
build OK.
* Added grouped items with mv_order_group. Using this,
Sub-items can be tied to a master item placed on a
form-based order. The first mv_order_item defined
becomes the master, additional are sub-items. All
sub-items are deleted when a master item is deleted
from the cart.
* Fixed path problems with database/search path
resolution.
* Fixed VendURL mangling when going to a SecureURL
with a different SCRIPT_NAME.
* [compat] [/compat] tag pairs are stripped from [old]
pages.
* Static pages were shown to all browsers -- now only
shown to those which have given us back our cookie.
* [loop ...] lists are now reliably nested with
[loop with="-a" arg="A B C"] or [loop-a 1 2 3].
* Tag end parsing fixed for [loop ...] and others that
auto-interpolate.
* Finally added a real debug facility, with multi-level
control and in-page display. Messages are still crude,
though, and user input is encouraged.
* Errors during catalog configuration are now
displayed to the console on startup.
* Slightly refined [more-list] to accept a different
border for selected and non-selected pages when using
images.
* Added error message in Windows install to prevent the
large number of questions from users who try to install
MiniVend without Perl 5.004 on the machine.
* CYGWIN.DLL now installed in SYSTEMROOT/system, not just
C:/windows/system.
* Tested on Windows NT 4.0 x386.
MiniVend 3.05 is a major update that adds the following:
* Windows95/NT and UNIX versions unified, many changes
to handle line-ending differences
* SendMailProgram and EncryptProgram now accept 'none'
as parameters, avoid the need for external programs.
* Removed all autoloading options
* Added rotate "floor"
* Makecat program just a bit smarter about some things
* No UNIX command dependencies
* Removed sample demo from distribution, too outdated
* Catalogs can be added online
* Mode indicator file mode.{inet,unix} in MVROOT/etc
* Removed final vestiges of DES encryption
* Workaround for DBI <= 0.90 AutoCommit problem
* Went to multi-README files
Bug fixes include:
* Numerous fixes to sql_search (mv_searchtype=sql)
* Fixed tag_sort bug for multiple sorting of search lists
* Fixed [tag sql] query [/tag] to match docs
* Fixed missing Global variables
* Fixed close_database, no more SQL disconnect warnings
* Fixed bug in Windows file-based sessions
MiniVend 3.04 is a minor release to fix bugs in 3.03:
* If file test was failing on a Safe trap. Fixed.
* PIPE databases did not work in 3.03 (only) -- they now
work well even for searching.
* Major bug in new parser fixed, now virtually every
tag should be parsed by MiniVend in 'NewTags Yes'
mode. Switching to the new parser is recommended,
as new features will not be added to the old parser.
* New [elsif ...] addition to [if ...] was not
documented or announced.
* Perl 5.003 should run MiniVend without changes.
* Escape mechanism for values works properly.
* [include file] tag added.
* UserTag now accepts Interpolate option.
* Other minor bug fixes.
MiniVend 3.03 has many bug fixes and feature set improvements.
There is one incompatible change:
* If you are using Static builds, you must now define
'Static Yes' in the catalog.cfg file to get static
pages to build or run. This was done to provide a
single "on/off" switch for static builds.
As well as adding the following features/fixes:
* The new tag syntax is more reliable and trouble-free,
and a UserTag directive allows user-defined tags. For example,
you can do:
UserTag caps Routine sub { return "\U@_" }
UserTag caps HasEndTag
and have "[caps]uppercase[/caps]" become "UPPERCASE".
In addition, almost all old-style tags will be parsed
properly by the new tag parser.
* Sorting has been improved and regularized. All iterative
lists may be sorted with the same syntax, and all may be sorted
on any database field entry.
[search-list]
[sort products:category products:name:f]
...
[/search-list]
The above will sort a search return on two fields in
the database -- and will work the same for shopping carts,
loop lists, and [tag each products].
There are unlimited levels of sort, and all sorts may individually
have options for numeric, case-insensitive, and reverse. See the
section SORTING in minivend.html.
* Added [on-change name] tag to allow conditional nested search
display.
* Salestax bug fixed, 'default' now works.
* AllowGlobal lets certain "trusted" catalogs define global
subroutines. AdminSub restricts certain subroutine names.
* ImageAlias does the same thing for MiniVend images that
Apache/NCSA does with Alias.
* A robot defense now allows you to limit the number of line
items in the shopping cart or cut off access to a host that
accesses a certain number of pages without at least one 30
second pause. Implemented with OrderLineLimit and RobotLimit
directives on a per-catalog basis, and the LockoutCommand
directive as a global parameter.
* SQL numerical types are now handled properly if you set the
NUMERIC option in catalog.cfg, i.e.:
Database products NUMERIC price
Database inventory NUMERIC on_hand
* The server will now fall back to UNIX mode only if the
TcpPort (7786 by default) is occupied and it cannot bind().
This does not apply if MiniVend was started in INET mode only,
but there will now be a better log message indicating the
server is stopped.
* Started allowing a lower case POST method -- many browsers
seem to violate the HTTP spec in that regard. This mitigates
the common "interaction error" problem.
* Fixed bug in CyberCash processing that allowed only the
'mauthcapture' mode.
* Deleted SearchOverMsg directive -- you must now set
mv_search_over_msg directly if you want to use it.
MiniVend 3.02 adds full SQL support. In addition, several minor
demo flaws have been polished, and some bugs in the new geographic
shipping changes have been fixed.
Changes include:
* Full SQL support, including for ODBC, using the powerful
DBI/DBD interface. It should operate on all DBI-compliant drivers -- it
has been tested with MySQL, mSQL, Solid, ODBC, and PostgreSQL.
* All database documentation greatly improved.
* Geographic qualification for shipping works.
* mv_credit_card_valid now returned as blank false value
instead of 0 false value.
* =true added to order profile checks, will pass on Yes|True|1
and fail on anything else.
MiniVend 3.00 is greatly changed from MiniVend 2.03, though catalogs
should be almost completely compatible. The exceptions are one or two
pricing and shipping database changes. In both cases, there is available
backward compatibility.
Changes include:
* Installation has been changed to fit the Perl model
of 'perl Makefile.PL; make; make test; make install'.
You can also just type './configure' to perform this
in one step.
Perl 5.004 allows retrieval and installation of MiniVend
with 'perl -MCPAN -e 'install Vend::Cart' at the
command line.
* Catalog builder program improved to read Apache/NCSA-style
configuration files and supply some intelligent defaults.
Command-line editing and history are supported when teh
Term::Readline package is available.
* Optional modules automatically fetched with CPAN module
if available.
* A powerful static page building capability is in place.
This allows completely automated generation of static HTML
pages based on MiniVend databases. Use it to build static
category lists and product pages that will load quickly without
the necessity of MiniVend parsing them.
* Dynamic page parsing speed is increased by about 30% when
using the standard syntax.
* Multiple product databases allow the breakout of product lines,
new-used product separation, multi-vendor order routing, and
more. The database an item is ordered from is kept with the
item in the shopping cart, so items ordered with the same part
number from different databases will not overwrite each other.
* Database tables are now writeable. Atomic incrementation is
supported, which means that reliable inventory counts can be
kept. Form-based database updates are expanded to encompass
all databases, not just mSQL.
* Transactions can be logged to an arbitrary file in an arbitrary
format with [tag log file]data[/tag].
* Databases can be exported to an ASCII file with the [tag export ...]
[/tag] construct.
* Shipping is much improved, with built-in subroutine calls,
error messages for out of bounds condtions, drop-in UPS zone
files, configurable handling charges, UPS cost rounding, geographic
qualification, and more regular syntax.
* Item attribute selection greatly improved, with automated building
of the item attribute selection. Item attributes can easily be
specified at the time of order.
* Item attributes can cause price adjustments on either an
item basis or attribute basis.
* Uses Data::Dumper's C-based uneval code when available,
improving session storage speed.
* Database tables are only actually opened when referenced,
improving speed greatly on systems that have a large number
of tables in the database.
* Experimental DBI/DBD example interface provided, which
will allow attachment of supported SQL databases like Solid,
Oracle, or Sybase. THIS IS EARLY ALPHA SOFTWARE. Use only on
an experimental basis, never with live data.
* Search engine has improved coordinated matching, with full
field-independent case-sensitivity, substring matching, and
negation.
* Search speed greatly improved when doing complex
field-coordinated searches.
* The FullUrl directive allows different virtual hosts to have
link programs with the same name, i.e. all named /cgi-bin/shop.
* A new (and still experimental) page syntax allows more regular
parsing of tags, removing some of the interpolation-order anomalies
inherent in the old-style tags. It can be invoked on individual
pages with the [new] tag.
* Search cacheing is much improved, and searches can be pre-built
when using the static page build capability.
* Pages can be cached, which especially improves performance of
large parsed pages. Static build is preferred to cache, but
with large databases it is not practical to build every item
in advance.
* Supports Perl 5.004 transparently, making runtime changes to
affected modules.
* Better security with the NoAbsolute, AdminPage, .access, and
AdminDatabase tags.
* Improved handling of cookies, with savable sessions and dynamic
expire times.
* Mailed orders may have MIME attachements. Though the author
loathes routinely-used MIME, it has value as a way to attach
an encrypted credit card number for easy processing by an
order entry workstation.
* Search sorting bugs fixed.
* New $Safe{'cgi'}->{form_value} access in embedded Perl allows
complex conditional search or order routines to be more
intelligent with regard to user input.
* New FormIgnore directive allows certain variables to be
expunged from the user session.
* Discounted prices can be displayed directly
with [discount-price].
* Cookies can be configured for expiration times and multiple
servers in a domain.
* Runs with taint checking enabled, even when using
most embedded Perl code.
* Many other minor bug fixes, improvements, and changes.
-------------------------------------------------------------