Index: branches/5.1.x/units/pricing/pricing_config.php =================================================================== diff -u -r13156 -r13549 --- branches/5.1.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 13156) +++ branches/5.1.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 13549) @@ -1,6 +1,6 @@ 'pr', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'PricingEventHandler','file'=>'pricing_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'PricingTagProcessor','file'=>'pricing_tag_processor.php','build_event'=>'OnBuild'), + 'ItemClass' => Array ('class'=> 'kDBItem', 'file'=> '', 'build_event'=> 'OnItemBuild'), + 'ListClass' => Array ('class'=> 'kDBList', 'file'=> '', 'build_event'=> 'OnListBuild'), + 'EventHandlerClass' => Array ('class'=> 'PricingEventHandler', 'file'=> 'pricing_event_handler.php', 'build_event'=> 'OnBuild'), + 'TagProcessorClass' => Array ('class'=> 'PricingTagProcessor', 'file'=> 'pricing_tag_processor.php', 'build_event'=> 'OnBuild'), 'AutoLoad' => true, - 'Hooks' => Array( + 'Hooks' => Array ( // for tangible products: pricings are always aranged before saveing product - Array( + Array ( 'Mode' => hBEFORE, 'Conditional' => true, 'HookToPrefix' => '#PARENT#', 'HookToSpecial' => '', - 'HookToEvent' => Array('OnPreSave'), + 'HookToEvent' => Array ('OnPreSave'), 'DoPrefix' => '', 'DoSpecial' => 'tang', 'DoEvent' => 'OnArrange', ), ), - 'AggregateTags' => Array( - Array( + 'AggregateTags' => Array ( + Array ( 'AggregateTo' => '#PARENT#', 'AggregatedTagName' => 'Price', 'LocalTagName' => 'ProductPrice', ), - Array( + Array ( 'AggregateTo' => '#PARENT#', 'AggregatedTagName' => 'ListPriceBrackets', 'LocalTagName' => 'Product_ListPriceBrackets', ), - Array( + Array ( 'AggregateTo' => '#PARENT#', 'AggregatedTagName' => 'HasQuantityPricing', 'LocalTagName' => 'Product_HasQuantityPricing', ), ), - 'QueryString' => Array( + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', 4 => 'event', ), - 'StatusField' => Array('IsPrimary'), + 'StatusField' => Array ('IsPrimary'), 'IDField' => 'PriceId', 'TableName' => TABLE_PREFIX.'ProductsPricing', @@ -69,64 +69,74 @@ 'AutoDelete' => true, 'AutoClone' => true, - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', + '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('MinQty' => 'asc'), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('MinQty' => 'asc'), ) ), - 'Fields' => Array( - 'PriceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'MinQty' => Array('type' => 'int', 'default' => 0), - 'MaxQty' => Array('type' => 'int', 'default' => 0), - 'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0), - 'Price' => Array('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0), - 'Negotiated' => Array('type' => 'int', 'default' => 0), - 'Points' => Array('type' => 'int', 'default' => 0), - 'AccessDuration'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'AccessUnit' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,), - 'Description' => Array('type' => 'string', 'max_len' => 255, 'default' => NULL), - 'IsPrimary' => Array('type' => 'int', 'default' => 0, 'not_null' => 1), - 'GroupId' => Array('type' => 'int', 'default' => 0, 'not_null' => 1), - // 'AccessRebillDate' => Array('type'=>'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=>'1', 'default'=>0), - // Customization healtheconomics.org -// 'DurationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1), -// 'AccessExpiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter'), - // Customization healtheconomics.org -- - - ), - 'VirtualFields' => Array( + 'Fields' => Array ( + 'PriceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'MinQty' => Array ('type' => 'int', 'default' => 0), + 'MaxQty' => Array ('type' => 'int', 'default' => 0), + 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0), + 'Price' => Array ('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0), + 'Negotiated' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Points' => Array ('type' => 'int', 'default' => 0), + 'AccessDuration'=> Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'AccessUnit' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,), + 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), + 'IsPrimary' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'GroupId' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1), + // 'AccessRebillDate' => Array ('type'=> 'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default'=>0), + // Customization healtheconomics.org + // 'DurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1), + // 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'), + // Customization healtheconomics.org -- + ), + + 'VirtualFields' => Array ( ), - 'Grids' => Array( + 'Grids' => Array ( /* - 'Default' => Array( - 'Icons' => Array( + 'Default' => Array ( + 'Icons' => Array ( 'default' => 'icon16_item.png', 'module' => 'core', ), - 'Fields' => Array( - 'MinQty' => Array( 'title'=>'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'MaxQty' => Array( 'title'=>'la_col_MaxQty', 'filter_block' => 'grid_range_filter'), - 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_range_filter'), - 'Points' => Array( 'title'=>'la_col_Points', 'filter_block' => 'grid_range_filter'), - 'Cost' => Array( 'title'=>'la_col_Cost', 'filter_block' => 'grid_range_filter'), - 'Negotiated' => Array( 'title'=>'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'), + 'Fields' => Array ( + 'MinQty' => Array ( 'title'=> 'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'MaxQty' => Array ( 'title'=> 'la_col_MaxQty', 'filter_block' => 'grid_range_filter'), + 'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_range_filter'), + 'Points' => Array ( 'title'=> 'la_col_Points', 'filter_block' => 'grid_range_filter'), + 'Cost' => Array ( 'title'=> 'la_col_Cost', 'filter_block' => 'grid_range_filter'), + 'Negotiated' => Array ( 'title'=> 'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'), ), ), */ - 'Access' => Array( - 'Icons' => Array('default'=>'icon16_pricing.gif','0'=>'icon16_pricing.gif','1'=>'icon16_pricing_primary.gif'), - 'Fields' => Array( - 'AccessDuration' => Array( 'title'=>'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'AccessUnit' => Array( 'title'=>'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'), - 'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'), - 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_float_range_filter'), + 'Access' => Array ( + 'Icons' => Array ('default'=> 'icon16_pricing.gif', '0'=> 'icon16_pricing.gif', '1'=> 'icon16_pricing_primary.gif'), + 'Fields' => Array ( + 'AccessDuration' => Array ( 'title'=> 'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'AccessUnit' => Array ( 'title'=> 'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'), + 'Description' => Array ( 'title'=> 'la_col_Description', 'filter_block' => 'grid_like_filter'), + 'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_float_range_filter'), ), ),