[strip int] [if cgi mv_more_ip][/if] [calc] $CGI->{item_id} = $CGI->{sku} if $CGI->{sku} and ! $CGI->{ignore_sku}; $CGI->{ui_meta_view} = 'optmaster'; $CGI->{mv_data_table} = '@_MV_OPTION_TABLE_@' || 'options'; $CGI->{ui_display_only} = '__ProductFiles_0__:__DescriptionField__'; return; [/calc] [tmp page_title] [either] [cgi page_title] [or] Item option editor: [cgi item_id] [/either] [/tmp] [tmp page_banner] [either] [cgi page_banner] [or] [cgi page_title] [or] Item option editor: [cgi item_id] [/either] [/tmp] [tmp help_name][either][cgi help_name][or]item.option[/either][/tmp] [tmp icon_name][either][cgi icon_name][or]admin/icon_item.gif[/either][/tmp] [set ui_class]Items[/set] [if-mm function="!tables" table="[cgi mv_data_table]"] [bounce page="__UI_BASE__/error"] [/if-mm] [perl tables="[cgi mv_data_table]"] $id = $CGI->{item_id}; my $db = $Db{$CGI->{mv_data_table}} or die "No options db?"; $CGI->{ui_data_fields} = 'code __ProductFiles_0__:__DescriptionField__ o_enable o_matrix o_modular'; if($db->record_exists($id) and $db->field($id, 'o_modular')) { $CGI->{ui_data_fields} .= ' sku o_master'; $CGI->{ui_options_modular} = 1; } return; [/perl] [if scratch ui_location] [bounce href=`delete $Scratch->{ui_location}`] [elsif !cgi mv_data_table] [bounce page="__UI_BASE__/gentable"] [/elsif] [/if] [/strip]@_UI_STD_HEAD_@
[if cgi ui_change_options]
[tmp ui_change_options]1[/tmp]
[/if]
[if type="!data" term="[cgi mv_data_table]::o_enable::[cgi item_id]"]
[tmp ui_change_options]1[/tmp]
[tmp ui_never_options]1[/tmp]
[/if]
[if scratch ui_change_options]
[then]
Select option type and/or [if scratch ui_never_options] enable [else] disable [/else][/if] options[table-editor table="[cgi mv_data_table]" hidden.item_id="[cgi item_id]" hidden.ignore_sku="1" across=3 key="[cgi item_id]" ui_meta_view="[cgi ui_meta_view]" ui_data_fields="[cgi ui_data_fields]" ui_display_only="[cgi ui_display_only]" widget.sku="hidden" widget.o_master="hidden" override.sku="[cgi item_id]" override.o_master="NONE" table_width="400" ] [/then] [else] [loop list="[cgi item_id]"]
[/loop] [if type=data term="options::o_matrix::[cgi item_id]"] [include include/item_option_matrix] [elsif type=data term="options::o_modular::[cgi item_id]"] [include include/item_option_modular] [/elsif] [else] [include include/item_option_simple] [/else] [/if] [/else] [/if] |