Index: branches/5.2.x/units/product_options/product_options_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/product_options/product_options_config.php (.../product_options_config.php) (revision 14582) +++ branches/5.2.x/units/product_options/product_options_config.php (.../product_options_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'po', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ProductOptionsEventHandler', 'file' => 'product_options_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ProductOptionsTagProcessor', 'file' => 'product_options_tag_processor.php', 'build_event' => 'OnBuild'), - 'RegisterClasses' => Array ( - Array ('pseudo' => 'kProductOptionsHelper', 'class' => 'kProductOptionsHelper', 'file' => 'product_options_helper.php', 'build_event' => ''), - ), - 'AutoLoad' => true, - 'Hooks' => Array ( +$config = Array ( + 'Prefix' => 'po', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ProductOptionsEventHandler', 'file' => 'product_options_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ProductOptionsTagProcessor', 'file' => 'product_options_tag_processor.php', 'build_event' => 'OnBuild'), - ), - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => '#PARENT#', - 'AggregatedTagName' => 'ListOptions', - 'LocalTagName' => 'ListOptions', - ), - ), + 'RegisterClasses' => Array ( + Array ('pseudo' => 'kProductOptionsHelper', 'class' => 'kProductOptionsHelper', 'file' => 'product_options_helper.php', 'build_event' => ''), + ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'TitleField' => 'Name', - 'IDField' => 'ProductOptionId', - 'TableName' => TABLE_PREFIX.'ProductOptions', - 'ForeignKey' => 'ProductId', - 'ParentTableKey' => 'ProductId', - 'ParentPrefix' => 'p', - 'AutoDelete' => true, - 'AutoClone' => true, - 'SubItems' => Array ('poc'), - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s', - ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc'), - 'ForcedSorting' => Array ('Priority' => 'desc'), - ) - ), - 'Fields' => Array ( - 'ProductOptionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Name' => Array ('type' => 'string', 'required' => 1, 'max_len' => 255, 'not_null' => 1, 'default' => '',), - 'OptionType' => Array ('type' => 'int', 'required' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1 => '!la_type_select!', 5 => '!la_type_text!', 4 => '!la_type_textarea!', 3 => '!la_type_radio!', 6 => '!la_type_checkbox!' /*, 2 => '!la_type_password!' */), 'not_null' => 1, 'default' => 0), - 'Required' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Listable' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Priority' => Array ('type' => 'int', 'not_null' =>1, 'default' =>0), - 'Values' => Array ('type' => 'string', 'default' => NULL), - 'Prices' => Array ('type' => 'string', 'default' => NULL), - 'PriceTypes' => Array ('type' => 'string', 'default' => NULL), - ), + 'AutoLoad' => true, - 'VirtualFields' => Array ( - ), + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => '#PARENT#', + 'AggregatedTagName' => 'ListOptions', + 'LocalTagName' => 'ListOptions', + ), + ), - 'Grids' => Array ( + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 'module' => 'core', - ), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used - 'Fields' => Array ( - 'ProductOptionId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'Name' => Array ( 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'), - 'OptionType' => Array ( 'filter_block' => 'grid_options_filter'), - 'Required' => Array ( 'filter_block' => 'grid_options_filter'), -// 'Listable' => Array ('filter_block' => 'grid_options_filter'), - ), + 'TitleField' => 'Name', + 'IDField' => 'ProductOptionId', + 'TableName' => TABLE_PREFIX.'ProductOptions', + 'ForeignKey' => 'ProductId', + 'ParentTableKey' => 'ProductId', + 'ParentPrefix' => 'p', + 'AutoDelete' => true, + 'AutoClone' => true, + 'SubItems' => Array ('poc'), - ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), - ); \ No newline at end of file + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + 'ForcedSorting' => Array ('Priority' => 'desc'), + ) + ), + + 'Fields' => Array ( + 'ProductOptionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'required' => 1, 'max_len' => 255, 'not_null' => 1, 'default' => '',), + 'OptionType' => Array ('type' => 'int', 'required' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1 => '!la_type_select!', 5 => '!la_type_text!', 4 => '!la_type_textarea!', 3 => '!la_type_radio!', 6 => '!la_type_checkbox!' /*, 2 => '!la_type_password!' */), 'not_null' => 1, 'default' => 0), + 'Required' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Listable' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Priority' => Array ('type' => 'int', 'not_null' =>1, 'default' =>0), + 'Values' => Array ('type' => 'string', 'default' => NULL), + 'Prices' => Array ('type' => 'string', 'default' => NULL), + 'PriceTypes' => Array ('type' => 'string', 'default' => NULL), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 'module' => 'core', + ), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used + 'Fields' => Array ( + 'ProductOptionId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'Name' => Array ( 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'), + 'OptionType' => Array ( 'filter_block' => 'grid_options_filter'), + 'Required' => Array ( 'filter_block' => 'grid_options_filter'), +// 'Listable' => Array ('filter_block' => 'grid_options_filter'), + ), + ), + ), +); \ No newline at end of file