6.3. How are simple product options structured?
Interchange has three types of options; simple, matrix, and modular. They are based on the options database table.
To enable options for a product, it needs to have a master record in "options" with the SKU as the key. The only fields that matter in the master record are:
code The SKU of the item o_master Indicates not a product, but an option for a product in another database o_enable Options enabled for that item o_matrix Set to 1 for all-in-one widgets, 2 for separate widgets o_modular Modular options (alpha)
If o_enable is set, but neither o_matrix or o_modular are, the item is using simple options.
For the option itself in simple mode, the following fields apply:
code Arbitrary key sku SKU this option applies to o_group The attribute name of the option o_label The label the widget for the option will bear o_value The options, in IC option format o_widget The widget type used to display o_height The widget height (if any) o_width The widget width (if any) price Price adjustment
Here are the fields for an item with a simple size option:
code:os28009 o_master:1 o_enable:1 o_matrix:0 o_modular:0 # code:os28009-size sku:os28009 o_group:size o_label:Size o_value:S=Small,M=Medium,L=Large,XL=Extra Large o_widget:select o_height: o_width: price:S=-1.00,XL=1.00 #
The price field accepts option modifiers based on the option value; for example, to adjust the price of an S down 1.00 and the price of an XL up 1.00, you use the values shown above. This works in conjunction with the special ==:options atom in CommonAdjust. To activate the pricing adjustment, you must have something like this for your CommonAdjust setting:
CommonAdjust :sale_price, ;:price, ==:options
The actual names of the fields used for these can be changed with the Variable MV_OPTION_TABLE_MAP, i.e.
Variable MV_OPTION_TABLE_MAP <<EOM o_widget widget o_value value EOM
That would allow you to use "widget" and "value" in place of o_widget and o_value as field names.