The simple catalog really isn't. It is a fairly full-featured demonstration of MiniVend capabilities, though not nearly all of its features are used there.
It uses the Variable
feature extensively to simplify hand page editing. Basically speaking, a Variable
is a define that allows you to substitute text for a simple
__VARIABLE__ string in your page.
For example, in the simple demo, this is a complete page with the standard layout:
__LOGOBAR__ __MENUBAR__ __LEFTSIDE__ This is your content. __RIGHTSIDE__ __MENUBOTTOM__ __COPYRIGHT__
The way this looks on the page, roughly, is:
+--------------------------------------------------------+ | __LOGOBAR__ | |--------------------------------------------------------+ | __MENUBAR__ | |--------------+-------------------------+---------------+ | | | | | __LEFTSIDE__ | This is your content | __RIGHTSIDE__ | | | | | | | | | +--------------+-------------------------+---------------+ | __MENUBOTTOM__ | |--------------------------------------------------------+ | __COPYRIGHT__ | +--------------------------------------------------------+
The __RIGHTSIDE__ is simply defined to be empty, closing table HTML in most cases, so it really is this in most pages:
+--------------------------------------------------------+ | __LOGOBAR__ | |--------------------------------------------------------+ | __MENUBAR__ | |--------------+-----------------------------------------+ | | | | __LEFTSIDE__ | This is your content | | | | | | | +--------------+-----------------------------------------+ | __MENUBOTTOM__ | |--------------------------------------------------------+ | __COPYRIGHT__ | +--------------------------------------------------------+
The variables are defined in catalog.cfg
, and come from files in the config directory. There are conditional
templates with some different color schemes.
Once you get used to using this method, it can be quite convenient. But you may certainly choose to use your own method, perhaps one based on an HTML editor. MiniVend can coexist with some editors; ones that have a <NOTOUCH> </NOTOUCH> or <NOEDIT> </NOEDIT> pair to define areas that should not be ``masterminded'' by the editor are best.
Bear in mind that this templating method and database layout of the simple catalog is a loose suggestion on how your catalog might be organized. Many users decide to do their own database structure for product display. What you can do is more limited by your imagination than anything.
Yet most users stick with the userdb and checkout strategies employed in the catalog. This is because they have been developed over a period of years and work. Still, these can be customized; you can make it operate like Amazon or another site if you wish.
As stated before, MiniVend catalogs are all about the database. The simple demo has several tables:
Galleries
, Other Stuff
, and Links
as distributed. Simply by changing the contents of the area table you can change the left side navigation bar. The value of the field
selector is used to search the cat table to find which categories belong in each area.
CommonAdjust
directive to allow quantity pricing, either for one product or for a group
of products (sometimes known as mix-and-match). The fields q2,q5,q10,etc.
are for the quantity levels; the price_group
field selects the mix-and-match category for the product.
A-Z a-z 0-9 _ -
if you want to be easily compatible with
SQL databases and
URL encoding. Other characters can cause problems; a slash (
/
) can interfere with URLs and filenames; a colon (:
) can interfere with database representations (or file names on some
operating systems); and there are other possible compatibility situations
with other characters.
special_pages
, and etc directories.
thumb
field to contain the name of a small image for search list display.
1
, the product is not taxable and its price will not be used in a salestax
calculation.
Accessories
. See the
flypage.html
and ord/basket.html
pages for examples of how it is used.
Accessories
. See the
flypage.html
and ord/basket.html
pages for examples of how it is used.
front
. If that is contained in the field, this product will possibly be featured
on the front page via random selection. See the index.html
page for how it integrates with [loop search=something random=3]
.
query/check_orders.html
for how it might be used; see etc/report
for how it is added to.
query/check_orders.html
for how it might be used; see etc/report
for how it is added to.
UserDB
.