Index  Up  <<  >>  


Can I attach a size or color to a product?

MiniVend has product modifiers, or attributes, which can be carried around with the product.

You can use the SeparateItems directive or set the mv_separate_items variable on the order form to cause ordered items to be put on separate lines in the shopping basket. This makes size/color handling much easier for multiple items. They can be stacked, which means that you can add multiple instances of a size or color to an individual product within a shopping cart entry line, but this is too much trouble.

It is useful to maintain a separate database in the accessories file to build select and other menus for size selection. The results can key into an arbitrary database, allowing even more control.

The attribute information is placed on the form with form fields, like:

    <INPUT TYPE=XXXXX NAME="[modifier-name size]" VALUE="[item-modifier size]">

The embedded Perl capability of MiniVend means that you can discover the number of items on order of each type, and build quite detailed input forms.

The MiniVend documentation has some examples which should help you.

As of MiniVend 3.0, the [item-accessories attribute] tag will automatically place a suitable select widget on an HTML form, and ``remember'' what should be selected. See the MiniVend documentation for Item Attributes.


Index  Up  <<  >>