Index: branches/5.1.x/units/product_options/product_options_config.php =================================================================== diff -u -N -r13156 -r13549 --- branches/5.1.x/units/product_options/product_options_config.php (.../product_options_config.php) (revision 13156) +++ branches/5.1.x/units/product_options/product_options_config.php (.../product_options_config.php) (revision 13549) @@ -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'=>''), + '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( + 'Hooks' => Array ( ), - 'AggregateTags' => Array( - Array( + 'AggregateTags' => Array ( + Array ( 'AggregateTo' => '#PARENT#', 'AggregatedTagName' => 'ListOptions', 'LocalTagName' => 'ListOptions', ), ), - 'QueryString' => Array( + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', @@ -48,25 +48,35 @@ 'ParentPrefix' => 'p', 'AutoDelete' => true, 'AutoClone' => true, - 'SubItems' => array('poc'), - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', + 'SubItems' => Array ('poc'), + 'ListSQLs' => Array ( '' => 'SELECT * FROM %s', ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', + 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s', ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), - 'ForcedSorting' => Array('Priority' => 'desc'), + '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(0 => '!la_EmptyValue!', 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', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')), - 'Listable' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')), - 'Priority' => Array('type' => 'int', 'not_null'=>1, 'default'=>0), + '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), @@ -75,19 +85,19 @@ 'VirtualFields' => Array ( ), - 'Grids' => Array( + 'Grids' => Array ( - 'Default' => Array( - 'Icons' => 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'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'), - 'OptionType' => Array( 'title'=>'la_col_OptionType', 'filter_block' => 'grid_options_filter'), - 'Required' => Array( 'title'=>'la_col_Required', 'filter_block' => 'grid_options_filter'), - /*'Listable' => Array( 'title'=>'la_col_Listable', 'filter_block' => 'grid_options_filter'),*/ + 'Fields' => Array ( + 'ProductOptionId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'Name' => Array ( 'title' => 'la_col_Name', 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'), + 'OptionType' => Array ( 'title' => 'la_col_OptionType', 'filter_block' => 'grid_options_filter'), + 'Required' => Array ( 'title' => 'la_col_Required', 'filter_block' => 'grid_options_filter'), + /*'Listable' => Array ( 'title' => 'la_col_Listable', 'filter_block' => 'grid_options_filter'),*/ ), ),