2.48. options

Builds HTML widgets as defined in the options table for selecting options associated with a given product. This tag handles simple, matrix or modular options. See also the accessories tag.

Here is an illustrative example from the 'tools' sample data set of the foundation catalog:

===
   [options code=os28005]
---
   <input type=hidden name=mv_item_option value="logo">
     <SELECT NAME="mv_order_logo">
     <OPTION VALUE="c">Construct Something
     <OPTION VALUE="y" SELECTED>Your Logo</SELECT><BR>
   <input type=hidden name=mv_item_option value="color">
     <INPUT TYPE="radio" NAME="mv_order_color" VALUE="BLK" >&nbsp;Black
     <INPUT TYPE="radio" NAME="mv_order_color" VALUE="BEIGE" >&nbsp;Beige
     <INPUT TYPE="radio" NAME="mv_order_color" VALUE="WHITE" >&nbsp;White<BR>
   <input type=hidden name=mv_item_option value="bristle">
     <SELECT NAME="mv_order_bristle">
     <OPTION VALUE="synthetic">Synthetic
     <OPTION VALUE="camel">Camel Hair</SELECT>
===

2.48.1. Summary

Parameters: code

===
   [options code=os28005 td=1]
---
   <td><input type=hidden name=mv_item_option value="logo">
      <SELECT NAME="mv_order_logo">
      <OPTION VALUE="c">Construct Something
      <OPTION VALUE="y" SELECTED>Your Logo</SELECT></td>
   <td><input type=hidden name=mv_item_option value="color">
      <INPUT TYPE="radio" NAME="mv_order_color" VALUE="BLK" >&nbsp;Black
      <INPUT TYPE="radio" NAME="mv_order_color" VALUE="BEIGE" >&nbsp;Beige
      <INPUT TYPE="radio" NAME="mv_order_color" VALUE="WHITE" >&nbsp;White</td>
   <td><input type=hidden name=mv_item_option value="bristle">
      <SELECT NAME="mv_order_bristle">
      <OPTION VALUE="synthetic">Synthetic
      <OPTION VALUE="camel">Camel Hair</SELECT></td>
===

(Note that the output was reformatted to fit this page)

The following example (using another item from the 'tools' data) illustrates the price and label attributes:

===
   [options code=os28011 label=1 price=1]
---
   Handle<BR>
     <input type=hidden name=mv_item_option value="handle">
       <SELECT NAME="mv_order_handle">
       <OPTION VALUE="W">Wood handle
       <OPTION VALUE="E">Ebony handle ($20.00)</SELECT><BR>
   Blade material<BR>
     <input type=hidden name=mv_item_option value="blade">
       <SELECT NAME="mv_order_blade">
       <OPTION VALUE="P">Plastic blade ($-1.22)
       <OPTION VALUE="S" SELECTED>Steel blade
       <OPTION VALUE="T">Titanium blade ($100.00)</SELECT>
===

(again, the output has been reformatted to fit the page).

Must pass named parameter interpolate=1 to cause interpolation.

Invalidates cache: no

Called Routine:

ASP-like Perl call:

    $Tag->options(
        {
         code => VALUE,
        }
    )

 OR

    $Tag->options($code, $ATTRHASH);