Can I attach a size or color to a product?

### 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.

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.

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 is the default in the demo catalogs.) 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.

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 demos have some examples which should help you -- try ordering the T-Shirt and visiting its flypage.

### Index Up << >>