Index: branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php =================================================================== diff -u -N -r13156 -r13549 --- branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 13156) +++ branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 13549) @@ -1,6 +1,6 @@ 'poc', - 'ItemClass' => Array('class'=>'kPOCItem','file'=>'products_option_combination_item.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'ProductOptionCombinationsEventHandler','file'=>'product_option_combinations_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'ProductOptionCombinationsTagProcessor','file'=>'product_option_combinations_tag_processor.php','build_event'=>'OnBuild'), - 'RegisterClasses' => Array( - Array('pseudo'=>'kCombinationFormatter','class'=>'kCombinationFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'), - Array('pseudo'=>'kCombPriceFormatter','class'=>'kCombPriceFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'), + 'ItemClass' => Array ('class' => 'kPOCItem', 'file' => 'products_option_combination_item.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ProductOptionCombinationsEventHandler', 'file' => 'product_option_combinations_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ProductOptionCombinationsTagProcessor', 'file' => 'product_option_combinations_tag_processor.php', 'build_event' => 'OnBuild'), + 'RegisterClasses' => Array ( + Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'), + Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'), ), 'AutoLoad' => true, - 'Hooks' => Array( + 'Hooks' => Array ( ), - 'AggregateTags' => Array( + 'AggregateTags' => Array ( ), - 'QueryString' => Array( + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', @@ -38,45 +38,50 @@ 'TitleField' => 'CombinationId', 'IDField' => 'CombinationId', 'TableName' => TABLE_PREFIX.'ProductOptionCombinations', - 'ForeignKey' => array('p' => 'ProductId'), - 'ParentTableKey' => array('p' => 'ProductId'), + 'ForeignKey' => Array ('p' => 'ProductId'), + 'ParentTableKey' => Array ('p' => 'ProductId'), 'ParentPrefix' => 'p', 'AutoDelete' => true, 'AutoClone' => true, - 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s + 'ListSQLs' => Array ( '' => 'SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = %1$s.ProductId LEFT JOIN '.TABLE_PREFIX.'ProductsPricing ON '.TABLE_PREFIX.'ProductsPricing.ProductId = %1$s.ProductId AND '.TABLE_PREFIX.'ProductsPricing.IsPrimary = 1 ', ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', + 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s', ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Combination' => 'asc'), - 'ForcedSorting' => Array('Priority' => 'desc'), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Combination' => 'asc'), + 'ForcedSorting' => Array ('Priority' => 'desc'), ) ), 'Fields' => Array ( - 'CombinationId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'Combination' => Array('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format'=>"%s: %s
", 'default' => NULL), - 'CombinationCRC' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'PriceType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ), - 'Price' => Array('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ), - 'WeightType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ), - 'Weight' => Array('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ), - 'Availability' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>array(0=>'la_No', 1=>'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ), - 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'QtyInStock' => Array('type' => 'int', 'not_null' => '1', 'default' => 0), - 'QtyReserved' => Array('type' => 'int', 'not_null' => '1', 'default' => 0), - 'QtyBackOrdered' => Array('type' => 'int', 'not_null' => '1', 'default' => 0), - 'QtyOnOrder' => Array('type' => 'int', 'not_null' => '1', 'default' => 0), - 'SKU' => Array('type' => 'string', 'not_null' => '1', 'default' => ''), + 'CombinationId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'Combination' => Array ('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format' =>"%s: %s
", 'default' => NULL), + 'CombinationCRC' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'PriceType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ), + 'Price' => Array ('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ), + 'WeightType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ), + 'Weight' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ), + 'Availability' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'QtyInStock' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0), + 'QtyReserved' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0), + 'QtyBackOrdered' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0), + 'QtyOnOrder' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0), + 'SKU' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), ), - 'CalculatedFields' => Array( - '' => Array( + 'CalculatedFields' => Array ( + '' => Array ( 'FinalPrice' => 'IF(%1$s.PriceType = 1, %1$s.Price, IF(%1$s.PriceType = 2, '.TABLE_PREFIX.'ProductsPricing.Price + %1$s.Price, '.TABLE_PREFIX.'ProductsPricing.Price * (1 + %1$s.Price/100) @@ -85,50 +90,50 @@ 'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price', ), ), - 'VirtualFields' => Array( - 'FinalPrice' => Array('formatter'=>'kCombPriceFormatter', 'format' => '%.2f'), + 'VirtualFields' => Array ( + 'FinalPrice' => Array ('formatter' => 'kCombPriceFormatter', 'format' => '%.2f'), ), 'Grids' => Array ( 'Default' => Array ( - 'Icons' => Array( + 'Icons' => Array ( 'default' => 'icon16_item.png', 'module' => 'core', ), - 'Fields' => Array( - 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'), - 'SKU' => Array( 'title'=>'la_col_SKU', 'filter_block' => 'grid_like_filter'), - 'Availability' => Array( 'title'=>'la_col_Availability', 'filter_block' => 'grid_options_filter'), - 'Price' => Array( 'title'=>'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'), - /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/ + 'Fields' => Array ( + 'Combination' => Array ( 'title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'), + 'SKU' => Array ( 'title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'), + 'Availability' => Array ( 'title' => 'la_col_Availability', 'filter_block' => 'grid_options_filter'), + 'Price' => Array ( 'title' => 'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'), + /*'Weight' => Array ( 'title' => 'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/ ), ), 'Inventory' => Array ( - 'Icons' => Array( + 'Icons' => Array ( 'default' => 'icon16_item.png', 'module' => 'core', ), 'Selector' => 'radio', 'Fields' => Array ( - 'Combination' => Array('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'), - 'SKU' => Array('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'), - 'QtyInStock' => Array('title'=>'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'), - 'QtyReserved' => Array('title'=>'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'), - 'QtyBackOrdered'=> Array('title'=>'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'), - 'QtyOnOrder' => Array('title'=>'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'), + 'Combination' => Array ('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'), + 'SKU' => Array ('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'), + 'QtyInStock' => Array ('title' => 'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'), + 'QtyReserved' => Array ('title' => 'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'), + 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'), + 'QtyOnOrder' => Array ('title' => 'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'), ), ), 'Radio' => Array ( 'Selector' => 'radio', - 'Icons' => Array( + 'Icons' => Array ( 'default' => 'icon16_item.png', 'module' => 'core', ), - 'Fields' => Array( - 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'), - 'FinalPrice' => Array( 'title'=>'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'), - /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/ + 'Fields' => Array ( + 'Combination' => Array ( 'title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'), + 'FinalPrice' => Array ( 'title' => 'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'), + /*'Weight' => Array ( 'title' => 'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/ ), ), ),