Index: branches/5.2.x/units/gateway_field_values/gateway_field_values_config.php =================================================================== diff -u -N -r14258 -r16385 --- branches/5.2.x/units/gateway_field_values/gateway_field_values_config.php (.../gateway_field_values_config.php) (revision 14258) +++ branches/5.2.x/units/gateway_field_values/gateway_field_values_config.php (.../gateway_field_values_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'gwfv', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), - 'AutoLoad' => false, - 'hooks' => Array(), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'GWConfigValueId', - 'TableName' => TABLE_PREFIX.'GatewayConfigValues', - 'ForeignKey' => 'PaymentTypeId', - 'ParentTableKey' => 'PaymentTypeId', - 'ParentPrefix' => 'pt', - 'AutoDelete' => true, - 'AutoClone' => true, +$config = Array ( + 'Prefix' => 'gwfv', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'ListSQLs' => Array (''=>'SELECT * FROM %s' - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), + 'AutoLoad' => false, - 'Fields' => Array ( - 'GWConfigValueId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'Value' => Array('type' => 'string', 'max_len' => 255, 'default' => null, ), - ), - ); \ No newline at end of file + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), + + 'IDField' => 'GWConfigValueId', + 'TableName' => TABLE_PREFIX.'GatewayConfigValues', + 'ForeignKey' => 'PaymentTypeId', + 'ParentTableKey' => 'PaymentTypeId', + 'ParentPrefix' => 'pt', + 'AutoDelete' => true, + 'AutoClone' => true, + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), + + 'Fields' => Array ( + 'GWConfigValueId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'GWConfigFieldId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'Value' => Array ('type' => 'string', 'max_len' => 255, 'default' => null, ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/order_items/order_items_config.php =================================================================== diff -u -N -r15719 -r16385 --- branches/5.2.x/units/order_items/order_items_config.php (.../order_items_config.php) (revision 15719) +++ branches/5.2.x/units/order_items/order_items_config.php (.../order_items_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'orditems', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'OrderItemsEventHandler', 'file' => 'order_items_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'OrderItemsTagProcessor', 'file' => 'order_items_tag_processor.php', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'orditems', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'OrderItemsEventHandler', 'file' => 'order_items_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'OrderItemsTagProcessor', 'file' => 'order_items_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => '#PARENT#', - 'AggregatedTagName' => 'ItemFieldEquals', - 'LocalTagName' => 'FieldEquals', - ), + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => '#PARENT#', + 'AggregatedTagName' => 'ItemFieldEquals', + 'LocalTagName' => 'FieldEquals', ), + ), - 'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnPreSave', 'OnRecalculateItems'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdate', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnPreSave', 'OnRecalculateItems'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnUpdate', ), + ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'IDField' => 'OrderItemId', - 'TitleField' => 'OrderItemId', - 'StatusField' => Array ('Status'), + 'IDField' => 'OrderItemId', + 'TitleField' => 'OrderItemId', + 'StatusField' => Array ('Status'), - 'TableName' => TABLE_PREFIX.'OrderItems', + 'TableName' => TABLE_PREFIX.'OrderItems', - 'ParentTableKey' => 'OrderId', - 'ForeignKey' => 'OrderId', - 'ParentPrefix' => 'ord', - 'AutoDelete' => true, - 'AutoClone' => true, + 'ParentTableKey' => 'OrderId', + 'ForeignKey' => 'OrderId', + 'ParentPrefix' => 'ord', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ItemType' => 11, + 'ItemType' => 11, - 'CalculatedFields' => Array ( - '' => Array ( - 'ExtendedPrice' => '%1$s.Price * %1$s.Quantity', - 'ExtendedPriceFlat' => '%1$s.FlatPrice * %1$s.Quantity', - 'QuantityAvailable' => 'IF( ISNULL(p.QtyInStock) AND ISNULL(p.ProductId),"!la_ProductDeleted!", IF(p.Type = 1, IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock), "") )', - 'ItemDiscount' => '(%1$s.FlatPrice - %1$s.Price)', - 'SKU' => 'IF(p.InventoryStatus = 2 OR NOT ISNULL(poc.CombinationCRC), poc.SKU, p.SKU)', // inventory by options OR combination found - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'ExtendedPrice' => '%1$s.Price * %1$s.Quantity', + 'ExtendedPriceFlat' => '%1$s.FlatPrice * %1$s.Quantity', + 'QuantityAvailable' => 'IF( ISNULL(p.QtyInStock) AND ISNULL(p.ProductId),"!la_ProductDeleted!", IF(p.Type = 1, IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock), "") )', + 'ItemDiscount' => '(%1$s.FlatPrice - %1$s.Price)', + 'SKU' => 'IF(p.InventoryStatus = 2 OR NOT ISNULL(poc.CombinationCRC), poc.SKU, p.SKU)', // inventory by options OR combination found ), + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.*, p.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ProductId = p.ProductId - LEFT JOIN '.TABLE_PREFIX.'ProductOptionCombinations poc ON (%1$s.ProductId = poc.ProductId) AND (%1$s.OptionsSalt = poc.CombinationCRC)', - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.*, p.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ProductId = p.ProductId + LEFT JOIN '.TABLE_PREFIX.'ProductOptionCombinations poc ON (%1$s.ProductId = poc.ProductId) AND (%1$s.OptionsSalt = poc.CombinationCRC)', + ), - 'ItemSQLs' => Array ( - '' => 'SELECT *, (Quantity*Price) AS ExtendedPrice, 0 AS QuantityAvailable FROM %s', - ), + 'ItemSQLs' => Array ( + '' => ' SELECT *, (Quantity*Price) AS ExtendedPrice, 0 AS QuantityAvailable + FROM %s', + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('ProductName' => 'asc', 'BackOrderFlag' => 'asc'), - ) + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('ProductName' => 'asc', 'BackOrderFlag' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'OrderItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OrderId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ProductName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'Quantity' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'QuantityReserved' => Array ('type' => 'int', 'default' => null), + 'FlatPrice' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1', 'default' => '0.0000'), + 'Price' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1', 'default' => '0.0000'), + 'Cost' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => '1', 'default' => '0.0000'), + 'BackOrderFlag' => Array ('type' => 'int', 'default' => 0), + 'Weight' => Array ('type' => 'double', 'default' => NULL), + 'ShippingTypeId' => Array ('type' => 'string', 'default' => NULL), + 'ItemData' => Array ('type' => 'string', 'default' => null), + 'OptionsSalt' => Array ('type' => 'string', 'default' => 0), + 'SplitShippingGroup' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'PackageNum' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'ReturnType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Refund', 2 => 'la_opt_Exchange', 3 => 'la_opt_Warranty'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 ), + 'ReturnAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => 0), + 'ReturnedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + ), - 'Fields' => Array ( - 'OrderItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OrderId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'Quantity' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'QuantityReserved' => Array('type' => 'int', 'default' => null), - 'FlatPrice' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'), - 'Price' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'), - 'Cost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'), - 'BackOrderFlag' => Array('type' => 'int', 'default' => 0), - 'Weight' => Array ('type' => 'double', 'default' => NULL), - 'ShippingTypeId' => Array ('type' => 'string', 'default' => NULL), - 'ItemData' => Array('type' => 'string','default' => null), - 'OptionsSalt' => Array('type' => 'string', 'default' => 0), - 'SplitShippingGroup' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'PackageNum' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'ReturnType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Refund', 2 => 'la_opt_Exchange', 3 => 'la_opt_Warranty'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 + 'VirtualFields' => Array ( + 'ExtendedPrice' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'ExtendedPriceFlat' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'QuantityAvailable' => Array ('type' => 'int', 'default'=>0), + 'DiscountType' => Array ('type' => 'string', 'default' => ''), + 'DiscountId' => Array ('type' => 'int', 'default'=>0), + 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => ''), + 'ItemDiscount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'SKU' => Array ('type' => 'string', 'default' => ''), + 'MinQtyFreeShipping'=> Array ('type' => 'int', 'default' => 0,), + 'Virtual' => Array ('type' => 'int', 'default' => 0), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', ), - 'ReturnAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => 0), - 'ReturnedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - ), + 'Fields' => Array ( + 'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td', 'filter_block' => 'grid_like_filter'), + 'Quantity' => Array ('title' => 'la_col_Quantity', 'data_block' => 'grid_quantity_td', 'filter_block' => 'grid_range_filter'), + 'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'), + 'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'), + 'Price' => Array ('data_block' => 'grid_price_td', 'filter_block' => 'grid_range_filter'), + 'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'data_block' => 'grid_extendedprice_td', 'filter_block' => 'grid_range_filter'), - 'VirtualFields' => Array ( - 'ExtendedPrice' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'), - 'ExtendedPriceFlat' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'), - 'QuantityAvailable' => Array('type'=>'int','default'=>0), - 'DiscountType' => Array('type'=>'string','default'=>''), - 'DiscountId' => Array('type'=>'int','default'=>0), - 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => ''), - 'ItemDiscount' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'), - 'SKU' => Array('type' => 'string', 'default' => ''), - 'MinQtyFreeShipping'=> Array('type' => 'int', 'default' => 0,), - 'Virtual' => Array ('type' => 'int', 'default' => 0), + 'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'), + 'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_range_filter'), + 'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'), + ), ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - ), - 'Fields' => Array ( - 'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td', 'filter_block' => 'grid_like_filter'), - 'Quantity' => Array ('title' => 'la_col_Quantity', 'data_block' => 'grid_quantity_td', 'filter_block' => 'grid_range_filter'), - 'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'), - 'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'), - 'Price' => Array ('data_block' => 'grid_price_td', 'filter_block' => 'grid_range_filter'), - 'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'data_block' => 'grid_extendedprice_td', 'filter_block' => 'grid_range_filter'), - - 'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'), - 'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_range_filter'), - 'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'), - ), + 'NotEditable' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', ), + 'Fields' => Array ( + 'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td'), + 'Quantity' => Array ('title' => 'la_col_Quantity', 'filter_block' => 'grid_range_filter'), + 'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'), + 'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'), + 'Price' => Array ('filter_block' => 'grid_range_filter'), + 'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'filter_block' => 'grid_range_filter'), - 'NotEditable' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - ), - 'Fields' => Array ( - 'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td'), - 'Quantity' => Array ('title' => 'la_col_Quantity', 'filter_block' => 'grid_range_filter'), - 'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'), - 'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'), - 'Price' => Array ('filter_block' => 'grid_range_filter'), - 'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'filter_block' => 'grid_range_filter'), - - 'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'), - 'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_range_filter'), - 'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'), - ), + 'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'), + 'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_range_filter'), + 'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'), ), ), - ); \ No newline at end of file + ), +); Index: branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_config.php =================================================================== diff -u -N -r14594 -r16385 --- branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_config.php (.../affiliate_payment_types_config.php) (revision 14594) +++ branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_config.php (.../affiliate_payment_types_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'apt', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'AffiliatePaymentTypesEventHandler', 'file' => 'affiliate_payment_types_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'AffiliatePaymentTypeTagProcessor', 'file' => 'affiliate_payment_types_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'apt', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatePaymentTypesEventHandler', 'file' => 'affiliate_payment_types_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AffiliatePaymentTypeTagProcessor', 'file' => 'affiliate_payment_types_tp.php', 'build_event' => 'OnBuild'), - 'IDField' => 'PaymentTypeId', - 'StatusField' => Array ('Status', 'IsPrimary'), // field, that is affected by Approve/Decline events + 'AutoLoad' => true, - 'TitleField' => 'Name', - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('apt' => '!la_title_Adding_Affiliate_Payment_Type!'), - 'edit_status_labels' => Array ('apt' => '!la_title_Editing_Affiliate_Payment_Type!'), - 'new_titlefield' => Array ('apt' => '!la_title_New_Affiliate_Payment_Type!'), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'affiliate_payment_types_list' => Array ('prefixes' => Array ('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"), - 'affiliate_payment_types_edit' => Array ('prefixes' => Array ('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"), + 'IDField' => 'PaymentTypeId', + 'StatusField' => Array ('Status', 'IsPrimary'), // field, that is affected by Approve/Decline events - ), + 'TitleField' => 'Name', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('apt' => '!la_title_Adding_Affiliate_Payment_Type!'), + 'edit_status_labels' => Array ('apt' => '!la_title_Editing_Affiliate_Payment_Type!'), + 'new_titlefield' => Array ('apt' => '!la_title_New_Affiliate_Payment_Type!'), + ), - 'PermSection' => Array ('main' => 'in-commerce:affiliate_payment_types'), + 'affiliate_payment_types_list' => Array ('prefixes' => Array ('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"), + 'affiliate_payment_types_edit' => Array ('prefixes' => Array ('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"), + ), - 'Sections' => Array ( - 'in-commerce:affiliate_payment_types' => Array ( - 'parent' => 'in-commerce:affiliates_folder', - 'icon' => 'affiliates', - 'label' => 'la_tab_AffiliatePaymentTypes', - 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'), - 'permissions' => Array ( - 'view', 'add', 'edit', 'delete', 'advanced:approve', - 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down' - ), - 'priority' => 5.3, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'PermSection' => Array ('main' => 'in-commerce:affiliate_payment_types'), - 'TableName' => TABLE_PREFIX.'AffiliatePaymentTypes', + 'Sections' => Array ( + 'in-commerce:affiliate_payment_types' => Array ( + 'parent' => 'in-commerce:affiliates_folder', + 'icon' => 'affiliates', + 'label' => 'la_tab_AffiliatePaymentTypes', + 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'), + 'permissions' => Array ( + 'view', 'add', 'edit', 'delete', 'advanced:approve', + 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down' + ), + 'priority' => 5.3, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'ListSQLs' => Array ('' => 'SELECT * FROM %s'), - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'TableName' => TABLE_PREFIX.'AffiliatePaymentTypes', - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'IsPrimary' => 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), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array ( 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'Description' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), - ), - ), + 'Fields' => Array ( + 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'IsPrimary' => 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), + ), - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ( 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'Description' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/coupon_items/coupon_items_config.php =================================================================== diff -u -N -r15009 -r16385 --- branches/5.2.x/units/coupon_items/coupon_items_config.php (.../coupon_items_config.php) (revision 15009) +++ branches/5.2.x/units/coupon_items/coupon_items_config.php (.../coupon_items_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'coupi', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'CouponItemsEventHandler', 'file' => 'coupon_items_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'CouponItemsTagProcessor', 'file' => 'coupon_items_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'p', - 'HookToSpecial' => '-item', - 'HookToEvent' => Array('OnAfterItemDelete'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnDeleteCouponItem', - ), - ), +$config = Array ( + 'Prefix' => 'coupi', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'CouponItemsEventHandler', 'file' => 'coupon_items_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'CouponItemsTagProcessor', 'file' => 'coupon_items_tag_processor.php', 'build_event' => 'OnBuild'), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', + 'AutoLoad' => true, + + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'p', + 'HookToSpecial' => '-item', + 'HookToEvent' => Array ('OnAfterItemDelete'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnDeleteCouponItem', ), + ), - 'IDField' => 'CouponItemId', - 'StatusField' => Array('Status'), - 'TableName' => TABLE_PREFIX . 'ProductsCouponItems', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ForeignKey' => 'CouponId', - 'ParentTableKey' => 'CouponId', - 'ParentPrefix' => 'coup', - 'AutoDelete' => true, - 'AutoClone' => true, + 'IDField' => 'CouponItemId', + 'StatusField' => Array ('Status'), + 'TableName' => TABLE_PREFIX . 'ProductsCouponItems', - 'ListSQLs' => Array( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN ' . TABLE_PREFIX . 'Products p ON %1$s.ItemResourceId = p.ResourceId - LEFT JOIN ' . TABLE_PREFIX . 'Categories c ON %1$s.ItemResourceId = c.ResourceId', - ), // key - special, value - list select sql + 'ForeignKey' => 'CouponId', + 'ParentTableKey' => 'CouponId', + 'ParentPrefix' => 'coup', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ItemSQLs' => Array( - '' => 'SELECT * FROM %s', - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN ' . TABLE_PREFIX . 'Products p ON %1$s.ItemResourceId = p.ResourceId + LEFT JOIN ' . TABLE_PREFIX . 'Categories c ON %1$s.ItemResourceId = c.ResourceId', + ), - /*'BelongsTo' => Array( - Array( - 'prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'), - ),*/ + /*'BelongsTo' => Array ( + Array ( + 'prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'), + ),*/ - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('ItemName' => 'asc'), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('ItemName' => 'asc'), ), + ), - 'CalculatedFields' => Array( - '' => Array( - 'ProductId' => 'p.ProductId', - 'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)', - 'SKU' => 'p.SKU', - 'Weight' => 'p.Weight', - 'CreatedOn' => 'p.CreatedOn', - 'BackOrderDate' => 'p.BackOrderDate', - 'Status' => 'p.Status', - 'CategoryId' => 'c.CategoryId', - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'ProductId' => 'p.ProductId', + 'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)', + 'SKU' => 'p.SKU', + 'Weight' => 'p.Weight', + 'CreatedOn' => 'p.CreatedOn', + 'BackOrderDate' => 'p.BackOrderDate', + 'Status' => 'p.Status', + 'CategoryId' => 'c.CategoryId', ), + ), - 'Fields' => Array ( - 'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'CouponId' => Array('type' => 'int', 'default' => null, ), - 'ItemResourceId' => Array('type' => 'int', 'default' => null, ), - 'ItemType' => Array( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1 - ), + 'Fields' => Array ( + 'CouponItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'CouponId' => Array ('type' => 'int', 'default' => null, ), + 'ItemResourceId' => Array ('type' => 'int', 'default' => null, ), + 'ItemType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1 ), + ), - 'VirtualFields' => Array( - 'ProductId' => Array('type' => 'int', 'default' => 0), - 'ItemName' => Array('type' => 'string', 'default' => ''), - 'SKU' => Array('type' => 'string', 'default' => ''), - 'Weight' => Array( - 'type' => 'float', - 'formatter' => 'kFormatter', 'format' => '%0.2f', - 'min_value_exc' => 0, 'default' => NULL, - ), - 'CreatedOn' => Array( - 'type' => 'int', - 'formatter' => 'kDateFormatter', - 'default' => '#NOW#', - ), - 'BackOrderDate' => Array( - 'type' => 'int', - 'formatter' => 'kDateFormatter', - 'default' => NULL, - ), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, - 'default' => 2, - ), - 'CategoryId' => Array ('type' => 'int', 'default' => 0), + 'VirtualFields' => Array ( + 'ProductId' => Array ('type' => 'int', 'default' => 0), + 'ItemName' => Array ('type' => 'string', 'default' => ''), + 'SKU' => Array ('type' => 'string', 'default' => ''), + 'Weight' => Array ( + 'type' => 'float', + 'formatter' => 'kFormatter', 'format' => '%0.2f', + 'min_value_exc' => 0, 'default' => NULL, ), + 'CreatedOn' => Array ( + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'default' => '#NOW#', + ), + 'BackOrderDate' => Array ( + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'default' => NULL, + ), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, + 'default' => 2, + ), + 'CategoryId' => Array ('type' => 'int', 'default' => 0), + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array('default'=>'icon16_entire_order.gif'), - 'Fields' => Array( - 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter', 'width' => 200, ), - ), + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_entire_order.gif'), + 'Fields' => Array ( + 'ItemType' => Array ( 'title' => 'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter', 'width' => 200, ), ), - 'CouponItems' => Array( - 'Icons' => Array( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - ), - 'Fields' => Array( - 'ProductId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'ItemName' => Array( 'filter_block' => 'grid_like_filter', 'width' => 250, ), - 'ItemType' => Array( 'title'=>'la_col_CouponItemType', 'filter_block' => 'grid_options_filter', 'width' => 150, ), - ), + ), + 'CouponItems' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', ), + 'Fields' => Array ( + 'ProductId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'ItemName' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 250, ), + 'ItemType' => Array ( 'title' => 'la_col_CouponItemType', 'filter_block' => 'grid_options_filter', 'width' => 150, ), + ), ), - - ); \ No newline at end of file + ), +); \ No newline at end of file Index: branches/5.2.x/units/shipping/shipping_config.php =================================================================== diff -u -N -r14717 -r16385 --- branches/5.2.x/units/shipping/shipping_config.php (.../shipping_config.php) (revision 14717) +++ branches/5.2.x/units/shipping/shipping_config.php (.../shipping_config.php) (revision 16385) @@ -1,6 +1,6 @@ 's', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ShippingEventHandler', 'file' => 'shipping_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ShippingTagProcessor', 'file' => 'shipping_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => 'ord', - 'AggregatedTagName' => 'PrintShippingTypes', - 'LocalTagName' => 'Order_PrintShippingTypes', - ), - ), - 'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'sc', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnPropagate', 'OnClearAll' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnPreSave', - ), - ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'ShippingID', - 'StatusField' => Array ('Status'), - 'TitleField' => 'Name', +$config = Array ( + 'Prefix' => 's', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ShippingEventHandler', 'file' => 'shipping_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ShippingTagProcessor', 'file' => 'shipping_tag_processor.php', 'build_event' => 'OnBuild'), - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('s' => '!la_title_AddingShippingType!'), - 'edit_status_labels' => Array ('s' => '!la_title_EditingShippingType!'), - 'new_titlefield' => Array ('s' => '!la_title_NewShippingType!'), - ), - 'shipping_list' => Array ( - 'prefixes' => Array ('s_List'), - 'format' => "!la_title_ShippingTypes!", - ), - 'shipping_type_edit' => Array ( - 'prefixes' => Array ('s'), - 'format' => "#s_status# '#s_titlefield#' - !la_title_General!", - ), - 'zones' => Array ( - 'prefixes' => Array ('s'), - 'format' => "#s_status# '#s_titlefield#' - !la_title_Zones!", - ), - 'zones_edit' => Array ( - 'prefixes' => Array ('z'), - 'new_status_labels' => Array ('z' => '!la_title_AddingShippingZone!'), - 'edit_status_labels' => Array ('z' => '!la_title_EditingShippingZone!'), - 'format' => "#z_status# '#z_titlefield#'", - ), - 'brackets' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Brackets!",), - 'costs' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Costs!",), - 'groups' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Groups!",), - 'select_modifier' => Array ('prefixes' => Array ('s'), 'format' => "!la_title_ApplyModifier!",), - ), + 'AutoLoad' => true, - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/shipping/shipping_edit', 'priority' => 1), - 'zones' => Array ('title' => 'la_tab_ShippingZones', 't' => 'in-commerce/shipping/shipping_zones', 'priority' => 2), - 'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/shipping/shipping_brackets', 'priority' => 3), - 'costs' => Array ('title' => 'la_tab_Costs', 't' => 'in-commerce/shipping/shipping_costs', 'priority' => 4), - 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5), - ), - ), + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => 'ord', + 'AggregatedTagName' => 'PrintShippingTypes', + 'LocalTagName' => 'Order_PrintShippingTypes', + ), + ), - 'PermSection' => Array ('main' => 'in-commerce:shipping'), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => 'sc', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnPropagate', 'OnClearAll' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnPreSave', + ), + ), - 'Sections' => Array ( - 'in-commerce:shipping_folder' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_shipping', - 'use_parent_header' => 1, - 'label' => 'la_tab_Shipping', - 'permissions' => Array (), - 'priority' => 4, - 'type' => stTREE, - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'in-commerce:shipping' => Array ( - 'parent' => 'in-commerce:shipping_folder', - 'icon' => 'conf_shipping', - 'label' => 'la_tab_CustomShippingTypes', - 'url' => Array ('t' => 'in-commerce/shipping/shipping_custom_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), - 'priority' => 4.1, - 'type' => stTAB, - ), - ), + 'IDField' => 'ShippingID', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'ShippingType', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('s' => '!la_title_AddingShippingType!'), + 'edit_status_labels' => Array ('s' => '!la_title_EditingShippingType!'), + 'new_titlefield' => Array ('s' => '!la_title_NewShippingType!'), + ), + 'shipping_list' => Array ( + 'prefixes' => Array ('s_List'), + 'format' => "!la_title_ShippingTypes!", + ), + 'shipping_type_edit' => Array ( + 'prefixes' => Array ('s'), + 'format' => "#s_status# '#s_titlefield#' - !la_title_General!", + ), + 'zones' => Array ( + 'prefixes' => Array ('s'), + 'format' => "#s_status# '#s_titlefield#' - !la_title_Zones!", + ), + 'zones_edit' => Array ( + 'prefixes' => Array ('z'), + 'new_status_labels' => Array ('z' => '!la_title_AddingShippingZone!'), + 'edit_status_labels' => Array ('z' => '!la_title_EditingShippingZone!'), + 'format' => "#z_status# '#z_titlefield#'", + ), + 'brackets' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Brackets!",), + 'costs' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Costs!",), + 'groups' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Groups!",), + 'select_modifier' => Array ('prefixes' => Array ('s'), 'format' => "!la_title_ApplyModifier!",), + ), - 'SubItems' => Array ('z', 'br'), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/shipping/shipping_edit', 'priority' => 1), + 'zones' => Array ('title' => 'la_tab_ShippingZones', 't' => 'in-commerce/shipping/shipping_zones', 'priority' => 2), + 'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/shipping/shipping_brackets', 'priority' => 3), + 'costs' => Array ('title' => 'la_tab_Costs', 't' => 'in-commerce/shipping/shipping_costs', 'priority' => 4), + 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5), + ), + ), - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'), - // key - special, value - list select sql - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'), + 'PermSection' => Array ('main' => 'in-commerce:shipping'), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'Sections' => Array ( + 'in-commerce:shipping_folder' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_shipping', + 'use_parent_header' => 1, + 'label' => 'la_tab_Shipping', + 'permissions' => Array (), + 'priority' => 4, + 'type' => stTREE, + ), - 'Fields' => Array ( - 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>25, 'error_msgs' => Array ('required' => 'Please fill in')), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')), - 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' => 25), - 'LocationFrom' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( - 1 => 'Riga', - 2 => 'Salaspils', - 3 => 'Chicago', - 4 => 'Dublin' - ), - 'not_null' => 1, 'default' => 1 - ), - 'Type' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), - 'not_null' => 1, 'default' => 1), - 'BaseFee' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), - 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), - 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, - 'default' => 1, 'not_null' => 1, - ), - 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ), - 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ), - 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => 1 ), - 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => 1 ), - 'PortalGroups' => Array ('type' => 'string', 'default' => null), - 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0), - 'IsFreePromoShipping' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'InsuranceFee' => Array ('type' => 'float', 'default' => null), - 'InsuranceType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 2 - ), - ), + 'in-commerce:shipping' => Array ( + 'parent' => 'in-commerce:shipping_folder', + 'icon' => 'conf_shipping', + 'label' => 'la_tab_CustomShippingTypes', + 'url' => Array ('t' => 'in-commerce/shipping/shipping_custom_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), + 'priority' => 4.1, + 'type' => stTAB, + ), + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'ShippingID' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array ( 'title' => 'column:la_fld_ShippingName', 'filter_block' => 'grid_range_filter', 'width' => 250, ), - 'Type' => Array ( 'title' => 'column:la_fld_ShippingType', 'filter_block' => 'grid_options_filter', 'width' => 100, ), - 'SpeedCode' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 130, ), - 'BaseFee' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 100, ), - 'IsFreePromoShipping' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 70, ), - 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 170, ), -// 'CODFlatSurcharge' => Array ( 'filter_block' => 'grid_range_filter'), - ), + 'TableName' => TABLE_PREFIX.'ShippingType', - ), - ), - ); \ No newline at end of file + 'SubItems' => Array ('z', 'br'), + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>25, 'error_msgs' => Array ('required' => 'Please fill in')), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')), + 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' => 25), + 'LocationFrom' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 1 => 'Riga', + 2 => 'Salaspils', + 3 => 'Chicago', + 4 => 'Dublin' + ), + 'not_null' => 1, 'default' => 1 + ), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), + 'not_null' => 1, 'default' => 1), + 'BaseFee' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), + 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), + 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), + 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ), + 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ), + 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => 1 ), + 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => 1 ), + 'PortalGroups' => Array ('type' => 'string', 'default' => null), + 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0), + 'IsFreePromoShipping' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'InsuranceFee' => Array ('type' => 'float', 'default' => null), + 'InsuranceType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 2 + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'ShippingID' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ( 'title' => 'column:la_fld_ShippingName', 'filter_block' => 'grid_range_filter', 'width' => 250, ), + 'Type' => Array ( 'title' => 'column:la_fld_ShippingType', 'filter_block' => 'grid_options_filter', 'width' => 100, ), + 'SpeedCode' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 130, ), + 'BaseFee' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 100, ), + 'IsFreePromoShipping' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 70, ), + 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 170, ), +// 'CODFlatSurcharge' => Array ( 'filter_block' => 'grid_range_filter'), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/brackets/brackets_config.php =================================================================== diff -u -N -r14258 -r16385 --- branches/5.2.x/units/brackets/brackets_config.php (.../brackets_config.php) (revision 14258) +++ branches/5.2.x/units/brackets/brackets_config.php (.../brackets_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'br', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'BracketsEventHandler','file'=>'brackets_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'BracketsTagProcessor','file'=>'brackets_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnPreSave'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnArrange', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'BracketId', - 'TableName' => TABLE_PREFIX.'ShippingBrackets', - 'ForeignKey' => 'ShippingTypeID', - 'ParentTableKey' => 'ShippingID', - 'ParentPrefix' => 's', - 'AutoDelete' => true, - 'AutoClone' => true, +$config = Array ( + 'Prefix' => 'br', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'BracketsEventHandler', 'file' => 'brackets_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'BracketsTagProcessor', 'file' => 'brackets_tag_processor.php', 'build_event' => 'OnBuild'), - 'SubItems' => Array('sc'), + 'AutoLoad' => true, - 'ListSQLs' => Array( ''=> 'SELECT * FROM %s'), - // key - special, value - list select sql - 'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnPreSave'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnArrange', + ), + ), - 'Fields' => Array ( - 'BracketId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'ShippingTypeID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Start' => Array('type' => 'double', 'formatter'=>'kFormatter', 'not_null' => true, 'default' => 0), - 'End' => Array('type' => 'double', 'formatter'=>'kFormatter', 'not_null' => true, 'default' => 0), - ), - ); \ No newline at end of file + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), + + 'IDField' => 'BracketId', + 'TableName' => TABLE_PREFIX.'ShippingBrackets', + 'ForeignKey' => 'ShippingTypeID', + 'ParentTableKey' => 'ShippingID', + 'ParentPrefix' => 's', + 'AutoDelete' => true, + 'AutoClone' => true, + + 'SubItems' => Array ('sc'), + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), + + 'Fields' => Array ( + 'BracketId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'ShippingTypeID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Start' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'not_null' => true, 'default' => 0), + 'End' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'not_null' => true, 'default' => 0), + ), +); \ No newline at end of file Index: branches/5.2.x/units/payment_type_currencies/payment_type_currencies_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/payment_type_currencies/payment_type_currencies_config.php (.../payment_type_currencies_config.php) (revision 14582) +++ branches/5.2.x/units/payment_type_currencies/payment_type_currencies_config.php (.../payment_type_currencies_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'ptc', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'PaymentTypeCurrenciesEventHandler','file'=>'payment_type_currencies_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'PaymentTypeCurrenciesTagProcessor','file'=>'payment_type_currencies_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array(), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'ptc', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PaymentTypeCurrenciesEventHandler', 'file' => 'payment_type_currencies_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PaymentTypeCurrenciesTagProcessor', 'file' => 'payment_type_currencies_tag_processor.php', 'build_event' => 'OnBuild'), - 'Hooks' => Array( - Array( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnPreSaveAndGoToTab', 'OnPreSaveAndGo', 'OnPreSave' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnCreate', - ), - ), - 'IDField' => 'PaymentTypeCurrencyId', - 'TableName' => TABLE_PREFIX.'PaymentTypeCurrencies', - 'ParentTableKey' => 'PaymentTypeId', // linked field in master table - 'ForeignKey' => 'PaymentTypeId', // linked field in subtable - 'ParentPrefix' => 'pt', - 'AutoDelete' => true, + 'AutoLoad' => true, - 'SubItems' => Array(), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'ListSQLs' => Array( ''=> 'SELECT * FROM %s'), - // key - special, value - list select sql - 'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnPreSaveAndGoToTab', 'OnPreSaveAndGo', 'OnPreSave' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnCreate', + ), + ), - 'ListSortings' => Array(), - 'Fields' => Array - ( - 'PaymentTypeCurrencyId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PaymentTypeId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'CurrencyId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - ), - ); \ No newline at end of file + 'IDField' => 'PaymentTypeCurrencyId', + 'TableName' => TABLE_PREFIX.'PaymentTypeCurrencies', + 'ParentTableKey' => 'PaymentTypeId', // linked field in master table + 'ForeignKey' => 'PaymentTypeId', // linked field in subtable + 'ParentPrefix' => 'pt', + 'AutoDelete' => true, + + 'SubItems' => Array (), + + 'ListSQLs' => Array ( + ''=> ' SELECT * + FROM %s' + ), + + 'ListSortings' => Array (), + + 'Fields' => Array ( + 'PaymentTypeCurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + ), +); \ No newline at end of file Index: branches/5.2.x/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php =================================================================== diff -u -N -r14258 -r16385 --- branches/5.2.x/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php (.../affiliate_plans_brackets_config.php) (revision 14258) +++ branches/5.2.x/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php (.../affiliate_plans_brackets_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'apbrackets', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'AffiliatePlansBracketsEventHandler','file'=>'affiliate_plans_brackets_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'AffiliatePlansBracketsTagProcessor','file'=>'affiliate_plans_brackets_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'apbrackets', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatePlansBracketsEventHandler', 'file' => 'affiliate_plans_brackets_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AffiliatePlansBracketsTagProcessor', 'file' => 'affiliate_plans_brackets_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnPreSave'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnArrange', - ), - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnPreSave'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnArrange', + ), + ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'AffiliateBracketId', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), + 'IDField' => 'AffiliateBracketId', - 'TableName' => TABLE_PREFIX.'AffiliatePlansBrackets', + 'TableName' => TABLE_PREFIX.'AffiliatePlansBrackets', - 'ListSQLs' => Array( ''=>'SELECT * FROM %s'), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s'), + 'ForeignKey' => 'AffiliatePlanId', + 'ParentTableKey' => 'AffiliatePlanId', + 'ParentPrefix' => 'ap', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ForeignKey' => 'AffiliatePlanId', - 'ParentTableKey' => 'AffiliatePlanId', - 'ParentPrefix' => 'ap', - 'AutoDelete' => true, - 'AutoClone' => true, - - 'Fields' => Array( - 'AffiliateBracketId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'AffiliatePlanId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'FromAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0'), - 'ToAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0'), - 'Percent' => Array('type' => 'double','not_null' => '1','default' => '0.00'), - ), - - ); \ No newline at end of file + 'Fields' => Array ( + 'AffiliateBracketId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'AffiliatePlanId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FromAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'default' => '0'), + 'ToAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'default' => '0'), + 'Percent' => Array ('type' => 'double', 'not_null' => '1', 'default' => '0.00'), + ), +); \ No newline at end of file Index: branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php =================================================================== diff -u -N -r15560 -r16385 --- branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 15560) +++ branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'apayments', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'AffiliatePaymentsEventHandler','file'=>'affiliate_payments_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'AffiliatePaymentsTagProcessor','file'=>'affiliate_payments_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'apayments', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatePaymentsEventHandler', 'file' => 'affiliate_payments_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AffiliatePaymentsTagProcessor', 'file' => 'affiliate_payments_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'AggregateTags' => Array( - Array( - 'AggregateTo' => 'ord', - 'AggregatedTagName' => 'InitPaymentsList', - 'LocalTagName' => 'InitList', - ), - Array( - 'AggregateTo' => 'ord', - 'AggregatedTagName' => 'ListPayments', - 'LocalTagName' => 'ListPayments', - ), - Array( - 'AggregateTo' => 'ord', - 'AggregatedTagName' => 'PaymentsPaginationBar', - 'LocalTagName' => 'PaginationBar', - ), - Array( - 'AggregateTo' => 'ord', - 'AggregatedTagName' => 'PaymentsCount', - 'LocalTagName' => 'TotalRecords', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => 'ord', + 'AggregatedTagName' => 'InitPaymentsList', + 'LocalTagName' => 'InitList', + ), + Array ( + 'AggregateTo' => 'ord', + 'AggregatedTagName' => 'ListPayments', + 'LocalTagName' => 'ListPayments', + ), + Array ( + 'AggregateTo' => 'ord', + 'AggregatedTagName' => 'PaymentsPaginationBar', + 'LocalTagName' => 'PaginationBar', + ), + Array ( + 'AggregateTo' => 'ord', + 'AggregatedTagName' => 'PaymentsCount', + 'LocalTagName' => 'TotalRecords', + ), + ), - 'IDField' => 'AffiliatePaymentId', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TitlePresets' => Array ( - 'payments_log' => Array ( - 'prefixes' => Array ('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!", - ), - ), + 'IDField' => 'AffiliatePaymentId', - 'Sections' => Array( - 'in-commerce:paymentlog' => Array( - 'parent' => 'in-commerce', - 'icon' => 'transactions', - 'label' => 'la_tab_PaymentLog', - 'url' => Array('t' => 'in-commerce/payments/payments_list', 'pass' => 'm'), - 'permissions' => Array('view'), - 'priority' => 6, - 'type' => stTREE, - ), - ), + 'TitlePresets' => Array ( + 'payments_log' => Array ( + 'prefixes' => Array ('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!", + ), + ), - 'TableName' => TABLE_PREFIX.'AffiliatePayments', + 'Sections' => Array ( + 'in-commerce:paymentlog' => Array ( + 'parent' => 'in-commerce', + 'icon' => 'transactions', + 'label' => 'la_tab_PaymentLog', + 'url' => Array ('t' => 'in-commerce/payments/payments_list', 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 6, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array(''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId - LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId'), + 'TableName' => TABLE_PREFIX.'AffiliatePayments', - 'ItemSQLs' => Array(''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId - LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId'), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId + LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId' + ), - 'CalculatedFields' => Array( - '' => Array( - 'PortalUserId' => 'af.PortalUserId', - ), - 'log' => Array( - 'Username' => 'IF(au.Username = "", au.Email, au.Username)', - 'PortalUserId' => 'af.PortalUserId', - ), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'PortalUserId' => 'af.PortalUserId', + ), + 'log' => Array ( + 'Username' => 'IF(au.Username = "", au.Email, au.Username)', + 'PortalUserId' => 'af.PortalUserId', + ), + ), - 'ForeignKey' => 'AffiliateId', - 'ParentTableKey' => 'AffiliateId', - 'ParentPrefix' => 'affil', - 'AutoDelete' => true, - 'AutoClone' => true, + 'ForeignKey' => 'AffiliateId', + 'ParentTableKey' => 'AffiliateId', + 'ParentPrefix' => 'affil', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('PaymentDate' => 'desc'), - ) - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('PaymentDate' => 'desc'), + ) + ), - 'Fields' => Array( - 'AffiliatePaymentId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'AffiliateId' => Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(0 => 'lu_None'), 'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users u ON u.PortalUserId = af.PortalUserId WHERE %s','left_key_field'=>'af.AffiliateId','left_title_field'=>'IF(u.Email = "", u.Username, u.Email)','not_null'=>1,'default'=>0), - 'PaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'default' => '#NOW#'), - 'Amount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1', 'required'=>1, 'default' => '0.00'), - 'Comment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'PaymentReference' => Array('type' => 'string','not_null' => '1','default' => ''), - 'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0), - ), + 'Fields' => Array ( + 'AffiliatePaymentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users u ON u.PortalUserId = af.PortalUserId WHERE %s', 'left_key_field' => 'af.AffiliateId', 'left_title_field' => 'IF(u.Email = "", u.Username, u.Email)', 'not_null'=>1,'default'=>0), + 'PaymentDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'Amount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'required'=>1, 'default' => '0.00'), + 'Comment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'PaymentReference' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'PaymentTypeId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field' => 'PaymentTypeId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0), + ), - 'VirtualFields' => Array( - 'Username' => Array('type' => 'string', 'default' => ''), - 'PortalUserId' => Array('type' => 'int', 'default' => 0), - ), + 'VirtualFields' => Array ( + 'Username' => Array ('type' => 'string', 'default' => ''), + 'PortalUserId' => Array ('type' => 'int', 'default' => 0), + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'AffiliatePaymentId'=> Array( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'PaymentDate' => Array( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'Amount' => Array( 'filter_block' => 'grid_range_filter'), - 'Comment' => Array( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), - 'PaymentTypeId' => Array( 'title' => 'column:la_fld_PaymentType', 'filter_block' => 'grid_options_filter'), - 'PaymentReference' => Array( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), - ), - ), - 'Log' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'AffiliatePaymentId'=> Array( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Username' => Array( 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'), - 'PaymentDate' => Array( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'Amount' => Array( 'data_block' => 'grid_currency_td', 'filter_block' => 'grid_range_filter'), - 'Comment' => Array( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), - 'PaymentTypeId' => Array( 'title' => 'column:la_fld_PaymentType', 'filter_block' => 'grid_options_filter'), - 'PaymentReference' => Array( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), - ), - ), - - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'AffiliatePaymentId'=> Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'PaymentDate' => Array ( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'Amount' => Array ( 'filter_block' => 'grid_range_filter'), + 'Comment' => Array ( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_PaymentType', 'filter_block' => 'grid_options_filter'), + 'PaymentReference' => Array ( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), + ), + ), + 'Log' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'AffiliatePaymentId'=> Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Username' => Array ( 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'), + 'PaymentDate' => Array ( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'Amount' => Array ( 'data_block' => 'grid_currency_td', 'filter_block' => 'grid_range_filter'), + 'Comment' => Array ( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_PaymentType', 'filter_block' => 'grid_options_filter'), + 'PaymentReference' => Array ( 'filter_block' => 'grid_like_filter', 'first_chars' => 50), + ), + ), + ), +); Index: branches/5.2.x/units/discount_items/discount_items_config.php =================================================================== diff -u -N -r15009 -r16385 --- branches/5.2.x/units/discount_items/discount_items_config.php (.../discount_items_config.php) (revision 15009) +++ branches/5.2.x/units/discount_items/discount_items_config.php (.../discount_items_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'di', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'DiscountItemsEventHandler','file'=>'discount_items_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'DiscountItemsTagProcessor','file'=>'discount_items_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'p', - 'HookToSpecial' => '-item', - 'HookToEvent' => Array('OnAfterItemDelete'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnDeleteDiscountedItem', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'DiscountItemId', - 'StatusField' => Array('Status'), - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'ProductsDiscountItems', +$config = Array ( + 'Prefix' => 'di', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'DiscountItemsEventHandler', 'file' => 'discount_items_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'DiscountItemsTagProcessor', 'file' => 'discount_items_tag_processor.php', 'build_event' => 'OnBuild'), - 'CalculatedFields' => Array( - '' => Array( - 'ProductId' => 'p.ProductId', - 'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)', - 'SKU' => 'p.SKU', - 'Weight' => 'p.Weight', - 'CreatedOn' => 'p.CreatedOn', - 'BackOrderDate' => 'p.BackOrderDate', - 'Status' => 'p.Status', - 'CategoryId' => 'c.CategoryId', + 'AutoLoad' => true, - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'p', + 'HookToSpecial' => '-item', + 'HookToEvent' => Array ('OnAfterItemDelete'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnDeleteDiscountedItem', + ), + ), - ), - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Categories c ON %1$s.ItemResourceId = c.ResourceId', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - /*'BelongsTo' => Array( - Array('prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'), - ),*/ - 'ForeignKey' => 'DiscountId', - 'ParentTableKey' => 'DiscountId', - 'ParentPrefix' => 'd', - 'AutoDelete' => true, - 'AutoClone' => true, + 'IDField' => 'DiscountItemId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'ProductsDiscountItems', - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('ItemName' => 'asc'), - ) - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'ProductId' => 'p.ProductId', + 'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)', + 'SKU' => 'p.SKU', + 'Weight' => 'p.Weight', + 'CreatedOn' => 'p.CreatedOn', + 'BackOrderDate' => 'p.BackOrderDate', + 'Status' => 'p.Status', + 'CategoryId' => 'c.CategoryId', + ), + ), - 'Fields' => Array ( - 'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'DiscountId' => Array('type' => 'int', 'default' => null, ), - 'ItemResourceId' => Array('type' => 'int', 'default' => null, ), - 'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId + LEFT JOIN '.TABLE_PREFIX.'Categories c ON %1$s.ItemResourceId = c.ResourceId', + ), - 'VirtualFields' => Array( - 'ProductId' => Array('type' => 'int', 'default' => 0), - 'ItemName' => Array('type' => 'string', 'default' => ''), - 'SKU' => Array('type' => 'string', 'default' => ''), - 'Weight' => Array('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL), - 'CreatedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'BackOrderDate' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, - 'default' => 2, - ), - 'CategoryId' => Array ('type' => 'int', 'default' => 0), - ), + /*'BelongsTo' => Array ( + Array ('prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'), + ),*/ - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array('default'=>'icon16_entire_order.gif'), - 'Fields' => Array( - 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'), - ), + 'ForeignKey' => 'DiscountId', + 'ParentTableKey' => 'DiscountId', + 'ParentPrefix' => 'd', + 'AutoDelete' => true, + 'AutoClone' => true, - ), - 'DiscountItems' => Array( - 'Icons' => Array( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - ), - 'Fields' => Array( - 'ProductId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter'), - 'ItemName' => Array( 'filter_block' => 'grid_like_filter'), - 'ItemType' => Array( 'title'=>'la_col_ItemType', 'filter_block' => 'grid_options_filter'), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('ItemName' => 'asc'), + ) + ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'DiscountItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'DiscountId' => Array ('type' => 'int', 'default' => null, ), + 'ItemResourceId' => Array ('type' => 'int', 'default' => null, ), + 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ), + ), + + 'VirtualFields' => Array ( + 'ProductId' => Array ('type' => 'int', 'default' => 0), + 'ItemName' => Array ('type' => 'string', 'default' => ''), + 'SKU' => Array ('type' => 'string', 'default' => ''), + 'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, + 'default' => 2, + ), + 'CategoryId' => Array ('type' => 'int', 'default' => 0), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_entire_order.gif'), + 'Fields' => Array ( + 'ItemType' => Array ( 'title' => 'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'), + ), + ), + 'DiscountItems' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', + ), + 'Fields' => Array ( + 'ProductId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter'), + 'ItemName' => Array ( 'filter_block' => 'grid_like_filter'), + 'ItemType' => Array ( 'title' => 'la_col_ItemType', 'filter_block' => 'grid_options_filter'), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/orders/orders_config.php =================================================================== diff -u -N -r16365 -r16385 --- branches/5.2.x/units/orders/orders_config.php (.../orders_config.php) (revision 16365) +++ branches/5.2.x/units/orders/orders_config.php (.../orders_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'ord', - 'ItemClass' => Array ('class' => 'OrdersItem', 'file' => 'orders_item.php', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'OrdersEventHandler', 'file' => 'orders_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'OrdersTagProcessor', 'file' => 'orders_tag_processor.php', 'build_event' => 'OnBuild'), - 'ValidatorClass' => 'OrderValidator', +$config = Array ( + 'Prefix' => 'ord', + 'ItemClass' => Array ('class' => 'OrdersItem', 'file' => 'orders_item.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'OrdersEventHandler', 'file' => 'orders_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'OrdersTagProcessor', 'file' => 'orders_tag_processor.php', 'build_event' => 'OnBuild'), + 'ValidatorClass' => 'OrderValidator', - 'AutoLoad' => true, + 'AutoLoad' => true, - 'RegisterClasses' => Array ( - Array ('pseudo' => 'OrderCalculator', 'class' => 'OrderCalculator', 'file' => 'order_calculator.php', 'build_event' => ''), - Array ('pseudo' => 'OrderManager', 'class' => 'OrderManager', 'file' => 'order_manager.php', 'build_event' => ''), - Array ('pseudo' => 'OrderValidator', 'class' => 'OrderValidator', 'file' => 'order_validator.php', 'build_event' => ''), - ), + 'RegisterClasses' => Array ( + Array ('pseudo' => 'OrderCalculator', 'class' => 'OrderCalculator', 'file' => 'order_calculator.php', 'build_event' => ''), + Array ('pseudo' => 'OrderManager', 'class' => 'OrderManager', 'file' => 'order_manager.php', 'build_event' => ''), + Array ('pseudo' => 'OrderValidator', 'class' => 'OrderValidator', 'file' => 'order_validator.php', 'build_event' => ''), + ), - 'Hooks' => Array ( - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'ord', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnPreSave' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnRecalculateItems', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'ord', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnPreSave' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnRecalculateItems', + ), - Array( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnUpdateCart', 'OnUpdateCartJSON', 'OnCheckout' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnApplyCoupon', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnUpdateCart', 'OnUpdateCartJSON', 'OnCheckout' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnApplyCoupon', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnUpdateCart', 'OnUpdateCartJSON', 'OnCheckout' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnApplyGiftCertificate', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnUpdateCart', 'OnUpdateCartJSON', 'OnCheckout' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnApplyGiftCertificate', + ), - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ( 'OnCreate' ), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnUserCreate', - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ( 'OnCreate' ), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnUserCreate', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => '', - 'HookToEvent' => Array ('OnCheckExpiredMembership'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnCheckRecurringOrders', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnCheckExpiredMembership'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnCheckRecurringOrders', + ), - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnAfterLogin' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUserLogin', - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnAfterLogin' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnUserLogin', + ), - Array ( - 'Mode' => hBEFORE, // before because OnInpLogin is called after real in-portal login and uses data from hooks - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnInpLogin' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUserLogin', - ), - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'adm', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnStartup'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnRestoreOrder', - ), - array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'conf', - 'HookToSpecial' => '', - 'HookToEvent' => array('OnBeforeItemValidate'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnBeforeNextOrderNumberChange', - ), - ), - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => 'orditems', - 'AggregatedTagName' => 'LinkRemoveFromCart', - 'LocalTagName' => 'Orditems_LinkRemoveFromCart', - ), - Array ( - 'AggregateTo' => 'orditems', - 'AggregatedTagName' => 'ProductLink', - 'LocalTagName' => 'Orderitems_ProductLink', - ), - Array ( - 'AggregateTo' => 'orditems', - 'AggregatedTagName' => 'ProductExists', - 'LocalTagName' => 'Orderitems_ProductExists', - ), - ), + Array ( + 'Mode' => hBEFORE, // before because OnInpLogin is called after real in-portal login and uses data from hooks + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnInpLogin' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnUserLogin', + ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'adm', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnStartup'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnRestoreOrder', + ), + array( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'conf', + 'HookToSpecial' => '', + 'HookToEvent' => array('OnBeforeItemValidate'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnBeforeNextOrderNumberChange', + ), + ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'OrderId', - 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => 'orditems', + 'AggregatedTagName' => 'LinkRemoveFromCart', + 'LocalTagName' => 'Orditems_LinkRemoveFromCart', + ), + Array ( + 'AggregateTo' => 'orditems', + 'AggregatedTagName' => 'ProductLink', + 'LocalTagName' => 'Orderitems_ProductLink', + ), + Array ( + 'AggregateTo' => 'orditems', + 'AggregatedTagName' => 'ProductExists', + 'LocalTagName' => 'Orderitems_ProductExists', + ), + ), - 'ViewMenuPhrase' => 'la_title_Orders', - 'CatalogTabIcon' => 'icon16_item.png', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'TitleField' => 'OrderNumber', - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('ord' => '!la_title_Adding_Order!'), - 'edit_status_labels' => Array ('ord' => '!la_title_Editing_Order!'), - 'new_titlefield' => Array ('ord' => '!la_title_New_Order!'), - ), + 'IDField' => 'OrderId', + 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events - 'orders_incomplete' => Array ( 'prefixes' => Array ('ord.incomplete_List'), - 'format' => "!la_title_IncompleteOrders!", - ), + 'ViewMenuPhrase' => 'la_title_Orders', + 'CatalogTabIcon' => 'icon16_item.png', - 'orders_pending' => Array ( 'prefixes' => Array ('ord.pending_List'), - 'format' => "!la_title_PendingOrders!", - ), + 'TitleField' => 'OrderNumber', - 'orders_backorders' => Array ( 'prefixes' => Array ('ord.backorders_List'), - 'format' => "!la_title_BackOrders!", - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('ord' => '!la_title_Adding_Order!'), + 'edit_status_labels' => Array ('ord' => '!la_title_Editing_Order!'), + 'new_titlefield' => Array ('ord' => '!la_title_New_Order!'), + ), - 'orders_toship' => Array ( 'prefixes' => Array ('ord.toship_List'), - 'format' => "!la_title_OrdersToShip!", - ), + 'orders_incomplete' => Array ( + 'prefixes' => Array ('ord.incomplete_List'), 'format' => "!la_title_IncompleteOrders!", + ), - 'orders_processed' => Array ( 'prefixes' => Array ('ord.processed_List'), - 'format' => "!la_title_OrdersProcessed!", - ), + 'orders_pending' => Array ( + 'prefixes' => Array ('ord.pending_List'), 'format' => "!la_title_PendingOrders!", + ), - 'orders_returns' => Array ( 'prefixes' => Array ('ord.returns_List'), - 'format' => "!la_title_OrdersReturns!", - ), + 'orders_backorders' => Array ( + 'prefixes' => Array ('ord.backorders_List'), 'format' => "!la_title_BackOrders!", + ), - 'orders_denied' => Array ( 'prefixes' => Array ('ord.denied_List'), - 'format' => "!la_title_OrdersDenied!", - ), - 'orders_archived' => Array ( 'prefixes' => Array ('ord.archived_List'), - 'format' => "!la_title_OrdersArchived!", - ), + 'orders_toship' => Array ( + 'prefixes' => Array ('ord.toship_List'), 'format' => "!la_title_OrdersToShip!", + ), - 'orders_search' => Array ( 'prefixes' => Array ('ord.search_List'), - 'format' => "!la_title_OrdersSearch!", - ), + 'orders_processed' => Array ( + 'prefixes' => Array ('ord.processed_List'), 'format' => "!la_title_OrdersProcessed!", + ), - 'orders_edit_general' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"), - 'orders_edit_billing' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"), - 'orders_edit_shipping' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"), - 'orders_edit_items' => Array ('prefixes' => Array ('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"), - 'orders_edit_preview' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"), + 'orders_returns' => Array ( + 'prefixes' => Array ('ord.returns_List'), 'format' => "!la_title_OrdersReturns!", + ), - 'orders_gw_result' => Array ('prefixes' => Array ('ord'), 'format' => "!la_title_OrderGWResult!"), + 'orders_denied' => Array ( + 'prefixes' => Array ('ord.denied_List'), 'format' => "!la_title_OrdersDenied!", + ), - 'orders_export' => Array ('format' => '!la_title_OrdersExport!'), + 'orders_archived' => Array ( + 'prefixes' => Array ('ord.archived_List'), 'format' => "!la_title_OrdersArchived!", + ), - 'orders_product_edit' => Array ('format' => '!la_title_Editing_Order_Item!'), - ), + 'orders_search' => Array ( + 'prefixes' => Array ('ord.search_List'), 'format' => "!la_title_OrdersSearch!", + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/orders/orders_edit', 'priority' => 1), - 'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/orders/orders_edit_items', 'priority' => 2), - 'shipping' => Array ('title' => 'la_tab_Shipping', 't' => 'in-commerce/orders/orders_edit_shipping', 'priority' => 3), - 'billing' => Array ('title' => 'la_tab_Billing', 't' => 'in-commerce/orders/orders_edit_billing', 'priority' => 4), - 'preview' => Array ('title' => 'la_tab_Preview', 't' => 'in-commerce/orders/orders_edit_preview', 'priority' => 5), - ), - ), + 'orders_edit_general' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"), + 'orders_edit_billing' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"), + 'orders_edit_shipping' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"), + 'orders_edit_items' => Array ('prefixes' => Array ('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"), + 'orders_edit_preview' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"), - 'PermSection' => Array ('main' => 'in-commerce:orders'), + 'orders_gw_result' => Array ('prefixes' => Array ('ord'), 'format' => "!la_title_OrderGWResult!"), + 'orders_export' => Array ('format' => '!la_title_OrdersExport!'), - 'Sections' => Array ( - 'in-commerce:orders' => Array ( - 'parent' => 'in-commerce', - 'icon' => 'in-commerce:orders', - 'label' => 'la_tab_Orders', - 'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:deny', 'advanced:archive', 'advanced:place', 'advanced:process', 'advanced:ship', 'advanced:reset_to_pending'), - 'priority' => 1, - 'type' => stTREE, - ), - ), + 'orders_product_edit' => Array ('format' => '!la_title_Editing_Order_Item!'), + ), - 'SectionAdjustments' => Array ( - 'in-portal:visits' => Array ( - 'url' => Array ('t' => 'in-commerce/visits/visits_list_incommerce', 'pass' => 'm'), - ), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/orders/orders_edit', 'priority' => 1), + 'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/orders/orders_edit_items', 'priority' => 2), + 'shipping' => Array ('title' => 'la_tab_Shipping', 't' => 'in-commerce/orders/orders_edit_shipping', 'priority' => 3), + 'billing' => Array ('title' => 'la_tab_Billing', 't' => 'in-commerce/orders/orders_edit_billing', 'priority' => 4), + 'preview' => Array ('title' => 'la_tab_Preview', 't' => 'in-commerce/orders/orders_edit_preview', 'priority' => 5), + ), + ), - 'StatisticsInfo' => Array ( - 'pending' => Array ( - 'icon' => 'core:icon16_item.png', - 'label' => 'la_title_Orders', - 'js_url' => "#url#", - 'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'), - 'status' => ORDER_STATUS_PENDING, + 'PermSection' => Array ('main' => 'in-commerce:orders'), - ), - ), + 'Sections' => Array ( + 'in-commerce:orders' => Array ( + 'parent' => 'in-commerce', + 'icon' => 'in-commerce:orders', + 'label' => 'la_tab_Orders', + 'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:deny', 'advanced:archive', 'advanced:place', 'advanced:process', 'advanced:ship', 'advanced:reset_to_pending'), + 'priority' => 1, + 'type' => stTREE, + ), + ), - 'TableName' => TABLE_PREFIX . 'Orders', + 'SectionAdjustments' => Array ( + 'in-portal:visits' => Array ( + 'url' => Array ('t' => 'in-commerce/visits/visits_list_incommerce', 'pass' => 'm'), + ), + ), - 'CalculatedFields' => Array ( - '' => Array ( - 'CustomerName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', "root", IF (%1$s.PortalUserId = ' . USER_GUEST . ', "Guest", "n/a")), CONCAT(u.FirstName," ",u.LastName) )', - 'Username' => 'IF( ISNULL(u.Username),"root",IF(u.Username = "", u.Email, u.Username))', - 'OrderNumber' => 'CONCAT(LPAD(%1$s.Number,6,"0"),\'-\',LPAD(%1$s.SubNumber,3,"0") )', - 'SubtotalWithoutDiscount' => '(%1$s.SubTotal + %1$s.DiscountTotal)', - 'SubtotalWithDiscount' => '(%1$s.SubTotal)', - 'AmountWithoutVAT' => '(%1$s.SubTotal+IF(%1$s.ShippingTaxable=1, %1$s.ShippingCost, 0)+IF(%1$s.ProcessingTaxable=1, %1$s.ProcessingFee, 0)-IF(%1$s.VATIncluded=1,%1$s.VAT,0))', - 'TotalAmount' => '%1$s.SubTotal+%1$s.ShippingCost+IF(%1$s.VATIncluded=1,0,%1$s.VAT)+%1$s.ProcessingFee+%1$s.InsuranceFee-%1$s.GiftCertificateDiscount', - 'CouponCode' => 'pc.Code', - 'CouponName' => 'pc.Name', - 'AffiliateUser' => 'IF(au.PortalUserId IS NULL, "!la_None!", IF(au.Username = "", au.Email, au.Username))', - 'AffiliatePortalUserId' => 'af.PortalUserId', - 'GiftCertificateCode' => 'gc.Code', - 'GiftCertificateRecipient' => 'gc.Recipient', - 'ShippingSubTotal' => '%1$s.ShippingCost + %1$s.InsuranceFee', - ), + 'StatisticsInfo' => Array ( + 'pending' => Array ( + 'icon' => 'core:icon16_item.png', + 'label' => 'la_title_Orders', + 'js_url' => "#url#", + 'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'), + 'status' => ORDER_STATUS_PENDING, + ), + ), - 'myorders' => Array ( - 'OrderNumber' => 'CONCAT(LPAD(%1$s.Number,6,"0"),\'-\',LPAD(%1$s.SubNumber,3,"0") )', - 'SubtotalWithoutDiscount' => '(%1$s.SubTotal + %1$s.DiscountTotal)', - 'SubtotalWithDiscount' => '(%1$s.SubTotal)', - 'AmountWithoutVAT' => '(%1$s.SubTotal+IF(%1$s.ShippingTaxable=1, %1$s.ShippingCost, 0)+IF(%1$s.ProcessingTaxable=1, %1$s.ProcessingFee, 0)-IF(%1$s.VATIncluded=1,%1$s.VAT,0))', - 'TotalAmount' => '%1$s.SubTotal+%1$s.ShippingCost+IF(%1$s.VATIncluded=1,0,%1$s.VAT)+%1$s.ProcessingFee+%1$s.InsuranceFee-%1$s.GiftCertificateDiscount', - /*'ItemsCount' => 'COUNT(%1$s.OrderId)',*/ - 'ShippingSubTotal' => '%1$s.ShippingCost + %1$s.InsuranceFee', - ), - ), - // %1$s - table name of object - // %2$s - calculated fields - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId - LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId - LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId - LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId', + 'TableName' => TABLE_PREFIX . 'Orders', - 'myorders' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId', -// LEFT JOIN '.TABLE_PREFIX.'OrderItems ON %1$s.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId', - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'CustomerName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', "root", IF (%1$s.PortalUserId = ' . USER_GUEST . ', "Guest", "n/a")), CONCAT(u.FirstName," ",u.LastName) )', + 'Username' => 'IF( ISNULL(u.Username),"root",IF(u.Username = "", u.Email, u.Username))', + 'OrderNumber' => 'CONCAT(LPAD(%1$s.Number,6,"0"),\'-\',LPAD(%1$s.SubNumber,3,"0") )', + 'SubtotalWithoutDiscount' => '(%1$s.SubTotal + %1$s.DiscountTotal)', + 'SubtotalWithDiscount' => '(%1$s.SubTotal)', + 'AmountWithoutVAT' => '(%1$s.SubTotal+IF(%1$s.ShippingTaxable=1, %1$s.ShippingCost, 0)+IF(%1$s.ProcessingTaxable=1, %1$s.ProcessingFee, 0)-IF(%1$s.VATIncluded=1,%1$s.VAT,0))', + 'TotalAmount' => '%1$s.SubTotal+%1$s.ShippingCost+IF(%1$s.VATIncluded=1,0,%1$s.VAT)+%1$s.ProcessingFee+%1$s.InsuranceFee-%1$s.GiftCertificateDiscount', + 'CouponCode' => 'pc.Code', + 'CouponName' => 'pc.Name', + 'AffiliateUser' => 'IF(au.PortalUserId IS NULL, "!la_None!", IF(au.Username = "", au.Email, au.Username))', + 'AffiliatePortalUserId' => 'af.PortalUserId', + 'GiftCertificateCode' => 'gc.Code', + 'GiftCertificateRecipient' => 'gc.Recipient', + 'ShippingSubTotal' => '%1$s.ShippingCost + %1$s.InsuranceFee', + ), - 'ItemSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId - LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId - LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId - LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId', - ), + 'myorders' => Array ( + 'OrderNumber' => 'CONCAT(LPAD(%1$s.Number,6,"0"),\'-\',LPAD(%1$s.SubNumber,3,"0") )', + 'SubtotalWithoutDiscount' => '(%1$s.SubTotal + %1$s.DiscountTotal)', + 'SubtotalWithDiscount' => '(%1$s.SubTotal)', + 'AmountWithoutVAT' => '(%1$s.SubTotal+IF(%1$s.ShippingTaxable=1, %1$s.ShippingCost, 0)+IF(%1$s.ProcessingTaxable=1, %1$s.ProcessingFee, 0)-IF(%1$s.VATIncluded=1,%1$s.VAT,0))', + 'TotalAmount' => '%1$s.SubTotal+%1$s.ShippingCost+IF(%1$s.VATIncluded=1,0,%1$s.VAT)+%1$s.ProcessingFee+%1$s.InsuranceFee-%1$s.GiftCertificateDiscount', + /*'ItemsCount' => 'COUNT(%1$s.OrderId)',*/ + 'ShippingSubTotal' => '%1$s.ShippingCost + %1$s.InsuranceFee', + ), + ), + // %1$s - table name of object + // %2$s - calculated fields + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId + LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId + LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId + LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId + LEFT JOIN '.TABLE_PREFIX.'Users au ON af.PortalUserId = au.PortalUserId', - 'SubItems' => Array ('orditems'), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('OrderDate' => 'desc'), - ) - ), - 'Fields' => Array ( - 'OrderId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'), - 'Number' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('SubNumber'), 'format' => '%06d', 'max_value_inc'>999999, 'not_null' => 1, 'default' => 0), - 'SubNumber' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('Number'), 'format' => '%03d', 'max_value_inc'>999, 'not_null' => 1, 'default' => 0), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0=> 'la_Incomplete',1=> 'la_Pending',2=> 'la_BackOrders',3=> 'la_ToShip',4=> 'la_Processed',5=> 'la_Denied',6=> 'la_Archived'), 'use_phrases' =>1, 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'), - 'OnHold' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'OrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'PortalUserId' =>Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' =>Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'required' =>1, 'not_null' =>1, 'default' =>-1), - 'OrderIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'filter_type' => 'like'), - 'UserComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'AdminComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'BillingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingEmail' => Array ( - 'type' => 'string', - 'formatter' => 'kFormatter', - 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', - 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'), - 'not_null' => 1, 'default' => '', - ), - 'BillingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingState' => Array ( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (), - 'option_key_field' => 'DestAbbr', - 'option_title_field' => 'Translation', - 'not_null' => 1, 'default' => '', - ), - 'BillingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'BillingCountry' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode - FROM '.TABLE_PREFIX.'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', - 'not_null' => 1, 'default' => 'USA' - ), - 'VAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' =>1, 'default' => '0', 'format' => '%01.2f'), - 'VATPercent' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' =>1, 'default' => '0', 'format' => '%01.3f'), - 'VATIncluded' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'PaymentType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => 'SELECT IF(l%2$s_Description <> "", l%2$s_Description, l%3$s_Description) AS Description, PaymentTypeId - FROM ' . TABLE_PREFIX . 'PaymentTypes - WHERE Status = 1 - ORDER BY Priority DESC, Name ASC', - 'option_key_field' => 'PaymentTypeId', 'option_title_field' => 'Description', - 'not_null' => 1, 'default' => 0 - ), + 'myorders' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId', +// LEFT JOIN '.TABLE_PREFIX.'OrderItems ON %1$s.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId', + ), - 'PaymentAccount' => Array ('type' => 'string', 'not_null' => 1, 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'), - 'PaymentNameOnCard' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'PaymentCCExpDate' => Array ('type' => 'string', 'formatter' => 'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field' => 'PaymentCCExpYear', 'not_null' => 1, 'default' => ''), - 'PaymentCardType' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => '', '1' => 'Visa', '2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''), - 'PaymentExpires' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'ShippingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingEmail' => Array ( - 'type' => 'string', - 'formatter' => 'kFormatter', - 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', - 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'), - 'not_null' => 1, 'default' => '', - ), - 'ShippingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingState' => Array ( - 'type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options' => Array (), - 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', - 'not_null' => 1, 'default' => ''), - 'ShippingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingCountry' => Array( - 'type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode - FROM '.TABLE_PREFIX.'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', - 'not_null' => 1, 'default' => 'USA' - ), - 'ShippingType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => 'SELECT %s - FROM ' . TABLE_PREFIX . 'ShippingType - WHERE Status = 1', - 'option_key_field' => 'ShippingID', - 'option_title_field' => 'Name', - 'not_null' => 1, 'default' => 0, - ), - 'ShippingCost' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'ShippingCustomerAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingTracking' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ShippingDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'SubTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'CostTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'OriginalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'ShippingOption' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( - 0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail', - ), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 0, - ), - 'ShippingGroupOption' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array (0 => 'la_opt_AutoGroupShipments', 1 => 'la_opt_ManualGroupShipments'), - 'not_null' => 1, 'default' => 0, - ), - 'GiftCertificateId' => Array ('type' => 'int', 'default' => null), - 'GiftCertificateDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',), - 'ShippingInfo' => Array ('type' => 'string', 'default' => NULL), - 'CouponId' => Array ('type' => 'int', 'default' => null), - 'CouponDiscount' => Array ('type' => 'float', 'not_null' => 1, 'default' => '0.00', 'formatter' => 'kFormatter', 'format' => '%01.2f'), - 'DiscountTotal' => Array ('type' => 'float', 'not_null' => 1, 'default' => '0.00', 'formatter' => 'kFormatter', 'format' => '%01.2f'), - 'TransactionStatus' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_opt_Invalid', 1 => 'la_opt_Verified', 2 => 'la_opt_Pending'), - 'use_phrases' =>1, 'not_null' => 1, 'default' => 2, - ), - 'GWResult1' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL), - 'GWResult2' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL), - 'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users u ON u.PortalUserId = af.PortalUserId WHERE %s', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'IF(u.Email = "", u.Username, u.Email)', 'not_null' =>1, 'default' =>0), - 'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'AffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.0000'), - 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '0', 'default' => '0.0000'), - 'InsuranceFee' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'ShippingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0), - 'ProcessingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0), - 'IsRecurringBilling' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'ChargeOnNextApprove' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'NextCharge' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string - ), + 'SubItems' => Array ('orditems'), - 'VirtualFields' => Array ( - 'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'), - 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), - 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), - 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), - 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), - 'ShippingSubTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), - 'OrderNumber' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'), - 'CouponCode' => Array ('type' => 'string', 'default' => ''), - 'CouponName' => Array ('type' => 'string', 'default' => ''), - 'GiftCertificateCode' => Array ('type' => 'string', 'default' => ''), - 'GiftCertificateRecipient' => Array ('type' => 'string', 'default' => ''), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('OrderDate' => 'desc'), + ) + ), - // for ResetToUser - 'UserTo' => Array ('type' => 'string', 'default' => ''), - 'UserCompany' => Array ('type' => 'string', 'default' => ''), - 'UserPhone' => Array ('type' => 'string', 'default' => ''), - 'UserFax' => Array ('type' => 'string', 'default' => ''), - 'UserEmail' => Array ('type' => 'string', 'default' => ''), - 'UserAddress1' => Array ('type' => 'string', 'default' => ''), - 'UserAddress2' => Array ('type' => 'string', 'default' => ''), - 'UserCity' => Array ('type' => 'string', 'default' => ''), - 'UserState' => Array ('type' => 'string', 'default' => ''), - 'UserZip' => Array ('type' => 'string', 'default' => ''), - 'UserCountry' => Array ('type' => 'string', 'default' => ''), + 'Fields' => Array ( + 'OrderId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'), + 'Number' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('SubNumber'), 'format' => '%06d', 'max_value_inc'>999999, 'not_null' => 1, 'default' => 0), + 'SubNumber' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('Number'), 'format' => '%03d', 'max_value_inc'>999, 'not_null' => 1, 'default' => 0), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0=> 'la_Incomplete',1=> 'la_Pending',2=> 'la_BackOrders',3=> 'la_ToShip',4=> 'la_Processed',5=> 'la_Denied',6=> 'la_Archived'), 'use_phrases' =>1, 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'), + 'OnHold' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'OrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), + 'PortalUserId' =>Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' =>Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'required' =>1, 'not_null' =>1, 'default' =>-1), + 'OrderIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'filter_type' => 'like'), + 'UserComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'AdminComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'BillingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingEmail' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', + 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', + 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'), + 'not_null' => 1, 'default' => '', + ), + 'BillingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingState' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (), + 'option_key_field' => 'DestAbbr', + 'option_title_field' => 'Translation', + 'not_null' => 1, 'default' => '', + ), + 'BillingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'BillingCountry' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM '.TABLE_PREFIX.'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', + 'not_null' => 1, 'default' => 'USA' + ), + 'VAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' =>1, 'default' => '0', 'format' => '%01.2f'), + 'VATPercent' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' =>1, 'default' => '0', 'format' => '%01.3f'), + 'VATIncluded' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'PaymentType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => 'SELECT IF(l%2$s_Description <> "", l%2$s_Description, l%3$s_Description) AS Description, PaymentTypeId + FROM ' . TABLE_PREFIX . 'PaymentTypes + WHERE Status = 1 + ORDER BY Priority DESC, Name ASC', + 'option_key_field' => 'PaymentTypeId', 'option_title_field' => 'Description', + 'not_null' => 1, 'default' => 0 + ), - // for Search - 'Username' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''), - 'HasBackOrders' => Array ('type' => 'int', 'default' => 0), - 'PaymentCVV2' => Array ('type' => 'string', 'default' => ''), - 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''), - 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => 0), + 'PaymentAccount' => Array ('type' => 'string', 'not_null' => 1, 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'), + 'PaymentNameOnCard' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'PaymentCCExpDate' => Array ('type' => 'string', 'formatter' => 'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field' => 'PaymentCCExpYear', 'not_null' => 1, 'default' => ''), + 'PaymentCardType' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => '', '1' => 'Visa', '2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''), + 'PaymentExpires' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'ShippingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingEmail' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', + 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', + 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'), + 'not_null' => 1, 'default' => '', + ), + 'ShippingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingState' => Array ( + 'type' => 'string', 'formatter' => 'kOptionsFormatter', + 'options' => Array (), + 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', + 'not_null' => 1, 'default' => ''), + 'ShippingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingCountry' => Array ( + 'type' => 'string', 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM '.TABLE_PREFIX.'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', + 'not_null' => 1, 'default' => 'USA' + ), + 'ShippingType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => 'SELECT %s + FROM ' . TABLE_PREFIX . 'ShippingType + WHERE Status = 1', + 'option_key_field' => 'ShippingID', + 'option_title_field' => 'Name', + 'not_null' => 1, 'default' => 0, + ), + 'ShippingCost' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + 'ShippingCustomerAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingTracking' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ShippingDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'SubTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + 'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + 'CostTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + 'OriginalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + 'ShippingOption' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail', + ), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 0, + ), + 'ShippingGroupOption' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array (0 => 'la_opt_AutoGroupShipments', 1 => 'la_opt_ManualGroupShipments'), + 'not_null' => 1, 'default' => 0, + ), + 'GiftCertificateId' => Array ('type' => 'int', 'default' => null), + 'GiftCertificateDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',), + 'ShippingInfo' => Array ('type' => 'string', 'default' => NULL), + 'CouponId' => Array ('type' => 'int', 'default' => null), + 'CouponDiscount' => Array ('type' => 'float', 'not_null' => 1, 'default' => '0.00', 'formatter' => 'kFormatter', 'format' => '%01.2f'), + 'DiscountTotal' => Array ('type' => 'float', 'not_null' => 1, 'default' => '0.00', 'formatter' => 'kFormatter', 'format' => '%01.2f'), + 'TransactionStatus' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_opt_Invalid', 1 => 'la_opt_Verified', 2 => 'la_opt_Pending'), + 'use_phrases' =>1, 'not_null' => 1, 'default' => 2, + ), + 'GWResult1' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL), + 'GWResult2' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL), + 'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users u ON u.PortalUserId = af.PortalUserId WHERE %s', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'IF(u.Email = "", u.Username, u.Email)', 'not_null' =>1, 'default' =>0), + 'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'AffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.0000'), + 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '0', 'default' => '0.0000'), + 'InsuranceFee' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + 'ShippingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0), + 'ProcessingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0), + 'IsRecurringBilling' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'ChargeOnNextApprove' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'NextCharge' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string + ), - // export related fields: begin - 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1), - 'ExportFilename' => Array ('type' => 'string', 'default' => ''), - 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','), - 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'), - 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1), - 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2), - 'IncludeFieldTitles' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'default' => 1, - ), - 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), - 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), - 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), - 'ExportSavePreset' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'default' => 0, - ), - 'ExportPresetName' => Array ('type' => 'string', 'default' => ''), - // export related fields: end + 'VirtualFields' => Array ( + 'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'), + 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'ShippingSubTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'), + 'OrderNumber' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'), + 'CouponCode' => Array ('type' => 'string', 'default' => ''), + 'CouponName' => Array ('type' => 'string', 'default' => ''), + 'GiftCertificateCode' => Array ('type' => 'string', 'default' => ''), + 'GiftCertificateRecipient' => Array ('type' => 'string', 'default' => ''), - // for "one step checkout" - 'UserPassword' => Array ( - 'type' => 'string', - 'formatter' => 'kPasswordFormatter', 'hashing_method' => PasswordHashingMethod::MD5, 'verify_field' => 'VerifyUserPassword', - 'skip_empty' => 1, 'default' => 'd41d8cd98f00b204e9800998ecf8427e' - ), + // for ResetToUser + 'UserTo' => Array ('type' => 'string', 'default' => ''), + 'UserCompany' => Array ('type' => 'string', 'default' => ''), + 'UserPhone' => Array ('type' => 'string', 'default' => ''), + 'UserFax' => Array ('type' => 'string', 'default' => ''), + 'UserEmail' => Array ('type' => 'string', 'default' => ''), + 'UserAddress1' => Array ('type' => 'string', 'default' => ''), + 'UserAddress2' => Array ('type' => 'string', 'default' => ''), + 'UserCity' => Array ('type' => 'string', 'default' => ''), + 'UserState' => Array ('type' => 'string', 'default' => ''), + 'UserZip' => Array ('type' => 'string', 'default' => ''), + 'UserCountry' => Array ('type' => 'string', 'default' => ''), - // for "Shipping Info" step during Checkout - 'ShippingTypeId' => Array ('type' => 'array', 'default' => ''), - ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 1 => 'icon16_pending.png', - 5 => 'icon16_disabled.png', - 'module' => 'core', - ), + // for Search + 'Username' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''), + 'HasBackOrders' => Array ('type' => 'int', 'default' => 0), + 'PaymentCVV2' => Array ('type' => 'string', 'default' => ''), + 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''), + 'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => 0), - 'Fields' => Array ( - 'OrderId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'OrderNumber' => Array ( 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'OrderDate' => Array ( 'title' => 'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'CustomerName' => Array ( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ), - 'PaymentType' => Array ( 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter', 'width' => 140, ), - 'TotalAmount' => Array ( 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter', 'width' => 140, ), - 'AffiliateUser' => Array ( 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ), - 'OnHold' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - ), - ), + // export related fields: begin + 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1), + 'ExportFilename' => Array ('type' => 'string', 'default' => ''), + 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '), + 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'), + 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1), + 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2), + 'IncludeFieldTitles' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 1, + ), + 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), + 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), + 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), + 'ExportSavePreset' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 0, + ), + 'ExportPresetName' => Array ('type' => 'string', 'default' => ''), + // export related fields: end - 'Search' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 1 => 'icon16_pending.png', - 5 => 'icon16_disabled.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'OrderId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'OrderNumber' => Array ('data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter', 'width' => 100, ), - 'OrderDate' => Array ('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'CustomerName' => Array ('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'), - 'PaymentType' => Array ('data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'), - 'TotalAmount' => Array ('data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter'), - 'AffiliateUser' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_user_like_filter'), - 'OrderIP' => Array ('filter_block' => 'grid_like_filter'), - 'Username' => Array ('filter_block' => 'grid_user_like_filter'), - 'PaymentAccount' => Array ('title' => 'column:la_fld_CreditCardNumber', 'filter_block' => 'grid_like_filter'), - ), - ), - ), - ); + // for "one step checkout" + 'UserPassword' => Array ( + 'type' => 'string', + 'formatter' => 'kPasswordFormatter', 'hashing_method' => PasswordHashingMethod::MD5, 'verify_field' => 'VerifyUserPassword', + 'skip_empty' => 1, 'default' => 'd41d8cd98f00b204e9800998ecf8427e' + ), + + // for "Shipping Info" step during Checkout + 'ShippingTypeId' => Array ('type' => 'array', 'default' => ''), + ), + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 1 => 'icon16_pending.png', + 5 => 'icon16_disabled.png', + 'module' => 'core', + ), + + 'Fields' => Array ( + 'OrderId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'OrderNumber' => Array ( 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'OrderDate' => Array ( 'title' => 'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'CustomerName' => Array ( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ), + 'PaymentType' => Array ( 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter', 'width' => 140, ), + 'TotalAmount' => Array ( 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter', 'width' => 140, ), + 'AffiliateUser' => Array ( 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ), + 'OnHold' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + ), + ), + + 'Search' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 1 => 'icon16_pending.png', + 5 => 'icon16_disabled.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'OrderId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'OrderNumber' => Array ('data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter', 'width' => 100, ), + 'OrderDate' => Array ('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'CustomerName' => Array ('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'), + 'PaymentType' => Array ('data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'), + 'TotalAmount' => Array ('data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter'), + 'AffiliateUser' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_user_like_filter'), + 'OrderIP' => Array ('filter_block' => 'grid_like_filter'), + 'Username' => Array ('filter_block' => 'grid_user_like_filter'), + 'PaymentAccount' => Array ('title' => 'column:la_fld_CreditCardNumber', 'filter_block' => 'grid_like_filter'), + ), + ), + ), +); Index: branches/5.2.x/units/coupons/coupons_config.php =================================================================== diff -u -N -r15560 -r16385 --- branches/5.2.x/units/coupons/coupons_config.php (.../coupons_config.php) (revision 15560) +++ branches/5.2.x/units/coupons/coupons_config.php (.../coupons_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'coup', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'CouponsEventHandler','file'=>'coupons_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'CouponsTagProcessor','file'=>'coupons_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'coup', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'CouponsEventHandler', 'file' => 'coupons_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'CouponsTagProcessor', 'file' => 'coupons_tag_processor.php', 'build_event' => 'OnBuild'), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'CouponId', - 'StatusField' => Array('Status'), - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'ProductsCoupons', - 'SubItems' => Array('coupi'), + 'AutoLoad' => true, - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('coup'=>'!la_title_Adding_Coupon!'), - 'edit_status_labels' => Array('coup'=>'!la_title_Editing_Coupon!'), - 'new_titlefield' => Array('coup'=>'!la_title_New_Coupon!'), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'coupons_list'=>Array('prefixes' => Array('coup_List'), - 'format' => "!la_title_Coupons!", - ), + 'IDField' => 'CouponId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'ProductsCoupons', + 'SubItems' => Array ('coupi'), - 'coupons_edit'=>Array( 'prefixes' => Array('coup'), - 'format' => "#coup_status# '#coup_titlefield#' - !la_title_General!", - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('coup' => '!la_title_Adding_Coupon!'), + 'edit_status_labels' => Array ('coup' => '!la_title_Editing_Coupon!'), + 'new_titlefield' => Array ('coup' => '!la_title_New_Coupon!'), + ), - 'coupons_items'=>Array('prefixes' => Array('coup','coupi_List'), - 'format' => "#coup_status# '#coup_titlefield#' - !la_title_CouponItems!", - ), - 'coupons_clone'=>Array('prefixes' => Array('coup'), - 'format' => "!la_CloneCoupon!", - ), + 'coupons_list' => Array ( + 'prefixes' => Array ('coup_List'), 'format' => "!la_title_Coupons!", + ), - 'coupon_selector' => Array('format' => '!la_title_CouponSelector!'), + 'coupons_edit' => Array ( + 'prefixes' => Array ('coup'), + 'format' => "#coup_status# '#coup_titlefield#' - !la_title_General!", + ), - ), + 'coupons_items' => Array ( + 'prefixes' => Array ('coup', 'coupi_List'), + 'format' => "#coup_status# '#coup_titlefield#' - !la_title_CouponItems!", + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/coupon_edit', 'priority' => 1), - 'items' => Array ('title' => 'la_tab_CouponsItems', 't' => 'in-commerce/discounts/coupon_items', 'priority' => 2), - ), - ), + 'coupons_clone' => Array ( + 'prefixes' => Array ('coup'), 'format' => "!la_CloneCoupon!", + ), - 'PermSection' => Array('main' => 'in-commerce:coupons'), + 'coupon_selector' => Array ('format' => '!la_title_CouponSelector!'), + ), - 'Sections' => Array( - 'in-commerce:coupons' => Array( - 'parent' => 'in-commerce:discounts_folder', - 'icon' => 'discounts_coupons', - 'label' => 'la_tab_Coupons', - 'url' => Array('t' => 'in-commerce/discounts/coupons_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), - 'priority' => 3.2, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/coupon_edit', 'priority' => 1), + 'items' => Array ('title' => 'la_tab_CouponsItems', 't' => 'in-commerce/discounts/coupon_items', 'priority' => 2), + ), + ), - 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s', - ), + 'PermSection' => Array ('main' => 'in-commerce:coupons'), - 'ListSortings' => Array ( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), - ) - ), + 'Sections' => Array ( + 'in-commerce:coupons' => Array ( + 'parent' => 'in-commerce:discounts_folder', + 'icon' => 'discounts_coupons', + 'label' => 'la_tab_Coupons', + 'url' => Array ('t' => 'in-commerce/discounts/coupons_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), + 'priority' => 3.2, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'Fields' => Array( - 'CouponId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ( - 'type' => 'int', 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1 - ), - 'Name' => Array ( 'type' =>'string', 'required' => 1, 'default' => null, 'max_len' => 255), - 'Code' => Array ( - 'type' => 'string', 'required' => 1, 'default' => null, - 'max_len' => 255, 'unique' => Array ('Code'), - ), - 'Expiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,), - 'GroupId' => Array ('type' => 'int', 'default' => null, ), - 'Type' => Array ( - 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping'*/), - 'not_null' => 1, 'default' => 1, - ), - 'Amount' => Array ('type' => 'double', 'default' => null), - 'LastUsedBy' => Array ( - 'type' => 'int', - 'formatter' => 'kLEFTFormatter', - 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', - 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, - 'required' => 0, 'default' => null, - ), - 'LastUsedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'NumberOfUses' => Array ('type' => 'int', 'default' => 1), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'VirtualFields' => Array ( - 'CouponCount' => Array ('type' => 'int', 'min_value_inc' => 1, 'default' => 1), - 'DefaultExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'CouponId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array('filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Code' => Array('title'=>'column:la_fld_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Expiration' => Array('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Type' => Array('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'Status' => Array('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'Amount' => Array('filter_block' => 'grid_range_filter', 'width' => 100, ), - 'LastUsedBy' => Array('filter_block' => 'grid_like_filter', 'width' => 140, ), - 'LastUsedOn' => Array('filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'NumberOfUses' => Array('filter_block' => 'grid_range_filter', 'width' => 130, ), - ), - ), - 'Radio' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Selector' => 'radio', - 'Fields' => Array( - 'CouponId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array('filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Code' => Array('title'=>'column:la_fld_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Expiration' => Array('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Type' => Array('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'Status' => Array('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'Amount' => Array('filter_block' => 'grid_range_filter', 'width' => 100, ), - 'LastUsedBy' => Array('filter_block' => 'grid_like_filter', 'width' => 140, ), - 'LastUsedOn' => Array('filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'NumberOfUses' => Array('filter_block' => 'grid_range_filter', 'width' => 130, ), - ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'CouponId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ( + 'type' => 'int', 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 1 + ), + 'Name' => Array ( 'type' =>'string', 'required' => 1, 'default' => null, 'max_len' => 255), + 'Code' => Array ( + 'type' => 'string', 'required' => 1, 'default' => null, + 'max_len' => 255, 'unique' => Array ('Code'), + ), + 'Expiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,), + 'GroupId' => Array ('type' => 'int', 'default' => null, ), + 'Type' => Array ( + 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping'*/), + 'not_null' => 1, 'default' => 1, + ), + 'Amount' => Array ('type' => 'double', 'default' => null), + 'LastUsedBy' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', + 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, + 'required' => 0, 'default' => null, + ), + 'LastUsedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'NumberOfUses' => Array ('type' => 'int', 'default' => 1), + ), + + 'VirtualFields' => Array ( + 'CouponCount' => Array ('type' => 'int', 'min_value_inc' => 1, 'default' => 1), + 'DefaultExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'CouponId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ), + 'Code' => Array ('title' => 'column:la_fld_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Expiration' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'Amount' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ), + 'LastUsedBy' => Array ('filter_block' => 'grid_like_filter', 'width' => 140, ), + 'LastUsedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'NumberOfUses' => Array ('filter_block' => 'grid_range_filter', 'width' => 130, ), + ), + ), + 'Radio' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Selector' => 'radio', + 'Fields' => Array ( + 'CouponId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ), + 'Code' => Array ('title' => 'column:la_fld_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Expiration' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'Amount' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ), + 'LastUsedBy' => Array ('filter_block' => 'grid_like_filter', 'width' => 140, ), + 'LastUsedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'NumberOfUses' => Array ('filter_block' => 'grid_range_filter', 'width' => 130, ), + ), + ), + ), +); Index: branches/5.2.x/units/affiliate_plans/affiliate_plans_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/affiliate_plans/affiliate_plans_config.php (.../affiliate_plans_config.php) (revision 14582) +++ branches/5.2.x/units/affiliate_plans/affiliate_plans_config.php (.../affiliate_plans_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'ap', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'AffiliatePlansEventHandler', 'file' => 'affiliate_plans_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'AggregateTags' => Array ( - ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'ap', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatePlansEventHandler', 'file' => 'affiliate_plans_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'IDField' => 'AffiliatePlanId', - 'StatusField' => Array ('Enabled', 'IsPrimary'), // field, that is affected by Approve/Decline events + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'TitleField' => 'Name', - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('ap' => '!la_title_Adding_Affiliate_Plan!'), - 'edit_status_labels' => Array ('ap' => '!la_title_Editing_Affiliate_Plan!'), - 'new_titlefield' => Array ('ap' => '!la_title_New_Affiliate_Plan!'), - ), + 'IDField' => 'AffiliatePlanId', + 'StatusField' => Array ('Enabled', 'IsPrimary'), // field, that is affected by Approve/Decline events - 'affiliate_plans_list' => Array ('prefixes' => Array ('ap_List'), 'format' => "!la_title_AffiliatePlans!"), - 'affiliate_plans_edit' => Array ('prefixes' => Array ('ap'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_General!"), - 'affiliate_plans_brackets' => Array ('prefixes' => Array ('ap', 'apbrackets_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"), - 'affiliate_plans_items' => Array ('prefixes' => Array ('ap', 'api_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"), + 'TitleField' => 'Name', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('ap' => '!la_title_Adding_Affiliate_Plan!'), + 'edit_status_labels' => Array ('ap' => '!la_title_Editing_Affiliate_Plan!'), + 'new_titlefield' => Array ('ap' => '!la_title_New_Affiliate_Plan!'), + ), - ), + 'affiliate_plans_list' => Array ('prefixes' => Array ('ap_List'), 'format' => "!la_title_AffiliatePlans!"), + 'affiliate_plans_edit' => Array ('prefixes' => Array ('ap'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_General!"), + 'affiliate_plans_brackets' => Array ('prefixes' => Array ('ap', 'apbrackets_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"), + 'affiliate_plans_items' => Array ('prefixes' => Array ('ap', 'api_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"), + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliate_plans_edit', 'priority' => 1), - 'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/affiliate_plans/affiliate_plans_brackets', 'priority' => 2), -// 'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/affiliate_plans/affiliate_plans_items', 'priority' => 3), - ), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliate_plans_edit', 'priority' => 1), + 'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/affiliate_plans/affiliate_plans_brackets', 'priority' => 2), +// 'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/affiliate_plans/affiliate_plans_items', 'priority' => 3), + ), + ), - 'PermSection' => Array ('main' => 'in-commerce:affiliate_plans'), + 'PermSection' => Array ('main' => 'in-commerce:affiliate_plans'), - 'Sections' => Array ( - 'in-commerce:affiliate_plans' => Array ( - 'parent' => 'in-commerce:affiliates_folder', - 'icon' => 'affiliates', - 'label' => 'la_tab_AffiliatePlans', - 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_plans_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary'), - 'priority' => 5.2, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'Sections' => Array ( + 'in-commerce:affiliate_plans' => Array ( + 'parent' => 'in-commerce:affiliates_folder', + 'icon' => 'affiliates', + 'label' => 'la_tab_AffiliatePlans', + 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_plans_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary'), + 'priority' => 5.2, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'TableName' => TABLE_PREFIX.'AffiliatePlans', + 'TableName' => TABLE_PREFIX.'AffiliatePlans', - 'ListSQLs' => Array ('' => 'SELECT * FROM %s'), - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), - 'SubItems' => Array ('apbrackets', /*'api'*/), - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc'), - 'Sorting' => Array ('Name' => 'desc'), - ) - ), + 'SubItems' => Array ('apbrackets', /*'api'*/), - 'Fields' => Array ( - 'AffiliatePlanId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'unique' => Array (), 'not_null' => 1, 'required' => 1, 'default' => ''), - 'PlanType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (/*0 => 'la_by_amount',*/ 1 => 'la_by_amount', 2 => 'la_by_items_sold'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), - 'ResetInterval' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'PaymentType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_regular', 1 => 'la_by_request'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'MinPaymentAmount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Enabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'IsPrimary' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc'), + 'Sorting' => Array ('Name' => 'desc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'AffiliatePlanId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'PlanType' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 150, ), - 'Enabled' => Array ( 'title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ), - ), - ), + 'Fields' => Array ( + 'AffiliatePlanId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'unique' => Array (), 'not_null' => 1, 'required' => 1, 'default' => ''), + 'PlanType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (/*0 => 'la_by_amount',*/ 1 => 'la_by_amount', 2 => 'la_by_items_sold'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), + 'ResetInterval' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'PaymentType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_regular', 1 => 'la_by_request'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'MinPaymentAmount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'Enabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'IsPrimary' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + ), - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'AffiliatePlanId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'PlanType' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 150, ), + 'Enabled' => Array ( 'title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/discounts/discounts_config.php =================================================================== diff -u -N -r15009 -r16385 --- branches/5.2.x/units/discounts/discounts_config.php (.../discounts_config.php) (revision 15009) +++ branches/5.2.x/units/discounts/discounts_config.php (.../discounts_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'd', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'DiscountsEventHandler','file'=>'discounts_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array(), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'DiscountId', - 'StatusField' => Array('Status'), - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'ProductsDiscounts', - 'SubItems' => Array('di'), +$config = Array ( + 'Prefix' => 'd', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'DiscountsEventHandler', 'file' => 'discounts_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('d'=>'!la_title_Adding_Discount!'), - 'edit_status_labels' => Array('d'=>'!la_title_Editing_Discount!'), - 'new_titlefield' => Array('d'=>'!la_title_New_Discount!'), - ), + 'AutoLoad' => true, - 'discounts_list'=>Array('prefixes' => Array('d_List'), - 'format' => "!la_title_Discounts!", - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'discount_edit'=>Array( 'prefixes' => Array('d'), - 'format' => "#d_status# '#d_titlefield#' - !la_title_General!", - ), + 'IDField' => 'DiscountId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'ProductsDiscounts', + 'SubItems' => Array ('di'), - 'discount_items'=>Array('prefixes' => Array('d','di_List'), - 'format' => "#d_status# '#d_titlefield#' - !la_title_DiscountItems!", - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('d' => '!la_title_Adding_Discount!'), + 'edit_status_labels' => Array ('d' => '!la_title_Editing_Discount!'), + 'new_titlefield' => Array ('d' => '!la_title_New_Discount!'), + ), - ), + 'discounts_list' => Array ( + 'prefixes' => Array ('d_List'), 'format' => "!la_title_Discounts!", + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/discount_edit', 'priority' => 1), - 'items' => Array ('title' => 'la_tab_DiscountItems', 't' => 'in-commerce/discounts/discount_items', 'priority' => 2), - ), - ), + 'discount_edit' => Array ( + 'prefixes' => Array ('d'), 'format' => "#d_status# '#d_titlefield#' - !la_title_General!", + ), - 'PermSection' => Array('main' => 'in-commerce:discounts'), + 'discount_items' => Array ( + 'prefixes' => Array ('d', 'di_List'), 'format' => "#d_status# '#d_titlefield#' - !la_title_DiscountItems!", + ), + ), - 'Sections' => Array( - 'in-commerce:discounts_folder' => Array( - 'parent' => 'in-commerce', - 'use_parent_header' => 1, - 'icon' => 'discounts_coupons', - 'label' => 'la_tab_DiscountsAndCoupons', - 'permissions' => Array(), - 'priority' => 3, - 'type' => stTREE, - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/discount_edit', 'priority' => 1), + 'items' => Array ('title' => 'la_tab_DiscountItems', 't' => 'in-commerce/discounts/discount_items', 'priority' => 2), + ), + ), - 'in-commerce:discounts' => Array( - 'parent' => 'in-commerce:discounts_folder', - 'icon' => 'discounts_coupons', - 'label' => 'la_tab_Discounts', - 'url' => Array('t' => 'in-commerce/discounts/discounts_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), - 'priority' => 3.1, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'PermSection' => Array ('main' => 'in-commerce:discounts'), - 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s', - ), + 'Sections' => Array ( + 'in-commerce:discounts_folder' => Array ( + 'parent' => 'in-commerce', + 'use_parent_header' => 1, + 'icon' => 'discounts_coupons', + 'label' => 'la_tab_DiscountsAndCoupons', + 'permissions' => Array (), + 'priority' => 3, + 'type' => stTREE, + ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), - ) - ), - 'Fields' => Array ( - 'DiscountId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 2 ), - 'Name' => Array('type'=>'string','required' => 1, 'default' => null, 'max_len'=>255), - 'Start' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'End' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'GroupId' => Array( - 'type' => 'int', - 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'UserGroups WHERE Personal = 0 ORDER BY Name', 'option_key_field'=>'GroupId', 'option_title_field'=>'Name', - 'required' => 1, 'default' => NULL - ), - 'Type' => Array( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( - 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping' */ - ), - 'use_phrases' => 1, 'default' => 1, - ), - 'Amount' => Array('type'=>'double', 'default' => null), - ), + 'in-commerce:discounts' => Array ( + 'parent' => 'in-commerce:discounts_folder', + 'icon' => 'discounts_coupons', + 'label' => 'la_tab_Discounts', + 'url' => Array ('t' => 'in-commerce/discounts/discounts_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), + 'priority' => 3.1, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'DiscountId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array( 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'Start' => Array( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'End' => Array( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'GroupId' => Array( 'title'=>'column:la_fld_Group', 'filter_block' => 'grid_options_filter', 'width' => 150, ), - 'Type' => Array( 'filter_block' => 'grid_options_filter', 'width' => 90, ), - 'Status' => Array( 'filter_block' => 'grid_options_filter', 'width' => 90, ), - 'Amount' => Array( 'filter_block' => 'grid_range_filter', 'width' => 100, ), - ), - ), - ), - ); \ No newline at end of file + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'DiscountId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 2 ), + 'Name' => Array ('type' => 'string', 'required' => 1, 'default' => null, 'max_len'=>255), + 'Start' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'End' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'GroupId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'UserGroups WHERE Personal = 0 ORDER BY Name', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', + 'required' => 1, 'default' => NULL + ), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping' */ + ), + 'use_phrases' => 1, 'default' => 1, + ), + 'Amount' => Array ('type' => 'double', 'default' => null), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'DiscountId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'Start' => Array ( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'End' => Array ( 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'GroupId' => Array ( 'title' => 'column:la_fld_Group', 'filter_block' => 'grid_options_filter', 'width' => 150, ), + 'Type' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 90, ), + 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 90, ), + 'Amount' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 100, ), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/gift_certificates/gift_certificates_config.php =================================================================== diff -u -N -r14717 -r16385 --- branches/5.2.x/units/gift_certificates/gift_certificates_config.php (.../gift_certificates_config.php) (revision 14717) +++ branches/5.2.x/units/gift_certificates/gift_certificates_config.php (.../gift_certificates_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'gc', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'GiftCertificateEventHandler', 'file' => 'gift_certificates_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'GiftCertificateTagProcessor', 'file' => 'gift_certificates_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'gc', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'GiftCertificateEventHandler', 'file' => 'gift_certificates_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'GiftCertificateTagProcessor', 'file' => 'gift_certificates_tp.php', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + 'AutoLoad' => true, - 'IDField' => 'GiftCertificateId', - 'StatusField' => Array('Status'), - 'TitleField' => 'Recipient', - 'TableName' => TABLE_PREFIX.'GiftCertificates', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('gc' => '!la_title_AddingGiftCertificate!'), - 'edit_status_labels' => Array ('gc' => '!la_title_EditingGiftCertificate!'), - 'new_titlefield' => Array ('gc' => '!la_title_NewGiftCertificate!'), - ), + 'IDField' => 'GiftCertificateId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Recipient', + 'TableName' => TABLE_PREFIX.'GiftCertificates', - 'gift_certificates_list' => Array ('prefixes' => Array ('gc_List'), 'format' => "!la_title_GiftCertificates!",), - 'gift_certificates_edit' => Array ('prefixes' => Array ('gc'), 'format' => "#gc_status# '#gc_titlefield#' - !la_title_General!",), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('gc' => '!la_title_AddingGiftCertificate!'), + 'edit_status_labels' => Array ('gc' => '!la_title_EditingGiftCertificate!'), + 'new_titlefield' => Array ('gc' => '!la_title_NewGiftCertificate!'), ), - 'PermSection' => Array ('main' => 'in-commerce:gift-certificates'), + 'gift_certificates_list' => Array ('prefixes' => Array ('gc_List'), 'format' => "!la_title_GiftCertificates!",), + 'gift_certificates_edit' => Array ('prefixes' => Array ('gc'), 'format' => "#gc_status# '#gc_titlefield#' - !la_title_General!",), + ), - 'Sections' => Array ( - 'in-commerce:gift-certificates' => Array ( - 'parent' => 'in-commerce:discounts_folder', - 'icon' => 'discounts_coupons', - 'label' => 'la_tab_GiftCertificates', - 'url' => Array('t' => 'in-commerce/discounts/gift_certificate_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), - 'priority' => 3.3, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'PermSection' => Array ('main' => 'in-commerce:gift-certificates'), - 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s',), - 'ItemSQLs' => Array ('' => 'SELECT * FROM %1$s',), - - 'ListSortings' => Array ( - '' => Array( - 'Sorting' => Array('Recipient' => 'asc'), - ) + 'Sections' => Array ( + 'in-commerce:gift-certificates' => Array ( + 'parent' => 'in-commerce:discounts_folder', + 'icon' => 'discounts_coupons', + 'label' => 'la_tab_GiftCertificates', + 'url' => Array ('t' => 'in-commerce/discounts/gift_certificate_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), + 'priority' => 3.3, // ., because this section replaces parent in tree + 'type' => stTAB, ), + ), - 'Fields' => Array ( - 'GiftCertificateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OrderId' => Array ('type' => 'int', 'default' => 0), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), - 'SendVia' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 0 => 'la_opt_Email', 1 => 'la_opt_PostalMail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ), - 'Purchaser' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'Recipient' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientEmail' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ), - 'RecipientFirstname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientLastname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientAddress1' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientAddress2' => Array('type'=>'string', 'default'=>null, 'max_len'=>255), - 'RecipientCity' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientState' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientZipcode' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255), - 'RecipientCountry' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode - FROM '.TABLE_PREFIX.'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', - 'not_null' => 1, 'required' => 1, 'default' => 'USA' - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'RecipientPhone' => Array('type'=>'string','default'=>null, 'max_len'=>255), - 'Message' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'Code' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array('Code')), - 'AddDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#',), - 'Expiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,), - 'Amount' => Array('type'=>'double', 'default' => null, 'required' => 1, 'min_value_exc' => 0), - 'Debit' => Array('type'=>'double', 'default' => null), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Recipient' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'GiftCertificateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OrderId' => Array ('type' => 'int', 'default' => 0), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), + 'SendVia' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 0 => 'la_opt_Email', 1 => 'la_opt_PostalMail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ), + 'Purchaser' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'Recipient' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientEmail' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') ), + 'RecipientFirstname' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientLastname' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientAddress1' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientAddress2' => Array ('type' => 'string', 'default'=>null, 'max_len'=>255), + 'RecipientCity' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientState' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientZipcode' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255), + 'RecipientCountry' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM '.TABLE_PREFIX.'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', + 'not_null' => 1, 'required' => 1, 'default' => 'USA' ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'GiftCertificateId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Code' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'Debit' => Array ('title' => 'column:la_fld_RemainingAmount', 'filter_block' => 'grid_range_filter', 'width' => 160, ), - 'Amount' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ), - 'Expiration' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - ), + 'RecipientPhone' => Array ('type' => 'string', 'default'=>null, 'max_len'=>255), + 'Message' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + 'Code' => Array ('type' => 'string', 'required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array ('Code')), + 'AddDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#',), + 'Expiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,), + 'Amount' => Array ('type' => 'double', 'default' => null, 'required' => 1, 'min_value_exc' => 0), + 'Debit' => Array ('type' => 'double', 'default' => null), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', ), + 'Fields' => Array ( + 'GiftCertificateId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Code' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'Debit' => Array ('title' => 'column:la_fld_RemainingAmount', 'filter_block' => 'grid_range_filter', 'width' => 160, ), + 'Amount' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ), + 'Expiration' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), + ), ), - ); \ No newline at end of file + ), +); \ No newline at end of file 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 Index: branches/5.2.x/units/addresses/addresses_config.php =================================================================== diff -u -N -r16145 -r16385 --- branches/5.2.x/units/addresses/addresses_config.php (.../addresses_config.php) (revision 16145) +++ branches/5.2.x/units/addresses/addresses_config.php (.../addresses_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'addr', - 'ItemClass' => Array('class'=>'AddressesItem','file'=>'addresses_item.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'AddressesList','file'=>'addresses_list.php','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'AddressesEventHandler', 'file' => 'addresses_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'AddressesTagProcessor', 'file' => 'addresses_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'addr', + 'ItemClass' => Array ('class' => 'AddressesItem', 'file' => 'addresses_item.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'AddressesList', 'file' => 'addresses_list.php', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AddressesEventHandler', 'file' => 'addresses_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AddressesTagProcessor', 'file' => 'addresses_tag_processor.php', 'build_event' => 'OnBuild'), - 'Hooks' => Array( - // create/update profile addres (in addresses table) - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnUpdateUserProfile', - ), + 'AutoLoad' => true, - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnUpdateProfileAddress', - ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnModifyUsersConfig', - ), - ), + 'Hooks' => Array ( + // create/update profile address (in addresses table) + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterItemCreate', 'OnAfterItemUpdate'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnUpdateUserProfile', + ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => '', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterItemCreate', 'OnAfterItemUpdate'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnUpdateProfileAddress', + ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnModifyUsersConfig', + ), + ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'AddressId', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), + 'IDField' => 'AddressId', - 'TableName' => TABLE_PREFIX.'Addresses', + 'TableName' => TABLE_PREFIX.'Addresses', - 'ParentTableKey'=> 'PortalUserId', // linked field in master table - 'ForeignKey' => 'PortalUserId', // linked field in subtable - 'ParentPrefix' => 'u', - 'AutoDelete' => true, - 'AutoClone' => true, + 'ParentTableKey' => 'PortalUserId', // linked field in master table + 'ForeignKey' => 'PortalUserId', // linked field in sub-table + 'ParentPrefix' => 'u', + 'AutoDelete' => true, + 'AutoClone' => true, - 'CalculatedFields' => Array( - '' => Array( - 'ShortAddress' => 'CONCAT( TRIM(CONCAT(Address1," ",Address2)),", ",City," ...")', - ), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'ShortAddress' => 'CONCAT( TRIM(CONCAT(Address1," ",Address2)),", ",City," ...")', + ), + ), - 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), // key - special, value - list select sql + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s' + ), - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s'), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('IsProfileAddress' => 'desc') + ) + ), - 'ListSortings' => Array('' => Array('Sorting' => Array('IsProfileAddress' => 'desc')) ), + 'Fields' => Array ( + 'AddressId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'To' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''), + 'Company' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'Phone' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''), + 'Fax' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'Email' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'not_null' => '1', 'default' => ''), + 'Address1' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''), + 'Address2' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'City' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''), + 'State' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array (), + 'not_null' => '1', 'default' => '' + ), + 'Zip' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => ''), + 'Country' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM ' . TABLE_PREFIX . 'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', + 'not_null' => '1', 'required' => 1, 'default' => '' + ), + 'LastUsedAsBilling' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'LastUsedAsShipping' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'IsProfileAddress' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + ), - 'Fields' => Array( - 'AddressId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'To' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Company' => Array('type' => 'string','not_null' => '1','default' => ''), - 'Phone' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''), - 'Email' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''), - 'Address1' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Address2' => Array('type' => 'string','not_null' => '1','default' => ''), - 'City' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'State' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => Array(), - 'not_null' => '1', 'default' => '' - ), + 'VirtualFields' => Array ( + 'ShortAddress' => Array ('type' => 'string', 'default' => ''), + ), - 'Zip' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Country' => Array( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode - FROM ' . TABLE_PREFIX . 'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', - 'not_null' => '1', 'required' => 1, 'default' => '' - ), - - 'LastUsedAsBilling' => Array( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - 'LastUsedAsShipping' => Array( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - 'IsProfileAddress' => Array( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - ), - - 'VirtualFields' => Array( - 'ShortAddress' => Array('type'=>'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Fields' => Array( - 'AddressId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'To' => Array ('title' => 'column:la_fld_FullName', 'filter_block' => 'grid_like_filter'), - 'Company' => Array ('filter_block' => 'grid_like_filter'), - 'Phone' => Array ('filter_block' => 'grid_like_filter'), - 'Fax' => Array ('filter_block' => 'grid_like_filter'), - 'Email' => Array ('filter_block' => 'grid_like_filter'), - 'Address1' => Array ('title' => 'column:la_fld_AddressLine1', 'filter_block' => 'grid_like_filter'), - 'Address2' => Array ('title' => 'column:la_fld_AddressLine2', 'filter_block' => 'grid_like_filter'), - 'City' => Array ('filter_block' => 'grid_like_filter'), - 'State' => Array ('filter_block' => 'grid_like_filter'), - 'Zip' => Array ('filter_block' => 'grid_like_filter'), - 'Country' => Array ('filter_block' => 'grid_options_filter'), - 'LastUsedAsBilling' => Array ('filter_block' => 'grid_options_filter'), - 'LastUsedAsShipping' => Array ('filter_block' => 'grid_options_filter'), - 'IsProfileAddress' => Array ('filter_block' => 'grid_options_filter'), - ), - ), - ), - ); + 'Grids' => Array ( + 'Default' => Array ( + 'Fields' => Array ( + 'AddressId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'To' => Array ('title' => 'column:la_fld_FullName', 'filter_block' => 'grid_like_filter'), + 'Company' => Array ('filter_block' => 'grid_like_filter'), + 'Phone' => Array ('filter_block' => 'grid_like_filter'), + 'Fax' => Array ('filter_block' => 'grid_like_filter'), + 'Email' => Array ('filter_block' => 'grid_like_filter'), + 'Address1' => Array ('title' => 'column:la_fld_AddressLine1', 'filter_block' => 'grid_like_filter'), + 'Address2' => Array ('title' => 'column:la_fld_AddressLine2', 'filter_block' => 'grid_like_filter'), + 'City' => Array ('filter_block' => 'grid_like_filter'), + 'State' => Array ('filter_block' => 'grid_like_filter'), + 'Zip' => Array ('filter_block' => 'grid_like_filter'), + 'Country' => Array ('filter_block' => 'grid_options_filter'), + 'LastUsedAsBilling' => Array ('filter_block' => 'grid_options_filter'), + 'LastUsedAsShipping' => Array ('filter_block' => 'grid_options_filter'), + 'IsProfileAddress' => Array ('filter_block' => 'grid_options_filter'), + ), + ), + ), +); Index: branches/5.2.x/units/gateways/gateways_config.php =================================================================== diff -u -N -r16378 -r16385 --- branches/5.2.x/units/gateways/gateways_config.php (.../gateways_config.php) (revision 16378) +++ branches/5.2.x/units/gateways/gateways_config.php (.../gateways_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'gwf', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'GatewayEventHandler','file'=>'gw_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'GatewayTagProcessor','file'=>'gw_tag_processor.php','build_event'=>'OnBuild'), +$config = Array ( + 'Prefix' => 'gwf', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'GatewayEventHandler', 'file' => 'gw_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'GatewayTagProcessor', 'file' => 'gw_tag_processor.php', 'build_event' => 'OnBuild'), - 'RegisterClasses' => array( - array('pseudo' => 'kGWBase', 'class' => 'kGWBase', 'file' => 'gw_classes/gw_base.php', 'build_event' => ''), - array('pseudo' => 'kAtosOriginGW', 'class' => 'kAtosOriginGW', 'file' => 'gw_classes/atosorigin.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWAuthorizeNet', 'class' => 'kGWAuthorizeNet', 'file' => 'gw_classes/authorizenet.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWGoogleCheckout', 'class' => 'kGWGoogleCheckout', 'file' => 'gw_classes/google_checkout.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWiDEALnl', 'class' => 'kGWiDEALnl', 'file' => 'gw_classes/ideal_nl.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kMultiCardsGW', 'class' => 'kMultiCardsGW', 'file' => 'gw_classes/multicards.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kPayboxGW', 'class' => 'kPayboxGW', 'file' => 'gw_classes/paybox.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kPaymentechGW', 'class' => 'kPaymentechGW', 'file' => 'gw_classes/paymentech.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWPayPal', 'class' => 'kGWPayPal', 'file' => 'gw_classes/paypal.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWPaypalDirect', 'class' => 'kGWPaypalDirect', 'file' => 'gw_classes/paypal_direct.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWRightConnect', 'class' => 'kGWRightConnect', 'file' => 'gw_classes/rightconnect.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kSellaGuestPayGW', 'class' => 'kSellaGuestPayGW', 'file' => 'gw_classes/sella_guestpay.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kVerisignPfLinkGW', 'class' => 'kVerisignPfLinkGW', 'file' => 'gw_classes/verisign_pflink.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - array('pseudo' => 'kGWWorldPay', 'class' => 'kGWWorldPay', 'file' => 'gw_classes/worldpay.php', 'build_event' => '', 'require_classes' => 'kGWBase'), - ), + 'RegisterClasses' => array( + array('pseudo' => 'kGWBase', 'class' => 'kGWBase', 'file' => 'gw_classes/gw_base.php', 'build_event' => ''), + array('pseudo' => 'kAtosOriginGW', 'class' => 'kAtosOriginGW', 'file' => 'gw_classes/atosorigin.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWAuthorizeNet', 'class' => 'kGWAuthorizeNet', 'file' => 'gw_classes/authorizenet.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWGoogleCheckout', 'class' => 'kGWGoogleCheckout', 'file' => 'gw_classes/google_checkout.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWiDEALnl', 'class' => 'kGWiDEALnl', 'file' => 'gw_classes/ideal_nl.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kMultiCardsGW', 'class' => 'kMultiCardsGW', 'file' => 'gw_classes/multicards.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kPayboxGW', 'class' => 'kPayboxGW', 'file' => 'gw_classes/paybox.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kPaymentechGW', 'class' => 'kPaymentechGW', 'file' => 'gw_classes/paymentech.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWPayPal', 'class' => 'kGWPayPal', 'file' => 'gw_classes/paypal.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWPaypalDirect', 'class' => 'kGWPaypalDirect', 'file' => 'gw_classes/paypal_direct.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWRightConnect', 'class' => 'kGWRightConnect', 'file' => 'gw_classes/rightconnect.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kSellaGuestPayGW', 'class' => 'kSellaGuestPayGW', 'file' => 'gw_classes/sella_guestpay.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kVerisignPfLinkGW', 'class' => 'kVerisignPfLinkGW', 'file' => 'gw_classes/verisign_pflink.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + array('pseudo' => 'kGWWorldPay', 'class' => 'kGWWorldPay', 'file' => 'gw_classes/worldpay.php', 'build_event' => '', 'require_classes' => 'kGWBase'), + ), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'pt', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnListBuild' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnCheckGateways', - ), - Array( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'pt', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnCreate', 'OnSave', 'OnUpdate', 'onPreSaveAndGoToTab', 'onPreSaveAndGo' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnSaveValues', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'GWConfigFieldId', - 'TableName' => TABLE_PREFIX.'GatewayConfigFields', + 'AutoLoad' => true, - 'ListSQLs' => Array ( - '' => 'SELECT * FROM %s', - ), // key - special, value - list select sql + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'pt', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnListBuild' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnCheckGateways', + ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => 'pt', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnCreate', 'OnSave', 'OnUpdate', 'onPreSaveAndGoToTab', 'onPreSaveAndGo' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnSaveValues', + ), + ), - 'ItemSQLs' => Array ( - ''=>'SELECT * FROM %s', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'Fields' => Array ( - 'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => '', ), - 'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => '', ), - 'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 'text', ), - 'ValueList' => Array('type' => 'string', 'default' => NULL), - 'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - ), + 'IDField' => 'GWConfigFieldId', + 'TableName' => TABLE_PREFIX.'GatewayConfigFields', - 'VirtualFields' => Array ( - 'Value' => Array('type' => 'string', 'default' => ''), - ), - ); + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), + + 'Fields' => Array ( + 'GWConfigFieldId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'SystemFieldName' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', ), + 'FieldName' => Array ('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => '', ), + 'ElementType' => Array ('type' => 'string', 'not_null' => 1, 'default' => 'text', ), + 'ValueList' => Array ('type' => 'string', 'default' => NULL), + 'GatewayId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + ), + + 'VirtualFields' => Array ( + 'Value' => Array ('type' => 'string', 'default' => ''), + ), +); Index: branches/5.2.x/units/files/files_config.php =================================================================== diff -u -N -r14717 -r16385 --- branches/5.2.x/units/files/files_config.php (.../files_config.php) (revision 14717) +++ branches/5.2.x/units/files/files_config.php (.../files_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'file', - 'ItemClass' => Array ('class' => 'FilesItem', 'file' => 'files.php', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'FilesEventHandler', 'file' => 'files_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => '#PARENT#', - 'AggregatedTagName' => 'ListFiles', - 'LocalTagName' => 'PrintList', - 'LocalSpecial' => 'downl', - ), - ), - 'Hooks' => Array ( - /*Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'p', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'onPreSave' ), - 'DoPrefix' => 'pr', - 'DoSpecial' => 'tang', - 'DoEvent' => 'OnArrange', - ),*/ - ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'StatusField' => Array ('Status', 'IsPrimary'), - 'IDField' => 'FileId', - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'ProductFiles', - 'ForeignKey' => 'ProductId', - 'ParentTableKey' => 'ProductId', - 'ParentPrefix' => 'p', - 'AutoDelete' => true, - 'AutoClone' => true, +$config = Array ( + 'Prefix' => 'file', + 'ItemClass' => Array ('class' => 'FilesItem', 'file' => 'files.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'FilesEventHandler', 'file' => 'files_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'), - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'), + 'AutoLoad' => true, - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array ('AddedOn' => 'desc', 'Version' => 'desc'), - ) - ), + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => '#PARENT#', + 'AggregatedTagName' => 'ListFiles', + 'LocalTagName' => 'PrintList', + 'LocalSpecial' => 'downl', + ), + ), - 'Fields' => Array ( - 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'Version' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'FilePath' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'RealPath' => Array ( - 'type' => 'string', - 'formatter' => 'kUploadFormatter', - 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0, - 'size_field' => 'Size', 'max_size' => 50000000, - 'orig_name_field' => 'FilePath', - 'content_type_field' => 'MIMEType', - 'not_null' => 1, 'skip_empty' =>1, 'default' => '', - 'required' => 1, - 'error_msgs' => Array ( - 'bad_file_format' => '!la_error_InvalidFileFormat!', - 'bad_file_size' => '!la_error_FileTooLarge!', - 'cant_save_file' => '!la_error_cant_save_file!', - ), - ), - 'Size' => Array ( - 'type' => 'int', - 'formatter' => 'kFilesizeFormatter', - 'not_null' => 1, 'default' => 0, - ), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'IsPrimary' => 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), - 'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'AddedById' => Array ('type' => 'int', 'default' => NULL), - 'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - ), + /*'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => 'p', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'onPreSave' ), + 'DoPrefix' => 'pr', + 'DoSpecial' => 'tang', + 'DoEvent' => 'OnArrange', + ), + ),*/ - 'VirtualFields' => Array ( + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - ), + 'StatusField' => Array ('Status', 'IsPrimary'), + 'IDField' => 'FileId', + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'ProductFiles', + 'ForeignKey' => 'ProductId', + 'ParentTableKey' => 'ProductId', + 'ParentPrefix' => 'p', + 'AutoDelete' => true, + 'AutoClone' => true, - 'Grids' => Array ( + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'FileId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'), - 'Name' => Array ( 'title' => 'column:la_fld_FileName', 'data_block' => 'file_caption_td', 'filter_block' => 'grid_like_filter'), - 'FilePath' => Array ( 'filter_block' => 'grid_like_filter'), - 'Version' => Array ( 'filter_block' => 'grid_like_filter'), - 'Size' => Array ( 'title' => 'la_col_Size', 'filter_block' => 'grid_range_filter'), - 'AddedOn' => Array ( 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'), - 'Status' => Array ( 'filter_block' => 'grid_options_filter'), - ), - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), + 'Sorting' => Array ('AddedOn' => 'desc', 'Version' => 'desc'), + ) + ), - ); \ No newline at end of file + 'Fields' => Array ( + 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'Version' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'FilePath' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'RealPath' => Array ( + 'type' => 'string', + 'formatter' => 'kUploadFormatter', + 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0, + 'size_field' => 'Size', 'max_size' => 50000000, + 'orig_name_field' => 'FilePath', + 'content_type_field' => 'MIMEType', + 'not_null' => 1, 'skip_empty' =>1, 'default' => '', + 'required' => 1, + 'error_msgs' => Array ( + 'bad_file_format' => '!la_error_InvalidFileFormat!', + 'bad_file_size' => '!la_error_FileTooLarge!', + 'cant_save_file' => '!la_error_cant_save_file!', + ), + ), + 'Size' => Array ( + 'type' => 'int', + 'formatter' => 'kFilesizeFormatter', + 'not_null' => 1, 'default' => 0, + ), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'IsPrimary' => 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), + 'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'AddedById' => Array ('type' => 'int', 'default' => NULL), + 'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'FileId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'), + 'Name' => Array ( 'title' => 'column:la_fld_FileName', 'data_block' => 'file_caption_td', 'filter_block' => 'grid_like_filter'), + 'FilePath' => Array ( 'filter_block' => 'grid_like_filter'), + 'Version' => Array ( 'filter_block' => 'grid_like_filter'), + 'Size' => Array ( 'title' => 'la_col_Size', 'filter_block' => 'grid_range_filter'), + 'AddedOn' => Array ( 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'), + 'Status' => Array ( 'filter_block' => 'grid_options_filter'), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/downloads/downloads_config.php =================================================================== diff -u -N -r15134 -r16385 --- branches/5.2.x/units/downloads/downloads_config.php (.../downloads_config.php) (revision 15134) +++ branches/5.2.x/units/downloads/downloads_config.php (.../downloads_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'down', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), +$config = Array ( + 'Prefix' => 'down', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'RegisterClasses' => Array( - Array('pseudo' => 'DownloadHelper', 'class' => 'DownloadHelper', 'file' => 'download_helper.php', 'build_event' => ''), - ), + 'RegisterClasses' => Array ( + Array ('pseudo' => 'DownloadHelper', 'class' => 'DownloadHelper', 'file' => 'download_helper.php', 'build_event' => ''), + ), - 'AutoLoad' => true, - 'Hooks' => Array( - /*Array( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'p', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'onPreSave' ), - 'DoPrefix' => 'pr', - 'DoSpecial' => 'tang', - 'DoEvent' => 'OnArrange', - ),*/ - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'TitlePresets' => Array( - 'downloads_list'=>Array( 'prefixes' => Array('down_List'), - 'format' => "!la_title_FileDownloads!", - ), - ), + 'AutoLoad' => true, - 'PermSection' => Array('main' => 'in-commerce:downloadlog'), + /*'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => 'p', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'onPreSave' ), + 'DoPrefix' => 'pr', + 'DoSpecial' => 'tang', + 'DoEvent' => 'OnArrange', + ), + ),*/ - 'Sections' => Array( - 'in-commerce:downloadlog' => Array( - 'parent' => 'in-portal:reports', - 'icon' => 'download_log', - 'label' => 'la_tab_DownloadLog', - 'url' => Array('t' => 'in-commerce/downloads/downloads_list', 'pass' => 'm'), - 'permissions' => Array('view', 'delete'), - 'priority' => 7, - 'type' => stTREE, - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'IDField' => 'DownloadId', - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'UserDownloads', + 'TitlePresets' => Array ( + 'downloads_list' => Array ( + 'prefixes' => Array ('down_List'), 'format' => "!la_title_FileDownloads!", + ), + ), - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('StartedOn' => 'desc'), - ) - ), - 'Fields' => Array( - 'DownloadId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'Username' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'FileId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'Filename' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'IPAddress' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'StartedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL), - 'EndedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL), - ), - 'VirtualFields' => Array( - ), + 'PermSection' => Array ('main' => 'in-commerce:downloadlog'), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'DownloadId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Username' => Array( 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'ProductName' => Array( 'title'=>'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Filename' => Array( 'title'=>'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'IPAddress' => Array( 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'StartedOn' => Array( 'title'=>'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), - ), - ), - ), + 'Sections' => Array ( + 'in-commerce:downloadlog' => Array ( + 'parent' => 'in-portal:reports', + 'icon' => 'download_log', + 'label' => 'la_tab_DownloadLog', + 'url' => Array ('t' => 'in-commerce/downloads/downloads_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'delete'), + 'priority' => 7, + 'type' => stTREE, + ), + ), - ); \ No newline at end of file + 'IDField' => 'DownloadId', + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'UserDownloads', + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('StartedOn' => 'desc'), + ) + ), + + 'Fields' => Array ( + 'DownloadId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Username' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ProductName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'IPAddress' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'StartedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'EndedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'DownloadId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Username' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'ProductName' => Array ( 'title' => 'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'Filename' => Array ( 'title' => 'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'IPAddress' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'StartedOn' => Array ( 'title' => 'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/taxes/taxes_config.php =================================================================== diff -u -N -r14717 -r16385 --- branches/5.2.x/units/taxes/taxes_config.php (.../taxes_config.php) (revision 14717) +++ branches/5.2.x/units/taxes/taxes_config.php (.../taxes_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'tax', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'TaxesEventHandler', 'file' => 'taxes_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'TaxesTagProcessor', 'file' => 'taxes_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array (), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'tax', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'TaxesEventHandler', 'file' => 'taxes_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'TaxesTagProcessor', 'file' => 'taxes_tag_processor.php', 'build_event' => 'OnBuild'), - /*'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'tax', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'onEdit' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnLoadZoneForm', - ), - ),*/ - 'IDField' => 'TaxZoneId', - 'TitleField' => 'Name', + 'AutoLoad' => true, - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('tax' => '!la_title_AddingTaxZone!'), - 'edit_status_labels' => Array ('tax' => '!la_title_EditingTaxZone!'), - ), - 'taxes_list' => Array ( - 'prefixes' => Array ('tax_List'), 'format' => "!la_title_Taxes!", - ), - 'taxes_edit' => Array ( - 'prefixes' => Array ('tax'), - 'new_titlefield' => Array ('tax' => '!la_title_NewTax!'), - 'format' => "#tax_status# '#tax_titlefield#' - !la_title_General!", - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'PermSection' => Array ('main' => 'in-commerce:taxes'), + 'IDField' => 'TaxZoneId', + 'TitleField' => 'Name', - 'Sections' => Array ( - 'in-commerce:taxes' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_taxes', - 'label' => 'la_tab_Taxes', - 'url' => Array ('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 6, - 'type' => stTREE, - ), - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('tax' => '!la_title_AddingTaxZone!'), + 'edit_status_labels' => Array ('tax' => '!la_title_EditingTaxZone!'), + ), + 'taxes_list' => Array ( + 'prefixes' => Array ('tax_List'), 'format' => "!la_title_Taxes!", + ), + 'taxes_edit' => Array ( + 'prefixes' => Array ('tax'), + 'new_titlefield' => Array ('tax' => '!la_title_NewTax!'), + 'format' => "#tax_status# '#tax_titlefield#' - !la_title_General!", + ), + ), - 'TableName' => TABLE_PREFIX.'TaxZones', - 'AutoDelete' => true, - 'AutoClone' => true, + 'PermSection' => Array ('main' => 'in-commerce:taxes'), - 'SubItems' => Array ('taxdst'), + 'Sections' => Array ( + 'in-commerce:taxes' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_taxes', + 'label' => 'la_tab_Taxes', + 'url' => Array ('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 6, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array ( '' => 'SELECT %1$s.* %2$s FROM %s'), - // key - special, value - list select sql + 'TableName' => TABLE_PREFIX.'TaxZones', + 'AutoDelete' => true, + 'AutoClone' => true, + 'SubItems' => Array ('taxdst'), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc', 'TaxValue' => 'asc'), - ) - ), - 'Fields' => Array ( - 'TaxZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')), - 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'not_null' => 1, 'default' => 1), - 'TaxValue' => Array ('type' => 'double', 'not_null' => 1, 'default' => 0), - 'ApplyToShipping' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'ApplyToProcessing' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %s' + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - 'module' => 'core', - ), - 'Fields' => Array ( - 'TaxZoneId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array ( 'title' => 'column:la_fld_TaxZoneName', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'TaxValue' => Array ( 'title' => 'column:la_fld_TaxValue', 'filter_block' => 'grid_range_filter', 'width' => 110, ), - 'Type' => Array ( 'title' => 'column:la_fld_ZoneType', 'filter_block' => 'grid_options_filter', 'width' => 90, ), - 'ApplyToShipping' => Array ( 'title' => 'column:la_fld_TaxApplyToShipping', 'filter_block' => 'grid_options_filter', 'width' => 140, ), - 'ApplyToProcessing' => Array ( 'title' => 'column:la_fld_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter', 'width' => 150, ), - ), - ), - ), - ); \ No newline at end of file + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc', 'TaxValue' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'TaxZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')), + 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'not_null' => 1, 'default' => 1), + 'TaxValue' => Array ('type' => 'double', 'not_null' => 1, 'default' => 0), + 'ApplyToShipping' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'ApplyToProcessing' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + 'module' => 'core', + ), + 'Fields' => Array ( + 'TaxZoneId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ( 'title' => 'column:la_fld_TaxZoneName', 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'TaxValue' => Array ( 'title' => 'column:la_fld_TaxValue', 'filter_block' => 'grid_range_filter', 'width' => 110, ), + 'Type' => Array ( 'title' => 'column:la_fld_ZoneType', 'filter_block' => 'grid_options_filter', 'width' => 90, ), + 'ApplyToShipping' => Array ( 'title' => 'column:la_fld_TaxApplyToShipping', 'filter_block' => 'grid_options_filter', 'width' => 140, ), + 'ApplyToProcessing' => Array ( 'title' => 'column:la_fld_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter', 'width' => 150, ), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/destinations/destinations_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/destinations/destinations_config.php (.../destinations_config.php) (revision 14582) +++ branches/5.2.x/units/destinations/destinations_config.php (.../destinations_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'dst', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'images.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'DstEventHandler','file'=>'dst_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnCreate', 'OnUpdate'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnZoneUpdate', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'ZoneDestId', - 'TableName' => TABLE_PREFIX.'ShippingZonesDestinations', - 'ForeignKey' => 'ShippingZoneId', - 'ParentTableKey' => 'ZoneID', - 'ParentPrefix' => 'z', - 'AutoDelete' => true, - 'AutoClone' => true, +$config = Array ( + 'Prefix' => 'dst', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => 'images.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'DstEventHandler', 'file' => 'dst_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), + 'AutoLoad' => true, - 'Fields' => Array ( - 'ZoneDestId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'ShippingZoneId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'StdDestId' => Array('type' => 'int', 'default' => 0, ), - 'DestValue' => Array('type' => 'string', 'max_len' => 255, 'default' => null, ), - ), - ); \ No newline at end of file + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnCreate', 'OnUpdate'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnZoneUpdate', + ), + ), + + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), + + 'IDField' => 'ZoneDestId', + 'TableName' => TABLE_PREFIX.'ShippingZonesDestinations', + 'ForeignKey' => 'ShippingZoneId', + 'ParentTableKey' => 'ZoneID', + 'ParentPrefix' => 'z', + 'AutoDelete' => true, + 'AutoClone' => true, + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), + + 'Fields' => Array ( + 'ZoneDestId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'ShippingZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'StdDestId' => Array ('type' => 'int', 'default' => 0, ), + 'DestValue' => Array ('type' => 'string', 'max_len' => 255, 'default' => null, ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/payment_type/payment_type_config.php =================================================================== diff -u -N -r15376 -r16385 --- branches/5.2.x/units/payment_type/payment_type_config.php (.../payment_type_config.php) (revision 15376) +++ branches/5.2.x/units/payment_type/payment_type_config.php (.../payment_type_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'pt', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'PaymentTypeEventHandler', 'file' => 'payment_type_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'PaymentTypeTagProcessor', 'file' => 'payment_type_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'pt', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PaymentTypeEventHandler', 'file' => 'payment_type_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PaymentTypeTagProcessor', 'file' => 'payment_type_tag_processor.php', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'PaymentTypeId', - 'StatusField' => Array ('Status', 'IsPrimary'), - 'TableName' => TABLE_PREFIX.'PaymentTypes', + 'AutoLoad' => true, - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('pt' => '!la_title_AddingPaymentType!'), - 'edit_status_labels' => Array ('pt' => '!la_title_EditingPaymentType!'), - 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'payment_type_list' =>Array ( 'prefixes' => Array ('pt_List'), - 'format' => "!la_title_PaymentTypes!", - ), + 'IDField' => 'PaymentTypeId', + 'StatusField' => Array ('Status', 'IsPrimary'), + 'TableName' => TABLE_PREFIX.'PaymentTypes', - 'payment_type_edit' =>Array ( 'prefixes' => Array ('pt'), - 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), - 'format' => "#pt_status# '#pt_titlefield#' - !la_title_General!", - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('pt' => '!la_title_AddingPaymentType!'), + 'edit_status_labels' => Array ('pt' => '!la_title_EditingPaymentType!'), + 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), + ), - 'gateway' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"), - 'group_list' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"), + 'payment_type_list' =>Array ( + 'prefixes' => Array ('pt_List'), 'format' => "!la_title_PaymentTypes!", + ), - 'payment_currencies_edit' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"), - ), + 'payment_type_edit' =>Array ( + 'prefixes' => Array ('pt'), + 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), + 'format' => "#pt_status# '#pt_titlefield#' - !la_title_General!", + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1), - 'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2), - 'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3), - 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4), - ), - ), + 'gateway' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"), + 'group_list' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"), - 'PermSection' => Array ('main' => 'in-commerce:payment_types'), + 'payment_currencies_edit' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"), + ), - 'Sections' => Array ( - 'in-commerce:payment_types' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_payment_types', - 'label' => 'la_tab_PaymentTypes', - 'url' => Array ('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1), + 'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2), + 'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3), + 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4), + ), + ), - 'TitleField' => 'Name', // field, used in bluebar when editing existing item - 'SubItems' => Array ('gwfv', 'ptc'), + 'PermSection' => Array ('main' => 'in-commerce:payment_types'), - 'CalculatedFields' => Array ( - '' => Array ( - 'Gateway' => TABLE_PREFIX . 'Gateways.Name', - ), - ), + 'Sections' => Array ( + 'in-commerce:payment_types' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_payment_types', + 'label' => 'la_tab_PaymentTypes', + 'url' => Array ('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 5, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN ' . TABLE_PREFIX . 'Gateways ON %1$s.GatewayId = ' . TABLE_PREFIX . 'Gateways.GatewayId', - ), + 'TitleField' => 'Name', // field, used in bluebar when editing existing item + 'SubItems' => Array ('gwfv', 'ptc'), - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('Priority' => 'desc'), - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'Gateway' => TABLE_PREFIX . 'Gateways.Name', + ), + ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100), - 'Description' => Array ( - 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', - 'default' => null - ), - 'Instructions' => Array ( - 'type' => 'string', - 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'using_fck' => 1, - 'default' => null - ), - 'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'IsPrimary' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ), - 'GatewayId' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Gateways', - 'option_key_field' => 'GatewayId', - 'option_title_field' => 'Name', - 'default' => 1, 'not_null' => 1, - ), - 'PlacedOrdersEdit' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'), - 'PortalGroups' => Array ('type' => 'string', 'default' => null), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN ' . TABLE_PREFIX . 'Gateways ON %1$s.GatewayId = ' . TABLE_PREFIX . 'Gateways.GatewayId', + ), - 'VirtualFields' => Array ( - 'Gateway' => Array ('type' => 'string', 'default' => ''), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), - 'Name' => Array ( 'title' => 'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200), - 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 200), - 'BuiltIn' => Array ( 'title' => 'la_col_BuiltIn', 'filter_block' => 'grid_options_filter', 'width' => 100), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100), - ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100), + 'Description' => Array ( + 'type' => 'string', 'max_len' => 255, + 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', + 'default' => null + ), + 'Instructions' => Array ( + 'type' => 'string', + 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'using_fck' => 1, + 'default' => null + ), + 'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'IsPrimary' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ), + 'GatewayId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Gateways', + 'option_key_field' => 'GatewayId', + 'option_title_field' => 'Name', + 'default' => 1, 'not_null' => 1, + ), + 'PlacedOrdersEdit' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'), + 'PortalGroups' => Array ('type' => 'string', 'default' => null), + ), + + 'VirtualFields' => Array ( + 'Gateway' => Array ('type' => 'string', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), + 'Name' => Array ( 'title' => 'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200), + 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 200), + 'BuiltIn' => Array ( 'title' => 'la_col_BuiltIn', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/taxesdestinations/taxesdestinations_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/taxesdestinations/taxesdestinations_config.php (.../taxesdestinations_config.php) (revision 14582) +++ branches/5.2.x/units/taxesdestinations/taxesdestinations_config.php (.../taxesdestinations_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'taxdst', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'images.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'TaxDstEventHandler','file'=>'taxes_dst_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array(), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), +$config = Array ( + 'Prefix' => 'taxdst', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => 'images.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'TaxDstEventHandler', 'file' => 'taxes_dst_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'Hooks' => Array( - /*Array( - 'Mode' => hAFTER, - 'Conditional' => true, - 'HookToPrefix' => 'tax', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'onPreSave', 'onPreSaveAndGo' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnSaveDestinations', - ),*/ - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnPreSave', 'OnUpdate'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnZoneUpdate', - ), - ), + 'AutoLoad' => true, - //OnAfterItemUpdate - 'IDField' => 'TaxZoneDestId', - 'TableName' => TABLE_PREFIX.'TaxZonesDestinations', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ParentTableKey'=> 'TaxZoneId', // linked field in master table - 'ForeignKey' => 'TaxZoneId', // linked field in subtable - 'ParentPrefix' => 'tax', - 'AutoDelete' => true, - 'AutoClone' => true, + 'Hooks' => Array ( + /*Array ( + 'Mode' => hAFTER, + 'Conditional' => true, + 'HookToPrefix' => 'tax', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'onPreSave', 'onPreSaveAndGo' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnSaveDestinations', + ),*/ - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnPreSave', 'OnUpdate'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnZoneUpdate', + ), + ), - 'Fields' => Array ( - 'TaxZoneDestId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'TaxZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StdDestId' => Array ('type' => 'int', 'default' => 0), - 'DestValue' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), - ), - ); \ No newline at end of file + //OnAfterItemUpdate + 'IDField' => 'TaxZoneDestId', + 'TableName' => TABLE_PREFIX.'TaxZonesDestinations', + + 'ParentTableKey'=> 'TaxZoneId', // linked field in master table + 'ForeignKey' => 'TaxZoneId', // linked field in subtable + 'ParentPrefix' => 'tax', + 'AutoDelete' => true, + 'AutoClone' => true, + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), + + 'Fields' => Array ( + 'TaxZoneDestId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'TaxZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'StdDestId' => Array ('type' => 'int', 'default' => 0), + 'DestValue' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), + ), +); \ No newline at end of file Index: branches/5.2.x/units/product_option_combinations/product_option_combinations_config.php =================================================================== diff -u -N -r15719 -r16385 --- branches/5.2.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 15719) +++ branches/5.2.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 16385) @@ -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' => ''), - Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''), - ), - 'AutoLoad' => true, - 'Hooks' => Array ( +$config = Array ( + 'Prefix' => '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'), - ), - 'AggregateTags' => Array ( - ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'TitleField' => 'CombinationId', - 'IDField' => 'CombinationId', - 'TableName' => TABLE_PREFIX.'ProductOptionCombinations', - 'ForeignKey' => Array ('p' => 'ProductId'), - 'ParentTableKey' => Array ('p' => 'ProductId'), - 'ParentPrefix' => 'p', - 'AutoDelete' => true, - 'AutoClone' => true, + 'RegisterClasses' => Array ( + Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''), + Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''), + ), - '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', - ), - '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' => 'string', '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 ( - '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) - ) - )', - 'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price', - ), - ), - 'VirtualFields' => Array ( - 'FinalPrice' => Array ('type' => 'float', 'formatter' => 'kCombPriceFormatter', 'format' => '%.2f', 'default' => NULL), - 'BasePrice' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), - ), - 'Grids' => Array ( - 'Default' => 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 ( 'filter_block' => 'grid_like_filter'), - 'Availability' => Array ( 'filter_block' => 'grid_options_filter'), - 'Price' => Array ( 'data_block' => 'price_td', 'filter_block' => 'grid_range_filter'), -// 'Weight' => Array ( 'data_block' => 'weight_td', 'filter_block' => 'grid_range_filter'), - ), - ), + 'AutoLoad' => true, - 'Inventory' => 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 ('filter_block' => 'grid_like_filter'), - 'QtyInStock' => Array ('filter_block' => 'grid_range_filter'), - 'QtyReserved' => Array ('filter_block' => 'grid_range_filter'), - 'QtyBackOrdered' => Array ('filter_block' => 'grid_range_filter'), - 'QtyOnOrder' => Array ('filter_block' => 'grid_range_filter'), - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'Radio' => Array ( - 'Selector' => 'radio', - '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' => 'column:la_fld_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_range_filter'), -// 'Weight' => Array ('data_block' => 'weight_td', 'filter_block' => 'grid_range_filter'), - ), - ), - ), + 'TitleField' => 'CombinationId', + 'IDField' => 'CombinationId', + 'TableName' => TABLE_PREFIX.'ProductOptionCombinations', + 'ForeignKey' => Array ('p' => 'ProductId'), + 'ParentTableKey' => Array ('p' => 'ProductId'), + 'ParentPrefix' => 'p', + 'AutoDelete' => true, + 'AutoClone' => true, - ); \ No newline at end of file + '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', + ), + + 'ItemSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), + + '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' => 'string', '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 ( + '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) + ) + )', + 'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price', + ), + ), + + 'VirtualFields' => Array ( + 'FinalPrice' => Array ('type' => 'float', 'formatter' => 'kCombPriceFormatter', 'format' => '%.2f', 'default' => NULL), + 'BasePrice' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), + ), + + 'Grids' => Array ( + 'Default' => 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 ( 'filter_block' => 'grid_like_filter'), + 'Availability' => Array ( 'filter_block' => 'grid_options_filter'), + 'Price' => Array ( 'data_block' => 'price_td', 'filter_block' => 'grid_range_filter'), +// 'Weight' => Array ( 'data_block' => 'weight_td', 'filter_block' => 'grid_range_filter'), + ), + ), + + 'Inventory' => 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 ('filter_block' => 'grid_like_filter'), + 'QtyInStock' => Array ('filter_block' => 'grid_range_filter'), + 'QtyReserved' => Array ('filter_block' => 'grid_range_filter'), + 'QtyBackOrdered' => Array ('filter_block' => 'grid_range_filter'), + 'QtyOnOrder' => Array ('filter_block' => 'grid_range_filter'), + ), + ), + + 'Radio' => Array ( + 'Selector' => 'radio', + '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' => 'column:la_fld_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_range_filter'), +// 'Weight' => Array ('data_block' => 'weight_td', 'filter_block' => 'grid_range_filter'), + ), + ), + ), +); Index: branches/5.2.x/units/currencies/currencies_config.php =================================================================== diff -u -N -r15009 -r16385 --- branches/5.2.x/units/currencies/currencies_config.php (.../currencies_config.php) (revision 15009) +++ branches/5.2.x/units/currencies/currencies_config.php (.../currencies_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'curr', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'CurrenciesEventHandler', 'file' => 'currencies_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'CurrenciesTagProcessor', 'file' => 'currencies_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array (), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'curr', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'CurrenciesEventHandler', 'file' => 'currencies_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'CurrenciesTagProcessor', 'file' => 'currencies_tag_processor.php', 'build_event' => 'OnBuild'), - /*'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'tax', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'onEdit' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnLoadZoneForm', - ), - ),*/ - 'IDField' => 'CurrencyId', - 'StatusField' => Array ('Status', 'IsPrimary'), - 'TitleField' => 'ISO', - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('curr' => '!la_title_AddingCurrency!'), - 'edit_status_labels' => Array ('curr' => '!la_title_EditingCurrency!'), - 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), - ), - 'currencies_list' =>Array ( 'prefixes' => Array ('curr_List'), - 'format' => "!la_title_Currencies!", - ), - 'currencies_edit' =>Array ( 'prefixes' => Array ('curr'), - 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), - 'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!", - ), - ), + 'AutoLoad' => true, - 'PermSection' => Array ('main' => 'in-commerce:currencies'), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'Sections' => Array ( - 'in-commerce:currencies' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_currencies', - 'label' => 'la_tab_Currencies', - 'url' => Array ('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'), - 'priority' => 3, - 'type' => stTREE, - ), - ), + 'IDField' => 'CurrencyId', + 'StatusField' => Array ('Status', 'IsPrimary'), + 'TitleField' => 'ISO', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('curr' => '!la_title_AddingCurrency!'), + 'edit_status_labels' => Array ('curr' => '!la_title_EditingCurrency!'), + 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), + ), + 'currencies_list' =>Array ( + 'prefixes' => Array ('curr_List'), 'format' => "!la_title_Currencies!", + ), + 'currencies_edit' =>Array ( + 'prefixes' => Array ('curr'), + 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), + 'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!", + ), + ), - 'TableName' => TABLE_PREFIX.'Currencies', - 'AutoDelete' => true, - 'AutoClone' => true, + 'PermSection' => Array ('main' => 'in-commerce:currencies'), - 'SubItems' => Array (), + 'Sections' => Array ( + 'in-commerce:currencies' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_currencies', + 'label' => 'la_tab_Currencies', + 'url' => Array ('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'), + 'priority' => 3, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'LanguageLabels phr ON %1$s.Name = phr.Phrase' - ), + 'TableName' => TABLE_PREFIX.'Currencies', + 'AutoDelete' => true, + 'AutoClone' => true, - 'CalculatedFields' => Array ( - '' => Array ( - 'Translation' => 'phr.l%4$s_Translation', - ), - ), + 'SubItems' => Array (), - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'), - 'Sorting' => Array ('ISO' => 'asc'), - ) - ), - 'Fields' => Array ( - 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'Symbol' => Array ('type' => 'string', 'default' => null), - 'SymbolPosition' => Array ('type' => 'int', 'default' => null, 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'), 'use_phrases' => '1'), - 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1), - 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1, - ), - 'IsPrimary' => 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), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'LanguageLabels phr ON %1$s.Name = phr.Phrase' + ), - 'VirtualFields' => Array ( - 'Translation' => Array ('type' => 'string', 'default' => ''), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'Translation' => 'phr.l%4$s_Translation', + ), + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'CurrencyId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'ISO' => Array ( 'title' => 'column:la_fld_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 90, ), - 'Translation' => Array ( 'title' => 'column:la_fld_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter', 'width' => 250, ), - 'RateToPrimary' => Array ( 'title' => 'column:la_fld_RateToPrimary', 'filter_block' => 'grid_range_filter', 'width' => 130, ), - 'Modified' => Array ( 'title' => 'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), - 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'), + 'Sorting' => Array ('ISO' => 'asc'), + ) + ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'Symbol' => Array ('type' => 'string', 'default' => null), + 'SymbolPosition' => Array ('type' => 'int', 'default' => null, 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'), 'use_phrases' => '1'), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1), + 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + 'IsPrimary' => 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), + ), + + 'VirtualFields' => Array ( + 'Translation' => Array ('type' => 'string', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'CurrencyId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'ISO' => Array ( 'title' => 'column:la_fld_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 90, ), + 'Translation' => Array ( 'title' => 'column:la_fld_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter', 'width' => 250, ), + 'RateToPrimary' => Array ( 'title' => 'column:la_fld_RateToPrimary', 'filter_block' => 'grid_range_filter', 'width' => 130, ), + 'Modified' => Array ( 'title' => 'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), + 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), + ), + ), + ), +); Index: branches/5.2.x/units/shipping_quote_engines/shipping_quote_engines_config.php =================================================================== diff -u -N -r15134 -r16385 --- branches/5.2.x/units/shipping_quote_engines/shipping_quote_engines_config.php (.../shipping_quote_engines_config.php) (revision 15134) +++ branches/5.2.x/units/shipping_quote_engines/shipping_quote_engines_config.php (.../shipping_quote_engines_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'sqe', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ShippingQuoteEngineEventHandler', 'file' => 'shipping_quote_engine_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'RegisterClasses' => Array ( - Array ('pseudo' => 'ShippingQuoteEngine', 'class' => 'ShippingQuoteEngine', 'file' => 'shipping_quote_engine.php', 'build_event' => ''), - Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'build_event' => ''), - Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'build_event' => ''), - Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'build_event' => ''), - Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => ''), - ), - 'AutoLoad' => true, - 'Hooks' => Array ( - ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'EngineId', - 'StatusField' => Array ('Status'), - 'TitleField' => 'Name', +$config = Array ( + 'Prefix' => 'sqe', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ShippingQuoteEngineEventHandler', 'file' => 'shipping_quote_engine_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'TitlePresets' => Array ( - 'default' => Array ( 'edit_status_labels' => Array ('sqe' => '!la_title_EditingShippingQuoteEngine!'), - ), - 'engine_list' =>Array ( 'prefixes' => Array ('sqe_List'), - 'format' => "!la_title_ShippingQuoteEngines!", - ), - 'engine_edit' =>Array ( 'prefixes' => Array ('sqe'), - 'format' => "#sqe_status# '#sqe_titlefield#' - !la_title_General!", - ), - ), + 'RegisterClasses' => Array ( + Array ('pseudo' => 'ShippingQuoteEngine', 'class' => 'ShippingQuoteEngine', 'file' => 'shipping_quote_engine.php', 'build_event' => ''), + Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'build_event' => ''), + Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'build_event' => ''), + Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'build_event' => ''), + Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => ''), + ), - 'PermSection' => Array ('main' => 'in-commerce:shipping_quote_engines'), + 'AutoLoad' => true, - 'Sections' => Array ( - 'in-commerce:shipping_quote_engines' => Array ( - 'parent' => 'in-commerce:shipping_folder', - 'icon' => 'conf_shipping', - 'label' => 'la_tab_ShippingQuoteEngines', - 'url' => Array ('t' => 'in-commerce/shipping/shipping_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'edit', 'advanced:approve', 'advanced:decline'), - 'priority' => 4.2, - 'type' => stTAB, - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'TableName' => TABLE_PREFIX.'ShippingQuoteEngines', + 'IDField' => 'EngineId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'), - // key - special, value - list select sql - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'), + 'TitlePresets' => Array ( + 'default' => Array ( + 'edit_status_labels' => Array ('sqe' => '!la_title_EditingShippingQuoteEngine!'), + ), + 'engine_list' =>Array ( + 'prefixes' => Array ('sqe_List'), 'format' => "!la_title_ShippingQuoteEngines!", + ), + 'engine_edit' =>Array ( + 'prefixes' => Array ('sqe'), 'format' => "#sqe_status# '#sqe_titlefield#' - !la_title_General!", + ), + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'PermSection' => Array ('main' => 'in-commerce:shipping_quote_engines'), - 'Fields' => Array ( - 'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'FlatSurcharge' => Array ('type' => 'double', 'not_null' => 1, 'default' => '0'), - 'PercentSurcharge' => Array ('type' => 'double', 'not_null' => 1, 'default' => '0'), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, - 'error_msgs' => Array ( - 'curl_not_present' => '!la_error_EnableCurlFirst!', - 'from_info_not_filled_in' => '!la_error_FillInShippingFromAddress!', - ), - 'default' => 0, 'not_null' => 1, - ), - 'Properties' => Array ('type' => 'string', 'default' => NULL), - 'ClassName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - ), + 'Sections' => Array ( + 'in-commerce:shipping_quote_engines' => Array ( + 'parent' => 'in-commerce:shipping_folder', + 'icon' => 'conf_shipping', + 'label' => 'la_tab_ShippingQuoteEngines', + 'url' => Array ('t' => 'in-commerce/shipping/shipping_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'edit', 'advanced:approve', 'advanced:decline'), + 'priority' => 4.2, + 'type' => stTAB, + ), + ), - 'VirtualFields' => Array ( - 'AccountLogin' => Array ('type' => 'string', 'default' => ''), - 'AccountPassword' => Array ('type' => 'string', 'default' => ''), - 'UPSEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'UPSAccount' => Array ('type' => 'string', 'default' => ''), - 'UPSInvoiced' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), - 'default' => 0 - ), - 'FDXEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'FDXAccount' => Array ('type' => 'string', 'default' => ''), - 'FDXInvoiced' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), - 'default' => 0 - ), - 'DHLEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'DHLAccount' => Array ('type' => 'string', 'default' => ''), - 'DHLInvoiced' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), - 'default' => 0 - ), - 'USPEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'USPAccount' => Array ('type' => 'string', 'default' => ''), - 'USPInvoiced' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), - 'default' => 0 - ), - 'ARBEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'ARBAccount' => Array ('type' => 'string', 'default' => ''), - 'ARBInvoiced' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), - 'default' => 0 - ), - '1DYEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - '2DYEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - '3DYEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'GNDEnabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), - 'default' => 0 - ), - 'ShipMethod' => Array ( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( - 'DRP' => 'Drop-Off At Carrier Location', - 'PCK' => 'Schedule A Special Pickup', - 'SCD' => 'Regularly Scheduled Pickup'), - 'default' => null - ), - ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'EngineId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array ( 'title' => 'column:la_fld_ShippingQuoteEngineName', 'filter_block' => 'grid_like_filter', 'width' => 250, ), - 'FlatSurcharge' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 150, ), - 'PercentSurcharge' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 150, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ), - ), - ), - ), - ); \ No newline at end of file + 'TableName' => TABLE_PREFIX.'ShippingQuoteEngines', + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'FlatSurcharge' => Array ('type' => 'double', 'not_null' => 1, 'default' => '0'), + 'PercentSurcharge' => Array ('type' => 'double', 'not_null' => 1, 'default' => '0'), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, + 'error_msgs' => Array ( + 'curl_not_present' => '!la_error_EnableCurlFirst!', + 'from_info_not_filled_in' => '!la_error_FillInShippingFromAddress!', + ), + 'default' => 0, 'not_null' => 1, + ), + 'Properties' => Array ('type' => 'string', 'default' => NULL), + 'ClassName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + ), + + 'VirtualFields' => Array ( + 'AccountLogin' => Array ('type' => 'string', 'default' => ''), + 'AccountPassword' => Array ('type' => 'string', 'default' => ''), + 'UPSEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'UPSAccount' => Array ('type' => 'string', 'default' => ''), + 'UPSInvoiced' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), + 'default' => 0 + ), + 'FDXEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'FDXAccount' => Array ('type' => 'string', 'default' => ''), + 'FDXInvoiced' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), + 'default' => 0 + ), + 'DHLEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'DHLAccount' => Array ('type' => 'string', 'default' => ''), + 'DHLInvoiced' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), + 'default' => 0 + ), + 'USPEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'USPAccount' => Array ('type' => 'string', 'default' => ''), + 'USPInvoiced' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), + 'default' => 0 + ), + 'ARBEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'ARBAccount' => Array ('type' => 'string', 'default' => ''), + 'ARBInvoiced' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'), + 'default' => 0 + ), + '1DYEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + '2DYEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + '3DYEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'GNDEnabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'Enabled', 0 => 'Disabled'), + 'default' => 0 + ), + 'ShipMethod' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 'DRP' => 'Drop-Off At Carrier Location', + 'PCK' => 'Schedule A Special Pickup', + 'SCD' => 'Regularly Scheduled Pickup'), + 'default' => null + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'EngineId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ( 'title' => 'column:la_fld_ShippingQuoteEngineName', 'filter_block' => 'grid_like_filter', 'width' => 250, ), + 'FlatSurcharge' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 150, ), + 'PercentSurcharge' => Array ( 'filter_block' => 'grid_range_filter', 'width' => 150, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ), + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/products/products_config.php =================================================================== diff -u -N -r16145 -r16385 --- branches/5.2.x/units/products/products_config.php (.../products_config.php) (revision 16145) +++ branches/5.2.x/units/products/products_config.php (.../products_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'p', - 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'p', + 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'build_event' => 'OnBuild'), - 'CatalogItem' => true, - 'AdminTemplatePath' => 'products', - 'AdminTemplatePrefix' => 'products_', + 'AutoLoad' => true, - 'SearchConfigPostfix' => 'products', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'ConfigPriority' => 0, + 'CatalogItem' => true, + 'AdminTemplatePath' => 'products', + 'AdminTemplatePrefix' => 'products_', - 'RewritePriority' => 104, - 'RewriteListener' => 'CategoryItemRewrite:RewriteListener', + 'SearchConfigPostfix' => 'products', - 'Hooks' => Array ( - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'lst', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnBeforeCopyToLive' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnSaveVirtualProduct', - ), + 'ConfigPriority' => 0, - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'lst', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterItemDelete'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnDeleteListingType', - ), + 'RewritePriority' => 104, + 'RewriteListener' => 'CategoryItemRewrite:RewriteListener', - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'lst', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnModifyPaidListingConfig', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'lst', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnBeforeCopyToLive' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnSaveVirtualProduct', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'file', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnNew', 'OnEdit' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnPreSave', - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'lst', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterItemDelete'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnDeleteListingType', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => '', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => 'cdata', - 'DoSpecial' => '*', - 'DoEvent' => 'OnDefineCustomFields', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'lst', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnModifyPaidListingConfig', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'rev', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'file', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnNew', 'OnEdit' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnPreSave', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'fav', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => '', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => 'cdata', + 'DoSpecial' => '*', + 'DoEvent' => 'OnDefineCustomFields', + ), - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'ci', - 'HookToSpecial' => '*', - 'HookToEvent' => Array ('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCloneSubItem', - ), - ), + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rev', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), - 'IDField' => 'ProductId', - 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'fav', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), - 'TitleField' => 'Name', // field, used in bluebar when editing existing item - 'ItemType' => 11, // this is used when relation to product is added from in-portal and via-versa + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'ci', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + ), - 'ViewMenuPhrase' => 'la_text_Products', - 'CatalogTabIcon' => 'in-commerce:icon16_products.png', + 'IDField' => 'ProductId', + 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events - 'ItemPropertyMappings' => Array ( - 'NewDays' => 'Product_NewDays', // number of days item to be NEW - 'MinPopVotes' => 'Product_MinPopVotes', // minimum number of votes for an item to be POP - 'MinPopRating' => 'Product_MinPopRating', // minimum rating for an item to be POP - 'MaxHotNumber' => 'Product_MaxHotNumber', // maximum number of HOT (top seller) items + 'TitleField' => 'Name', // field, used in bluebar when editing existing item + 'ItemType' => 11, // this is used when relation to product is added from in-portal and via-versa - 'HotLimit' => 'Product_HotLimit', // variable name in inp_Cache table - 'ClickField' => 'Hits', // item click count is stored here (in item table) - ), + 'ViewMenuPhrase' => 'la_text_Products', + 'CatalogTabIcon' => 'in-commerce:icon16_products.png', - 'TitlePhrase' => 'la_text_Product', + 'ItemPropertyMappings' => Array ( + 'NewDays' => 'Product_NewDays', // number of days item to be NEW + 'MinPopVotes' => 'Product_MinPopVotes', // minimum number of votes for an item to be POP + 'MinPopRating' => 'Product_MinPopRating', // minimum rating for an item to be POP + 'MaxHotNumber' => 'Product_MaxHotNumber', // maximum number of HOT (top seller) items - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('p' => '!la_title_Adding_Product!'), - 'edit_status_labels' => Array ('p' => '!la_title_Editing_Product!'), - 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'), - ), - 'product_list' =>Array ( 'prefixes' => Array ('c_List', 'p_List'), - 'tag_params' => Array ('c' => Array ('per_page' =>-1)), - 'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Products! (#p_recordcount#)", - ), - 'products_edit' =>Array ( 'prefixes' => Array ('p'), - 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'), - 'format' => "#p_status# '#p_titlefield#' - !la_title_General!", - ), - 'inventory' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"), - 'pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"), - 'access_pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"), - 'access' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"), - 'files' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"), - 'options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"), - 'categories' => Array ('prefixes' => Array ('p', 'p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"), - 'relations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"), - 'content' => Array ('prefixes' => Array ('p', 'p.content_List'), 'tag_params' => Array ('p.content' => Array ('types' => 'content', 'live_table' =>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"), - 'images' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"), - 'reviews' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"), - 'products_custom' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"), - 'images_edit' => Array ( 'prefixes' => Array ('p', 'img'), - 'new_status_labels' => Array ('img' => '!la_title_Adding_Image!'), - 'edit_status_labels' => Array ('img' => '!la_title_Editing_Image!'), - 'new_titlefield' => Array ('img' => '!la_title_New_Image!'), - 'format' => "#p_status# '#p_titlefield#' - #img_status# '#img_titlefield#'", - ), - 'pricing_edit' => Array ( 'prefixes' => Array ('p', 'pr'), - 'new_status_labels' => Array ('pr' =>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"), - 'edit_status_labels' => Array ('pr' => '!la_title_Editing_PriceBracket!'), - 'format' => "#p_status# '#p_titlefield#' - #pr_status#", - ), - 'options_edit' => Array ( 'prefixes' => Array ('p', 'po'), - 'new_status_labels' => Array ('po' =>"!la_title_Adding_Option!"), - 'edit_status_labels' => Array ('po' => '!la_title_Editing_Option!'), - 'new_titlefield' => Array ('po' => '!la_title_New_Option!'), - 'format' => "#p_status# '#p_titlefield#' - #po_status# '#po_titlefield#'", - ), + 'HotLimit' => 'Product_HotLimit', // variable name in inp_Cache table + 'ClickField' => 'Hits', // item click count is stored here (in item table) + ), - 'options_combinations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"), - 'shipping_options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"), + 'TitlePhrase' => 'la_text_Product', - 'file_edit' => Array ( 'prefixes' => Array ('p', 'file'), - 'new_status_labels' => Array ('file' =>"!la_title_Adding_File!"), - 'edit_status_labels' => Array ('file' => '!la_title_Editing_File!'), - 'new_titlefield' => Array ('file' => '!la_title_New_File!'), - 'format' => "#p_status# '#p_titlefield#' - #file_status# '#file_titlefield#'", - ), - 'relations_edit' => Array ( 'prefixes' => Array ('p', 'rel'), - 'new_status_labels' => Array ('rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array ('rel' => '!la_title_Editing_Relationship!'), - 'format' => "#p_status# '#p_titlefield#' - #rel_status#", - ), - 'reviews_edit' => Array ( 'prefixes' => Array ('p', 'rev'), - 'new_status_labels' => Array ('rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array ('rev' => '!la_title_Editing_Review!'), - 'format' => "#p_status# '#p_titlefield#' - #rev_status#", - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('p' => '!la_title_Adding_Product!'), + 'edit_status_labels' => Array ('p' => '!la_title_Editing_Product!'), + 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'), + ), + 'product_list' =>Array ( + 'prefixes' => Array ('c_List', 'p_List'), + 'tag_params' => Array ('c' => Array ('per_page' =>-1)), + 'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Products! (#p_recordcount#)", + ), + 'products_edit' =>Array ( + 'prefixes' => Array ('p'), + 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'), + 'format' => "#p_status# '#p_titlefield#' - !la_title_General!", + ), + 'inventory' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"), + 'pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"), + 'access_pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"), + 'access' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"), + 'files' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"), + 'options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"), + 'categories' => Array ('prefixes' => Array ('p', 'p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"), + 'relations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"), + 'content' => Array ('prefixes' => Array ('p', 'p.content_List'), 'tag_params' => Array ('p.content' => Array ('types' => 'content', 'live_table' =>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"), + 'images' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"), + 'reviews' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"), + 'products_custom' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"), + 'images_edit' => Array ( + 'prefixes' => Array ('p', 'img'), + 'new_status_labels' => Array ('img' => '!la_title_Adding_Image!'), + 'edit_status_labels' => Array ('img' => '!la_title_Editing_Image!'), + 'new_titlefield' => Array ('img' => '!la_title_New_Image!'), + 'format' => "#p_status# '#p_titlefield#' - #img_status# '#img_titlefield#'", + ), + 'pricing_edit' => Array ( + 'prefixes' => Array ('p', 'pr'), + 'new_status_labels' => Array ('pr' =>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"), + 'edit_status_labels' => Array ('pr' => '!la_title_Editing_PriceBracket!'), + 'format' => "#p_status# '#p_titlefield#' - #pr_status#", + ), + 'options_edit' => Array ( + 'prefixes' => Array ('p', 'po'), + 'new_status_labels' => Array ('po' =>"!la_title_Adding_Option!"), + 'edit_status_labels' => Array ('po' => '!la_title_Editing_Option!'), + 'new_titlefield' => Array ('po' => '!la_title_New_Option!'), + 'format' => "#p_status# '#p_titlefield#' - #po_status# '#po_titlefield#'", + ), - 'products_export' => Array ('format' => '!la_title_ProductsExport!'), + 'options_combinations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"), + 'shipping_options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"), - 'products_import' => Array ('format' => '!la_title_ImportProducts!'), + 'file_edit' => Array ( + 'prefixes' => Array ('p', 'file'), + 'new_status_labels' => Array ('file' =>"!la_title_Adding_File!"), + 'edit_status_labels' => Array ('file' => '!la_title_Editing_File!'), + 'new_titlefield' => Array ('file' => '!la_title_New_File!'), + 'format' => "#p_status# '#p_titlefield#' - #file_status# '#file_titlefield#'", + ), + 'relations_edit' => Array ( + 'prefixes' => Array ('p', 'rel'), + 'new_status_labels' => Array ('rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), + 'edit_status_labels' => Array ('rel' => '!la_title_Editing_Relationship!'), + 'format' => "#p_status# '#p_titlefield#' - #rel_status#", + ), + 'reviews_edit' => Array ( + 'prefixes' => Array ('p', 'rev'), + 'new_status_labels' => Array ('rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"), + 'edit_status_labels' => Array ('rev' => '!la_title_Editing_Review!'), + 'format' => "#p_status# '#p_titlefield#' - #rev_status#", + ), - 'tree_in-commerce' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')), - ), + 'products_export' => Array ('format' => '!la_title_ProductsExport!'), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/products/products_edit', 'priority' => 1), - 'inventory' => Array ('title' => 'la_tab_Inventory', 't' => 'in-commerce/products/products_inventory', 'priority' => 2), - 'access_and_pricing' => Array ('title' => 'la_tab_AccessAndPricing', 't' => 'in-commerce/products/products_access', 'priority' => 3), - 'pricing' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_pricing', 'priority' => 4), + 'products_import' => Array ('format' => '!la_title_ImportProducts!'), -// 'pricing2' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_access_pricing', 'priority' => 5), + 'tree_in-commerce' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')), + ), - 'files_and_pricing' => Array ('title' => 'la_tab_FilesAndPricing', 't' => 'in-commerce/products/products_files', 'priority' => 6), - 'options' => Array ('title' => 'la_tab_Options', 't' => 'in-commerce/products/products_options', 'priority' => 7), - 'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-commerce/products/products_categories', 'priority' => 8), - 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-commerce/products/products_relations', 'priority' => 9), - 'package_content' => Array ('title' => 'la_tab_PackageContent', 't' => 'in-commerce/products/products_packagecontent', 'priority' => 10), - 'images' => Array ('title' => 'la_tab_Images', 't' => 'in-commerce/products/products_images', 'priority' => 11), - 'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-commerce/products/products_reviews', 'priority' => 12), - 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-commerce/products/products_custom', 'priority' => 13), - ), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/products/products_edit', 'priority' => 1), + 'inventory' => Array ('title' => 'la_tab_Inventory', 't' => 'in-commerce/products/products_inventory', 'priority' => 2), + 'access_and_pricing' => Array ('title' => 'la_tab_AccessAndPricing', 't' => 'in-commerce/products/products_access', 'priority' => 3), + 'pricing' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_pricing', 'priority' => 4), - 'PermItemPrefix' => 'PRODUCT', +// 'pricing2' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_access_pricing', 'priority' => 5), - 'PermTabText' => 'In-Commerce', - 'PermSection' => Array ('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'custom' => 'in-commerce:configuration_custom'), + 'files_and_pricing' => Array ('title' => 'la_tab_FilesAndPricing', 't' => 'in-commerce/products/products_files', 'priority' => 6), + 'options' => Array ('title' => 'la_tab_Options', 't' => 'in-commerce/products/products_options', 'priority' => 7), + 'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-commerce/products/products_categories', 'priority' => 8), + 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-commerce/products/products_relations', 'priority' => 9), + 'package_content' => Array ('title' => 'la_tab_PackageContent', 't' => 'in-commerce/products/products_packagecontent', 'priority' => 10), + 'images' => Array ('title' => 'la_tab_Images', 't' => 'in-commerce/products/products_images', 'priority' => 11), + 'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-commerce/products/products_reviews', 'priority' => 12), + 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-commerce/products/products_custom', 'priority' => 13), + ), + ), - 'Sections' => Array ( - 'in-commerce' => Array ( - 'parent' => 'in-portal:root', - 'icon' => 'ecommerce', - 'label' => 'la_title_In-Commerce', - 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 2.1, - 'container' => true, - 'type' => stTREE, - ), + 'PermItemPrefix' => 'PRODUCT', - 'in-commerce:products' => Array ( - 'parent' => 'in-portal:site', - 'icon' => 'products', - 'label' => 'la_tab_Products', - 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'), - 'onclick' => 'setCatalogTab(\'p.showall\')', - 'permissions' => Array ('view'), - 'priority' => 3.2, - 'type' => stTREE, - ), + 'PermTabText' => 'In-Commerce', + 'PermSection' => Array ('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'custom' => 'in-commerce:configuration_custom'), - // product settings - 'in-commerce:setting_folder' => Array ( - 'parent' => 'in-portal:system', - 'icon' => 'conf_ecommerce', - 'label' => 'la_title_In-Commerce', - 'use_parent_header' => 1, - 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view'), - 'priority' => 3.1, - 'container' => true, - 'type' => stTREE, - ), + 'Sections' => Array ( + 'in-commerce' => Array ( + 'parent' => 'in-portal:root', + 'icon' => 'ecommerce', + 'label' => 'la_title_In-Commerce', + 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 2.1, + 'container' => true, + 'type' => stTREE, + ), - 'in-commerce:general' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_ecommerce_general', - 'label' => 'la_tab_GeneralSettings', - 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit'), - 'priority' => 1, - 'type' => stTREE, - ), + 'in-commerce:products' => Array ( + 'parent' => 'in-portal:site', + 'icon' => 'products', + 'label' => 'la_tab_Products', + 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'), + 'onclick' => 'setCatalogTab(\'p.showall\')', + 'permissions' => Array ('view'), + 'priority' => 3.2, + 'type' => stTREE, + ), - 'in-commerce:output' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'core:conf_output', - 'label' => 'la_tab_ConfigOutput', - 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit'), - 'priority' => 2, - 'type' => stTREE, - ), + // product settings + 'in-commerce:setting_folder' => Array ( + 'parent' => 'in-portal:system', + 'icon' => 'conf_ecommerce', + 'label' => 'la_title_In-Commerce', + 'use_parent_header' => 1, + 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view'), + 'priority' => 3.1, + 'container' => true, + 'type' => stTREE, + ), - 'in-commerce:search' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'core:conf_search', - 'label' => 'la_tab_ConfigSearch', - 'url' => Array ('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'edit'), - 'priority' => 7, - 'type' => stTREE, - ), + 'in-commerce:general' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_ecommerce_general', + 'label' => 'la_tab_GeneralSettings', + 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit'), + 'priority' => 1, + 'type' => stTREE, + ), - 'in-commerce:configuration_custom' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'core:conf_customfields', - 'label' => 'la_tab_ConfigCustom', - 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 8, - 'type' => stTREE, - ), + 'in-commerce:output' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'core:conf_output', + 'label' => 'la_tab_ConfigOutput', + 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit'), + 'priority' => 2, + 'type' => stTREE, + ), - 'in-commerce:contacts' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_contact_info', - 'label' => 'la_tab_ConfigContacts', - 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit'), - 'priority' => 10, - 'type' => stTREE, - ), - ), + 'in-commerce:search' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'core:conf_search', + 'label' => 'la_tab_ConfigSearch', + 'url' => Array ('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), + 'priority' => 7, + 'type' => stTREE, + ), - 'FilterMenu' => Array ( - 'Groups' => Array ( - Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER), - Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER), - Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER), - Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER), - ), - 'Filters' => Array ( - 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array ('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), - ) - ), + 'in-commerce:configuration_custom' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'core:conf_customfields', + 'label' => 'la_tab_ConfigCustom', + 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 8, + 'type' => stTREE, + ), - 'TableName' => TABLE_PREFIX . 'Products', - 'CustomDataTableName' => TABLE_PREFIX . 'ProductsCustomData', + 'in-commerce:contacts' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_contact_info', + 'label' => 'la_tab_ConfigContacts', + 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit'), + 'priority' => 10, + 'type' => stTREE, + ), + ), - 'CalculatedFields' => Array ( - '' => Array ( - 'AltName' => 'img.AltName', - 'SameImages' => 'img.SameImages', - 'LocalThumb' => 'img.LocalThumb', - 'ThumbPath' => 'img.ThumbPath', - 'ThumbUrl' => 'img.ThumbUrl', - 'LocalImage' => 'img.LocalImage', - 'LocalPath' => 'img.LocalPath', - 'FullUrl' => 'img.Url', + 'FilterMenu' => Array ( + 'Groups' => Array ( + Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER), + ), + 'Filters' => Array ( + 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), + 'show_hot' => Array ('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), + 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), + 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), + ) + ), - 'Price' => 'COALESCE(pricing.Price, 0)', - 'Cost' => 'COALESCE(pricing.Cost, 0)', - 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'ParentPath' => TABLE_PREFIX.'Categories.ParentPath', - 'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', - 'FileSize' => 'files.Size', - 'FilePath' => 'files.FilePath', - 'FileVersion' => 'files.Version', - ), + 'TableName' => TABLE_PREFIX . 'Products', + 'CustomDataTableName' => TABLE_PREFIX . 'ProductsCustomData', - 'showall' => Array ( - 'Price' => 'COALESCE(pricing.Price, 0)', - 'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name', - 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', - 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', - 'FileSize' => 'files.Size', - 'FilePath' => 'files.FilePath', - 'FileVersion' => 'files.Version', - 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', - 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', - ), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'AltName' => 'img.AltName', + 'SameImages' => 'img.SameImages', + 'LocalThumb' => 'img.LocalThumb', + 'ThumbPath' => 'img.ThumbPath', + 'ThumbUrl' => 'img.ThumbUrl', + 'LocalImage' => 'img.LocalImage', + 'LocalPath' => 'img.LocalPath', + 'FullUrl' => 'img.Url', - 'CacheModRewrite' => true, + 'Price' => 'COALESCE(pricing.Price, 0)', + 'Cost' => 'COALESCE(pricing.Cost, 0)', + 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', + 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', + 'ParentPath' => TABLE_PREFIX.'Categories.ParentPath', + 'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name', + 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', + 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', + 'FileSize' => 'files.Size', + 'FilePath' => 'files.FilePath', + 'FileVersion' => 'files.Version', + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'UserGroups ON '.TABLE_PREFIX.'UserGroups.GroupId = %1$s.AccessGroupId - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - {PERM_JOIN} - LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 - LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 - LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId - LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', + 'showall' => Array ( + 'Price' => 'COALESCE(pricing.Price, 0)', + 'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name', + 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', + 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', + 'FileSize' => 'files.Size', + 'FilePath' => 'files.FilePath', + 'FileVersion' => 'files.Version', + 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', + 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', + ), + ), - 'showall' => 'SELECT %1$s.* %2$s FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 - LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 - LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - {PERM_JOIN} - LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), // key - special, value - list select sql - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('EditorsPick' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array ('Name' => 'asc'), - ) - ), - 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'UserGroups pg ON pg.GroupId = %1$s.AccessGroupId - LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId - LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 - LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 - LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId - LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - ), - 'SubItems' => Array ('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'), - 'Fields' => Array ( - 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 1, 'max_len' =>255, 'default' => ''), - 'AutomaticFilename' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, - ), - 'SKU' => Array ('type' => 'string', 'required' => 1, 'max_len' =>255, 'error_msgs' => Array ('required' => 'Please fill in'), 'default' => NULL), - 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL), - 'DescriptionExcerpt' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL), - 'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL), - 'MSRP' => Array ('type' => 'float', 'min_value_inc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL), - 'ManufacturerId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field' => 'ManufacturerId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, - 'default' => 2, 'not_null' => 1, - ), - 'BackOrder' => Array ('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ), - 'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array ('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL), - 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), - 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), - 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), - 'EditorsPick' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Featured' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'OnSale' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0), - 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null), - 'Type' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array ( - PRODUCT_TYPE_TANGIBLE => 'la_product_tangible', - PRODUCT_TYPE_SUBSCRIPTION => 'la_product_subscription', - PRODUCT_TYPE_SERVICE => 'la_product_service', - PRODUCT_TYPE_DOWNLOADABLE => 'la_product_downloadable', - /* PRODUCT_TYPE_PACKAGE => 'la_product_package', */ - ), - 'not_null' => 1, 'default' => 1, - ), - 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'ModifiedById' => Array ('type' => 'int', 'default' => NULL), - 'CreatedById' => Array ( - 'type' => 'int', - 'formatter' => 'kLEFTFormatter', - 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', - 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, - 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, - ), - 'ResourceId' => Array ('type' => 'int', 'default' => null), - 'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'QtyInStockMin' => 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), - 'InventoryComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'error_msgs' => Array ('invalid_format' => '!la_invalid_integer!')), - 'AccessGroupId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'UserGroups WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL), - 'AccessDuration' => Array ('type' => 'int', 'default' => NULL), - 'AccessDurationType' => 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' ), 'default' => NULL,), - 'AccessStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'AccessEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,), - 'OptionsSelectionMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0), - 'HasRequiredOptions' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1), - 'Virtual' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ProcessingData' => Array ('type' => 'string', 'default' => ''), - 'PackageContent' => Array ('type' => 'string', 'default' => NULL), - 'IsRecurringBilling' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 0, - ), - //'PayPalRecurring' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'), - 'ShippingMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default' =>0), + 'CacheModRewrite' => true, - 'ProcessingData' => Array ('type' => 'string', 'default' => null), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'UserGroups ON '.TABLE_PREFIX.'UserGroups.GroupId = %1$s.AccessGroupId + LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId + {PERM_JOIN} + LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 + LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 + LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 + LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId + LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', - 'ShippingLimitation' => Array ('type' => 'string', 'default' => NULL), - 'AssignedCoupon' => Array ( - 'type' => 'int', - 'formatter' => 'kLEFTFormatter', 'options' => Array (0 => 'None'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'ProductsCoupons WHERE %s', - 'left_key_field' => 'CouponId', 'left_title_field' => 'Name', - 'not_null' => 1, 'default' => 0, - ), - 'MinQtyFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'MetaKeywords' => Array ('type' => 'string', 'default' => null), - 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - ), + 'showall' => 'SELECT %1$s.* %2$s FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 + LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 + LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId + LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId + {PERM_JOIN} + LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', + ), - 'VirtualFields' => Array ( - 'Relevance' => Array ('type' => 'float', 'default' => 0), - 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'default' => 0), - 'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), - 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), - 'CategoryFilename' => Array ('type' => 'string', 'default' => ''), - 'PrimaryCat' => Array ('type' => 'int', 'default' => 0), - 'IsHot' => Array ('type' => 'int', 'default' => 0), - 'IsNew' => Array ('type' => 'int', 'default' => 0), - 'IsPop' => Array ('type' => 'int', 'default' => 0), - 'Manufacturer' => Array ('type' => 'string', 'default' => ''), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('EditorsPick' => 'desc', 'Priority' => 'desc'), + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - // export related fields: begin - 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0), - 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1), - 'ExportFilename' => Array ('type' => 'string', 'default' => ''), - 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ','), - 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'), - 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1), - 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2), - 'IncludeFieldTitles' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'default' => 1, - ), - 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), - 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), - 'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1), - 'CategorySeparator' => Array ('type' => 'string', 'default' => ':'), - 'IsBaseCategory' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'default' => 0, - ), - // export related fields: end + 'ItemSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'UserGroups pg ON pg.GroupId = %1$s.AccessGroupId + LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId + LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 + LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 + LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 + LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId + LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', + ), - // import related fields: begin - 'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1), - 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2), - 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''), - 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''), - 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1), - 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0), - 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Name' => 'NAME'), 'default' => '|Name|'), - 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1), - // import related fields: end + 'SubItems' => Array ('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'), - 'ThumbnailImage' => Array ('type' => 'string', 'default' => ''), - 'FullImage' => Array ('type' => 'string', 'default' => ''), - 'ImageAlt' => Array ('type' => 'string', 'default' => ''), + 'Fields' => Array ( + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 1, 'max_len' =>255, 'default' => ''), + 'AutomaticFilename' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + ), + 'SKU' => Array ('type' => 'string', 'required' => 1, 'max_len' =>255, 'error_msgs' => Array ('required' => 'Please fill in'), 'default' => NULL), + 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL), + 'DescriptionExcerpt' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL), + 'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL), + 'MSRP' => Array ('type' => 'float', 'min_value_inc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL), + 'ManufacturerId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field' => 'ManufacturerId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, + 'default' => 2, 'not_null' => 1, + ), + 'BackOrder' => Array ('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ), + 'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array ('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL), + 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), + 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), + 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ), + 'EditorsPick' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Featured' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'OnSale' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0), + 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + PRODUCT_TYPE_TANGIBLE => 'la_product_tangible', + PRODUCT_TYPE_SUBSCRIPTION => 'la_product_subscription', + PRODUCT_TYPE_SERVICE => 'la_product_service', + PRODUCT_TYPE_DOWNLOADABLE => 'la_product_downloadable', + /* PRODUCT_TYPE_PACKAGE => 'la_product_package', */ + ), + 'not_null' => 1, 'default' => 1, + ), + 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'ModifiedById' => Array ('type' => 'int', 'default' => NULL), + 'CreatedById' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', + 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, + ), + 'ResourceId' => Array ('type' => 'int', 'default' => null), + 'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), + 'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'QtyInStockMin' => 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), + 'InventoryComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'error_msgs' => Array ('invalid_format' => '!la_invalid_integer!')), + 'AccessGroupId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'UserGroups WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL), + 'AccessDuration' => Array ('type' => 'int', 'default' => NULL), + 'AccessDurationType' => 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' ), 'default' => NULL,), + 'AccessStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'AccessEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,), + 'OptionsSelectionMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0), + 'HasRequiredOptions' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1), + 'Virtual' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ProcessingData' => Array ('type' => 'string', 'default' => ''), + 'PackageContent' => Array ('type' => 'string', 'default' => NULL), + 'IsRecurringBilling' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 0, + ), + //'PayPalRecurring' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'), + 'ShippingMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default' =>0), - 'Filename' => Array ('type' => 'string', 'default' => ''), - 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), - 'ParentPath' => Array ('type' => 'string', 'default' => ''), + 'ProcessingData' => Array ('type' => 'string', 'default' => null), - 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'default' => 0), - 'FilePath' => Array ('type' => 'string', 'default' => ''), - 'FileVersion' => Array ('type' => 'string', 'default' => ''), + 'ShippingLimitation' => Array ('type' => 'string', 'default' => NULL), + 'AssignedCoupon' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', 'options' => Array (0 => 'None'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'ProductsCoupons WHERE %s', + 'left_key_field' => 'CouponId', 'left_title_field' => 'Name', + 'not_null' => 1, 'default' => 0, + ), + 'MinQtyFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'MetaKeywords' => Array ('type' => 'string', 'default' => null), + 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + ), - // for primary image - 'AltName' => Array ('type' => 'string', 'default' => ''), - 'SameImages' => Array ('type' => 'string', 'default' => ''), - 'LocalThumb' => Array ('type' => 'string', 'default' => ''), - 'ThumbPath' => Array ('type' => 'string', 'default' => ''), - 'ThumbUrl' => Array ('type' => 'string', 'default' => ''), - 'LocalImage' => Array ('type' => 'string', 'default' => ''), - 'LocalPath' => Array ('type' => 'string', 'default' => ''), - 'FullUrl' => Array ('type' => 'string', 'default' => ''), - ), + 'VirtualFields' => Array ( + 'Relevance' => Array ('type' => 'float', 'default' => 0), + 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'default' => 0), + 'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), + 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), + 'CategoryFilename' => Array ('type' => 'string', 'default' => ''), + 'PrimaryCat' => Array ('type' => 'int', 'default' => 0), + 'IsHot' => Array ('type' => 'int', 'default' => 0), + 'IsNew' => Array ('type' => 'int', 'default' => 0), + 'IsPop' => Array ('type' => 'int', 'default' => 0), + 'Manufacturer' => Array ('type' => 'string', 'default' => ''), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - 'NEW' => 'icon16_product_new.png', - ), - 'Fields' => Array ( - 'ProductId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Priority' => Array('filter_block' => 'grid_range_filter', 'width' => 65), - 'Type' => Array ('title' => 'column:la_fld_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ), - 'Manufacturer' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Price' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), - 'QtyInStock' => Array ('title' => 'column:la_fld_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ), - 'QtyBackOrdered' => Array ('title' => 'column:la_fld_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ), - 'OnSale' => Array ('title' => 'column:la_fld_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), - /*'Weight' => Array ( 'title' => 'la_col_ProductWeight', 'filter_block' => 'grid_range_filter', 'width' => 150, ), - 'CreatedOn' => Array ( 'title' => 'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), - 'BackOrderDate' => Array ( 'title' => 'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),*/ - ), - ), + // export related fields: begin + 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0), + 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1), + 'ExportFilename' => Array ('type' => 'string', 'default' => ''), + 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '), + 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'), + 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1), + 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2), + 'IncludeFieldTitles' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 1, + ), + 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), + 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''), + 'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1), + 'CategorySeparator' => Array ('type' => 'string', 'default' => ':'), + 'IsBaseCategory' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 0, + ), + // export related fields: end - 'Radio' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - 'NEW' => 'icon16_product_new.png', - ), - 'Selector' => 'radio', - 'Fields' => Array ( - 'ProductId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Priority' => Array('filter_block' => 'grid_range_filter', 'width' => 65), - 'Type' => Array ('title' => 'column:la_fld_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ), - 'Manufacturer' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Price' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), - 'QtyInStock' => Array ('title' => 'column:la_fld_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ), - 'QtyBackOrdered' => Array ('title' => 'column:la_fld_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ), + // import related fields: begin + 'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1), + 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2), + 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/', 'default' => ''), + 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''), + 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1), + 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0), + 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Name' => 'NAME'), 'default' => '|Name|'), + 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1), + // import related fields: end - ), - ), - ), + 'ThumbnailImage' => Array ('type' => 'string', 'default' => ''), + 'FullImage' => Array ('type' => 'string', 'default' => ''), + 'ImageAlt' => Array ('type' => 'string', 'default' => ''), - 'ConfigMapping' => Array ( - 'PerPage' => 'Comm_Perpage_Products', - 'ShortListPerPage' => 'Comm_Perpage_Products_Short', - 'ForceEditorPick' => 'products_EditorPicksAboveRegular', - 'DefaultSorting1Field' => 'product_OrderProductsBy', - 'DefaultSorting2Field' => 'product_OrderProductsThenBy', - 'DefaultSorting1Dir' => 'product_OrderProductsByDir', - 'DefaultSorting2Dir' => 'product_OrderProductsThenByDir', + 'Filename' => Array ('type' => 'string', 'default' => ''), + 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), + 'ParentPath' => Array ('type' => 'string', 'default' => ''), - 'RatingDelayValue' => 'product_RatingDelay_Value', - 'RatingDelayInterval' => 'product_RatingDelay_Interval', - ), - ); + 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'default' => 0), + 'FilePath' => Array ('type' => 'string', 'default' => ''), + 'FileVersion' => Array ('type' => 'string', 'default' => ''), + + // for primary image + 'AltName' => Array ('type' => 'string', 'default' => ''), + 'SameImages' => Array ('type' => 'string', 'default' => ''), + 'LocalThumb' => Array ('type' => 'string', 'default' => ''), + 'ThumbPath' => Array ('type' => 'string', 'default' => ''), + 'ThumbUrl' => Array ('type' => 'string', 'default' => ''), + 'LocalImage' => Array ('type' => 'string', 'default' => ''), + 'LocalPath' => Array ('type' => 'string', 'default' => ''), + 'FullUrl' => Array ('type' => 'string', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', + 'NEW' => 'icon16_product_new.png', + ), + 'Fields' => Array ( + 'ProductId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65), + 'Type' => Array ('title' => 'column:la_fld_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ), + 'Manufacturer' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Price' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), + 'QtyInStock' => Array ('title' => 'column:la_fld_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ), + 'QtyBackOrdered' => Array ('title' => 'column:la_fld_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ), + 'OnSale' => Array ('title' => 'column:la_fld_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), + /*'Weight' => Array ( 'title' => 'la_col_ProductWeight', 'filter_block' => 'grid_range_filter', 'width' => 150, ), + 'CreatedOn' => Array ( 'title' => 'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), + 'BackOrderDate' => Array ( 'title' => 'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),*/ + ), + ), + + 'Radio' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', + 'NEW' => 'icon16_product_new.png', + ), + 'Selector' => 'radio', + 'Fields' => Array ( + 'ProductId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65), + 'Type' => Array ('title' => 'column:la_fld_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ), + 'Manufacturer' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Price' => Array ('filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), + 'QtyInStock' => Array ('title' => 'column:la_fld_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ), + 'QtyBackOrdered' => Array ('title' => 'column:la_fld_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ), + + ), + ), + ), + + 'ConfigMapping' => Array ( + 'PerPage' => 'Comm_Perpage_Products', + 'ShortListPerPage' => 'Comm_Perpage_Products_Short', + 'ForceEditorPick' => 'products_EditorPicksAboveRegular', + 'DefaultSorting1Field' => 'product_OrderProductsBy', + 'DefaultSorting2Field' => 'product_OrderProductsThenBy', + 'DefaultSorting1Dir' => 'product_OrderProductsByDir', + 'DefaultSorting2Dir' => 'product_OrderProductsThenByDir', + + 'RatingDelayValue' => 'product_RatingDelay_Value', + 'RatingDelayInterval' => 'product_RatingDelay_Interval', + ), +); Index: branches/5.2.x/units/reports/reports_config.php =================================================================== diff -u -N -r16145 -r16385 --- branches/5.2.x/units/reports/reports_config.php (.../reports_config.php) (revision 16145) +++ branches/5.2.x/units/reports/reports_config.php (.../reports_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'rep', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'ReportsEventHandler', 'file' => 'reports_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'ReportsTagProcessor', 'file' => 'reports_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'rep', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ReportsEventHandler', 'file' => 'reports_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ReportsTagProcessor', 'file' => 'reports_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'Hooks' => Array( - Array( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'rep', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnUpdateConfig', - ), - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rep', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnUpdateConfig', + ), + ), - 'IDField' => 'CategoryId', + 'IDField' => 'CategoryId', - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('d' => '!la_title_Adding_Discount!'), - 'edit_status_labels' => Array('d' => '!la_title_Editing_Discount!'), - 'new_titlefield' => Array('d' => '!la_title_New_Discount!'), - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('d' => '!la_title_Adding_Discount!'), + 'edit_status_labels' => Array ('d' => '!la_title_Editing_Discount!'), + 'new_titlefield' => Array ('d' => '!la_title_New_Discount!'), + ), - 'report_options' =>Array('format' => "!la_title_ReportOptions!"), - 'report_results' =>Array('format' => "!la_title_ReportResults!"), - 'report_chart' =>Array('format' => "!la_title_SalesReportChart!"), - ), + 'report_options' =>Array ('format' => "!la_title_ReportOptions!"), + 'report_results' =>Array ('format' => "!la_title_ReportResults!"), + 'report_chart' =>Array ('format' => "!la_title_SalesReportChart!"), + ), - 'PermSection' => Array('main' => 'in-commerce:reports'), + 'PermSection' => Array ('main' => 'in-commerce:reports'), - 'Sections' => Array( - 'in-commerce:reports' => Array( - 'parent' => 'in-commerce', - 'icon' => 'in-commerce:sales_report', - 'label' => 'la_tab_SaleReports', - 'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event' => 'OnNew'), - 'permissions' => Array('view', 'add'), - 'priority' => 2, - 'type' => stTREE, - ), - ), + 'Sections' => Array ( + 'in-commerce:reports' => Array ( + 'parent' => 'in-commerce', + 'icon' => 'in-commerce:sales_report', + 'label' => 'la_tab_SaleReports', + 'url' => Array ('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event' => 'OnNew'), + 'permissions' => Array ('view', 'add'), + 'priority' => 2, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( '' => 'SELECT * FROM %1$s', - ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'CalculatedFields' => Array ( - '' => Array ( - 'CategoryId' => '0', - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'Fields' => Array( + 'CalculatedFields' => Array ( + '' => Array ( + 'CategoryId' => '0', + ), + ), - ), - 'VirtualFields' => Array( - 'ReportType' => array('formatter' => 'kOptionsFormatter', 'options' =>array( - 12 => 'la_Overall', - 1 => 'la_ByCategory', - 2 => 'la_ByUser', - 5 => 'la_byProduct' - ), - 'use_phrases' => 1, 'default' => 12, - ), - 'FromDateTime' => Array('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ), - 'ToDateTime' => Array('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ), - 'Recursive' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, - ), - 'SkipEmpty' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, - ), - 'CategoryId' => Array ('type' => 'int', 'default' => 0), - ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'Name' => Array('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'Start' => Array('filter_block' => 'grid_date_range_filter'), - 'End' => Array('filter_block' => 'grid_date_range_filter'), - 'GroupId' => Array( 'title' => 'column:la_fld_Group', 'filter_block' => 'grid_options_filter'), - 'Type' => Array('filter_block' => 'grid_options_filter'), - 'Amount' => Array('filter_block' => 'grid_range_filter'), - ), + 'VirtualFields' => Array ( + 'ReportType' => array('formatter' => 'kOptionsFormatter', 'options' =>array( + 12 => 'la_Overall', + 1 => 'la_ByCategory', + 2 => 'la_ByUser', + 5 => 'la_byProduct' + ), + 'use_phrases' => 1, 'default' => 12, + ), + 'FromDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ), + 'ToDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ), + 'Recursive' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + ), + 'SkipEmpty' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + ), + 'CategoryId' => Array ('type' => 'int', 'default' => 0), + ), - ), - ), - ); + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'Start' => Array ('filter_block' => 'grid_date_range_filter'), + 'End' => Array ('filter_block' => 'grid_date_range_filter'), + 'GroupId' => Array ( 'title' => 'column:la_fld_Group', 'filter_block' => 'grid_options_filter'), + 'Type' => Array ('filter_block' => 'grid_options_filter'), + 'Amount' => Array ('filter_block' => 'grid_range_filter'), + ), + ), + ), +); Index: branches/5.2.x/units/pricing/pricing_config.php =================================================================== diff -u -N -r16149 -r16385 --- branches/5.2.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 16149) +++ branches/5.2.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 16385) @@ -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'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => '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'), - 'Hooks' => Array ( - // for tangible products: pricings are always aranged before saveing product - Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array ('OnPreSave'), - 'DoPrefix' => '', - 'DoSpecial' => 'tang', - 'DoEvent' => 'OnArrange', - ), - ), + 'AutoLoad' => true, - 'AggregateTags' => Array ( - Array ( - 'AggregateTo' => '#PARENT#', - 'AggregatedTagName' => 'Price', - 'LocalTagName' => 'ProductPrice', - ), - Array ( - 'AggregateTo' => '#PARENT#', - 'AggregatedTagName' => 'ListPriceBrackets', - 'LocalTagName' => 'Product_ListPriceBrackets', - ), - Array ( - 'AggregateTo' => '#PARENT#', - 'AggregatedTagName' => 'HasQuantityPricing', - 'LocalTagName' => 'Product_HasQuantityPricing', - ), - ), + 'Hooks' => Array ( + // for tangible products: pricings are always aranged before saveing product + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnPreSave'), + 'DoPrefix' => '', + 'DoSpecial' => 'tang', + 'DoEvent' => 'OnArrange', + ), + ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'StatusField' => Array ('IsPrimary'), - 'IDField' => 'PriceId', - 'TableName' => TABLE_PREFIX.'ProductsPricing', + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => '#PARENT#', + 'AggregatedTagName' => 'Price', + 'LocalTagName' => 'ProductPrice', + ), + Array ( + 'AggregateTo' => '#PARENT#', + 'AggregatedTagName' => 'ListPriceBrackets', + 'LocalTagName' => 'Product_ListPriceBrackets', + ), + Array ( + 'AggregateTo' => '#PARENT#', + 'AggregatedTagName' => 'HasQuantityPricing', + 'LocalTagName' => 'Product_HasQuantityPricing', + ), + ), - 'ForeignKey' => 'ProductId', - 'ParentTableKey' => 'ProductId', - 'ParentPrefix' => 'p', - 'AutoDelete' => true, - 'AutoClone' => true, + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s', - ), - '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' => null), - 'MaxQty' => Array ('type' => 'int', 'default' => null), - '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, - 'default' => NULL, - ), - 'Points' => Array ('type' => 'int', 'default' => null), - '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), + 'StatusField' => Array ('IsPrimary'), + 'IDField' => 'PriceId', + 'TableName' => TABLE_PREFIX.'ProductsPricing', - /* TODO implement these fields in business logic - 'AccessRebillDate' => Array ( - 'type'=> 'int', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default' => 0, - ), - 'DurationType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( - 1 => 'la_opt_Interval', 2 => 'la_opt_Date', - ), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, - ), - 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'), - */ - ), + 'ForeignKey' => 'ProductId', + 'ParentTableKey' => 'ProductId', + 'ParentPrefix' => 'p', + 'AutoDelete' => true, + 'AutoClone' => true, - 'Grids' => array( - 'Access' => array( - 'Icons' => array( - 'default' => 'icon16_item.png', - '0' => 'icon16_item.png', - '1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => array( - 'AccessDuration' => array('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'AccessUnit' => array('title' => 'column:la_fld_AccessDurationUnit', 'filter_block' => 'grid_options_filter'), - 'Description' => array('filter_block' => 'grid_like_filter'), - 'Price' => array('filter_block' => 'grid_range_filter'), - ), + 'ListSQLs' => Array ( + ''=> ' SELECT * + FROM %s', + ), - ), - ), + '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' => null), + 'MaxQty' => Array ('type' => 'int', 'default' => null), + '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, + 'default' => NULL, + ), + 'Points' => Array ('type' => 'int', 'default' => null), + '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), + + /* TODO implement these fields in business logic + 'AccessRebillDate' => Array ( + 'type'=> 'int', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default' => 0, + ), + 'DurationType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 1 => 'la_opt_Interval', 2 => 'la_opt_Date', + ), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + ), + 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'), + */ + ), + + 'Grids' => array( + 'Access' => array( + 'Icons' => array( + 'default' => 'icon16_item.png', + '0' => 'icon16_item.png', + '1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => array( + 'AccessDuration' => array('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'AccessUnit' => array('title' => 'column:la_fld_AccessDurationUnit', 'filter_block' => 'grid_options_filter'), + 'Description' => array('filter_block' => 'grid_like_filter'), + 'Price' => array('filter_block' => 'grid_range_filter'), + ), + ), + ), +); Index: branches/5.2.x/units/manufacturers/manufacturers_config.php =================================================================== diff -u -N -r15557 -r16385 --- branches/5.2.x/units/manufacturers/manufacturers_config.php (.../manufacturers_config.php) (revision 15557) +++ branches/5.2.x/units/manufacturers/manufacturers_config.php (.../manufacturers_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'manuf', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ManufacturersEventHandler', 'file' => 'manufacturers_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ManufacturersTagProcessor', 'file' => 'manufacturers_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'manuf', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ManufacturersEventHandler', 'file' => 'manufacturers_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ManufacturersTagProcessor', 'file' => 'manufacturers_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'ManufacturerId', - 'StatusField' => Array (), - 'TableName' => TABLE_PREFIX.'Manufacturers', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'), - 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'), - ), - 'manuf_list' => Array ( - 'prefixes' => Array ('manuf_List'), 'format' => "!la_title_Manufacturers!", - ), - 'manuf_edit' => Array ( - 'prefixes' => Array ('manuf'), - 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'), - 'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!", - ), - ), + 'IDField' => 'ManufacturerId', + 'TableName' => TABLE_PREFIX.'Manufacturers', - 'PermSection' => Array ('main' => 'in-commerce:manufacturers'), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'), + 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'), + ), + 'manuf_list' => Array ( + 'prefixes' => Array ('manuf_List'), 'format' => "!la_title_Manufacturers!", + ), + 'manuf_edit' => Array ( + 'prefixes' => Array ('manuf'), + 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'), + 'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!", + ), + ), - 'Sections' => Array ( - 'in-commerce:manufacturers' => Array ( - 'parent' => 'in-commerce', - 'icon' => 'manufacturers', - 'label' => 'la_tab_Manufacturers', - 'url' => Array ('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 4, - 'type' => stTREE, - ), - ), + 'PermSection' => Array ('main' => 'in-commerce:manufacturers'), - 'TitleField' => 'Name', // field, used in bluebar when editing existing item + 'Sections' => Array ( + 'in-commerce:manufacturers' => Array ( + 'parent' => 'in-commerce', + 'icon' => 'manufacturers', + 'label' => 'la_tab_Manufacturers', + 'url' => Array ('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 4, + 'type' => stTREE, + ), + ), + 'TitleField' => 'Name', // field, used in bluebar when editing existing item - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s', - ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc'), - ) - ), - 'Fields' => Array ( - 'ManufacturerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' =>true, 'max_len' =>255), - 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'URL' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'max_len' =>255), - 'Logo' => Array ( - 'type' => 'string', - 'formatter' => 'kPictureFormatter', - 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH.'manufacturers/', - 'file_types' => '*.jpg;*.jpeg;*.gif;*.png;*.bmp', 'files_description' => '!la_hint_ImageFiles!', - 'multiple' => false, 'thumb_format' => 'resize:100x100', - 'max_len' => 255, 'not_null' => 1, 'default' => '' - ), - 'IsPopular' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Email' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') ), - 'Phone' => Array ('type' => 'string', 'default' => null), - 'Fax' => Array ('type' => 'string', 'default' => null), - 'Address1' => Array ('type' => 'string', 'default' => null), - 'Address2' => Array ('type' => 'string', 'default' => null), - 'City' => Array ('type' => 'string', 'default' => null), - 'State' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null), - 'Zip' => Array ('type' => 'string', 'default' => null), - 'Country' => Array ( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode - FROM '.TABLE_PREFIX.'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', 'default' => null - ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'ManufacturerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter', 'width' => 100, ), - 'URL' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ), - ), - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'ConfigMapping' => Array ( - 'PerPage' => 'Comm_Perpage_Manufacturers', - 'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short', - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'ManufacturerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' =>true, 'max_len' =>255), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'URL' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'max_len' =>255), + 'Logo' => Array ( + 'type' => 'string', + 'formatter' => 'kPictureFormatter', + 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH.'manufacturers/', + 'file_types' => '*.jpg;*.jpeg;*.gif;*.png;*.bmp', 'files_description' => '!la_hint_ImageFiles!', + 'multiple' => false, 'thumb_format' => 'resize:100x100', + 'max_len' => 255, 'not_null' => 1, 'default' => '' + ), + 'IsPopular' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Email' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') ), + 'Phone' => Array ('type' => 'string', 'default' => null), + 'Fax' => Array ('type' => 'string', 'default' => null), + 'Address1' => Array ('type' => 'string', 'default' => null), + 'Address2' => Array ('type' => 'string', 'default' => null), + 'City' => Array ('type' => 'string', 'default' => null), + 'State' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null), + 'Zip' => Array ('type' => 'string', 'default' => null), + 'Country' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM '.TABLE_PREFIX.'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', 'default' => null + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'ManufacturerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter', 'width' => 100, ), + 'URL' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ), + ), + ), + ), + + 'ConfigMapping' => Array ( + 'PerPage' => 'Comm_Perpage_Manufacturers', + 'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short', + ), +); Index: branches/5.2.x/units/zones/zones_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/zones/zones_config.php (.../zones_config.php) (revision 14582) +++ branches/5.2.x/units/zones/zones_config.php (.../zones_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'z', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ZonesEventHandler', 'file' => 'zones_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ZonesTagProcessor', 'file' => 'zones_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array (), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'ZoneID', - 'TitleField' => 'Name', - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('z' => '!la_title_AddingShippingZone!'), - 'edit_status_labels' => Array ('z' => '!la_title_EditingShippingZone!'), - ), - 'zones_edit' => Array ( 'prefixes' => Array ('z'), 'format' => "#z_status# - '#z_titlefield#'"), - ), - 'TableName' => TABLE_PREFIX . 'ShippingZones', - 'ForeignKey' => 'ShippingTypeID', //Name of the field in this table used as ForeignKey - 'ParentTableKey' => 'ShippingID', //Name of the field in parent table linked with ForeignKey - 'ParentPrefix' => 's', //Prefix of parent item - 'AutoDelete' => true, - 'AutoClone' => true, +$config = Array ( + 'Prefix' => 'z', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ZonesEventHandler', 'file' => 'zones_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ZonesTagProcessor', 'file' => 'zones_tag_processor.php', 'build_event' => 'OnBuild'), - 'SubItems' => Array ('dst', 'sc'), + 'AutoLoad' => true, - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'), - // key - special, value - list select sql - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Name' => 'asc'), - ) - ), - 'Fields' => Array ( - 'ZoneID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'ShippingTypeID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'Name' => Array ( - 'type' => 'string', 'max_len' => 100, - 'required' => 1, 'default' => '', 'not_null' => 1, - 'error_msgs' => Array ('required' => 'Please fill in'), - ), - 'Type' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, - 'options' => Array ( - 1 => 'la_ByCountry', - 2 => 'la_ByState', - 3 => 'la_ByZIP' - ), - 'not_null' => 1, 'default' => 1, - ), - 'CODallowed' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_NotAllowed', 1 => 'la_Allowed',), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1, - ), - ), + 'IDField' => 'ZoneID', + 'TitleField' => 'Name', - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'ZoneID' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array ( 'title' => 'column:la_fld_ShipZoneName', 'filter_block' => 'grid_like_filter', 'width' => 250, ), - 'Type' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), - 'CODallowed' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 120, ) - ), - ), - ), - ); \ No newline at end of file + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('z' => '!la_title_AddingShippingZone!'), + 'edit_status_labels' => Array ('z' => '!la_title_EditingShippingZone!'), + ), + 'zones_edit' => Array ( 'prefixes' => Array ('z'), 'format' => "#z_status# - '#z_titlefield#'"), + ), + + 'TableName' => TABLE_PREFIX . 'ShippingZones', + 'ForeignKey' => 'ShippingTypeID', //Name of the field in this table used as ForeignKey + 'ParentTableKey' => 'ShippingID', //Name of the field in parent table linked with ForeignKey + 'ParentPrefix' => 's', //Prefix of parent item + 'AutoDelete' => true, + 'AutoClone' => true, + + 'SubItems' => Array ('dst', 'sc'), + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'ZoneID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'ShippingTypeID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'Name' => Array ( + 'type' => 'string', 'max_len' => 100, + 'required' => 1, 'default' => '', 'not_null' => 1, + 'error_msgs' => Array ('required' => 'Please fill in'), + ), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 1 => 'la_ByCountry', + 2 => 'la_ByState', + 3 => 'la_ByZIP' + ), + 'not_null' => 1, 'default' => 1, + ), + 'CODallowed' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_NotAllowed', 1 => 'la_Allowed',), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'ZoneID' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ( 'title' => 'column:la_fld_ShipZoneName', 'filter_block' => 'grid_like_filter', 'width' => 250, ), + 'Type' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), + 'CODallowed' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 120, ) + ), + ), + ), +); \ No newline at end of file Index: branches/5.2.x/units/affiliates/affiliates_config.php =================================================================== diff -u -N -r15560 -r16385 --- branches/5.2.x/units/affiliates/affiliates_config.php (.../affiliates_config.php) (revision 15560) +++ branches/5.2.x/units/affiliates/affiliates_config.php (.../affiliates_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'affil', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'AffiliatesEventHandler','file'=>'affiliates_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'AffiliatesTagProcessor','file'=>'affiliates_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => 'register', - 'HookToEvent' => Array('OnBeforeItemCreate', 'OnBeforeItemUpdate'), - 'DoPrefix' => '', - 'DoSpecial' => 'register', - 'DoEvent' => 'OnValidateAffiliate', - ), +$config = Array ( + 'Prefix' => 'affil', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatesEventHandler', 'file' => 'affiliates_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AffiliatesTagProcessor', 'file' => 'affiliates_tag_processor.php', 'build_event' => 'OnBuild'), - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => 'register', - 'HookToEvent' => Array('OnCreate'), - 'DoPrefix' => '', - 'DoSpecial' => 'register', - 'DoEvent' => 'OnRegisterAffiliate', - ), + 'AutoLoad' => true, - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'adm', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnStartup'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnResetStatistics', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => 'register', + 'HookToEvent' => Array ('OnBeforeItemCreate', 'OnBeforeItemUpdate'), + 'DoPrefix' => '', + 'DoSpecial' => 'register', + 'DoEvent' => 'OnValidateAffiliate', + ), - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'adm', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnStartup'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnStoreAffiliate', - ), - ), - 'AggregateTags' => Array( - Array( - 'AggregateTo' => 'u', - 'AggregatedTagName' => 'IsAffiliate', - 'LocalTagName' => 'User_IsAffiliate', - ), - Array( - 'AggregateTo' => 'u', - 'AggregatedTagName' => 'AffiliateIsActive', - 'LocalTagName' => 'User_AffiliateIsActive', - ), - Array( - 'AggregateTo' => 'u', - 'AggregatedTagName' => 'AffiliateField', - 'LocalTagName' => 'CurrentUserAffiliateField', - ), - Array( - 'AggregateTo' => 'u', - 'AggregatedTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed', - 'LocalTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed', - ), - Array( - 'AggregateTo' => 'm', - 'AggregatedTagName' => 'RequireAffiliate', - 'LocalTagName' => 'Main_RequireAffiliate', - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'u', + 'HookToSpecial' => 'register', + 'HookToEvent' => Array ('OnCreate'), + 'DoPrefix' => '', + 'DoSpecial' => 'register', + 'DoEvent' => 'OnRegisterAffiliate', + ), - Array( - 'AggregateTo' => 'm', - 'AggregatedTagName' => 'AllowAffiliateRegistration', - 'LocalTagName' => 'AllowAffiliateRegistration', - ), - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'adm', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnStartup'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnResetStatistics', + ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'adm', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnStartup'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnStoreAffiliate', + ), + ), - 'IDField' => 'AffiliateId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events + 'AggregateTags' => Array ( + Array ( + 'AggregateTo' => 'u', + 'AggregatedTagName' => 'IsAffiliate', + 'LocalTagName' => 'User_IsAffiliate', + ), + Array ( + 'AggregateTo' => 'u', + 'AggregatedTagName' => 'AffiliateIsActive', + 'LocalTagName' => 'User_AffiliateIsActive', + ), + Array ( + 'AggregateTo' => 'u', + 'AggregatedTagName' => 'AffiliateField', + 'LocalTagName' => 'CurrentUserAffiliateField', + ), + Array ( + 'AggregateTo' => 'u', + 'AggregatedTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed', + 'LocalTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed', + ), + Array ( + 'AggregateTo' => 'm', + 'AggregatedTagName' => 'RequireAffiliate', + 'LocalTagName' => 'Main_RequireAffiliate', + ), + Array ( + 'AggregateTo' => 'm', + 'AggregatedTagName' => 'AllowAffiliateRegistration', + 'LocalTagName' => 'AllowAffiliateRegistration', + ), + ), - 'TitleField' => 'UserName', - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('affil'=>'!la_title_Adding_Affiliate!'), - 'edit_status_labels' => Array('affil'=>'!la_title_Editing_Affiliate!'), - 'new_titlefield' => Array('affil'=>'!la_title_New_Affiliate!'), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'affiliates_list' => Array('prefixes' => Array('affil_List'), 'format' => "!la_title_Affiliates!"), - 'affiliates_edit' => Array('prefixes' => Array('affil'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_General!"), - 'affiliate_payments' => Array('prefixes' => Array('affil', 'apayments_List'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_Payments!"), - 'affiliates_payout' => Array('prefixes' => Array('affil','apayments'), 'format' => "!la_title_PayOut_To! '#affil_titlefield#'"), - ), + 'IDField' => 'AffiliateId', + 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events - 'Forms' => Array ( - 'registration' => Array ( - 'VirtualFields' => Array ( - 'TermsAccepted' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'error_msgs' => Array ('required' => '!lu_comm_MustAgreeAffiliateTermsError!'), - 'required' => 1, 'default' => NULL, - ), - ) - ), - ), + 'TitleField' => 'UserName', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('affil' => '!la_title_Adding_Affiliate!'), + 'edit_status_labels' => Array ('affil' => '!la_title_Editing_Affiliate!'), + 'new_titlefield' => Array ('affil' => '!la_title_New_Affiliate!'), + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliates_edit', 'priority' => 1), - 'payments' => Array ('title' => 'la_tab_Payments', 't' => 'in-commerce/affiliate_plans/affiliate_edit_payments', 'priority' => 2), - ), - ), + 'affiliates_list' => Array ('prefixes' => Array ('affil_List'), 'format' => "!la_title_Affiliates!"), + 'affiliates_edit' => Array ('prefixes' => Array ('affil'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_General!"), + 'affiliate_payments' => Array ('prefixes' => Array ('affil', 'apayments_List'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_Payments!"), + 'affiliates_payout' => Array ('prefixes' => Array ('affil', 'apayments'), 'format' => "!la_title_PayOut_To! '#affil_titlefield#'"), + ), - 'PermSection' => Array('main' => 'in-commerce:affiliates'), + 'Forms' => Array ( + 'registration' => Array ( + 'VirtualFields' => Array ( + 'TermsAccepted' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'error_msgs' => Array ('required' => '!lu_comm_MustAgreeAffiliateTermsError!'), + 'required' => 1, 'default' => NULL, + ), + ) + ), + ), - 'Sections' => Array( - 'in-commerce:affiliates_folder' => Array( - 'parent' => 'in-commerce', - 'icon' => 'affiliates', - 'label' => 'la_tab_Affiliates', - 'use_parent_header' => 1, - 'permissions' => Array(), - 'priority' => 5, - 'type' => stTREE, - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliates_edit', 'priority' => 1), + 'payments' => Array ('title' => 'la_tab_Payments', 't' => 'in-commerce/affiliate_plans/affiliate_edit_payments', 'priority' => 2), + ), + ), - 'in-commerce:affiliates' => Array( - 'parent' => 'in-commerce:affiliates_folder', - 'icon' => 'affiliates', - 'label' => 'la_tab_Affiliates', - 'url' => Array('t' => 'in-commerce/affiliate_plans/affiliates_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), - 'priority' => 5.1, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'PermSection' => Array ('main' => 'in-commerce:affiliates'), - 'TableName' => TABLE_PREFIX.'Affiliates', + 'Sections' => Array ( + 'in-commerce:affiliates_folder' => Array ( + 'parent' => 'in-commerce', + 'icon' => 'affiliates', + 'label' => 'la_tab_Affiliates', + 'use_parent_header' => 1, + 'permissions' => Array (), + 'priority' => 5, + 'type' => stTREE, + ), - 'CalculatedFields' => Array( - '' => Array ( - 'UserId' => 'u.PortalUserId', - 'UserName' => 'IF(u.Username = "", u.Email, u.Username)', - 'PlanName' => 'ap.Name', - ), - ), + 'in-commerce:affiliates' => Array ( + 'parent' => 'in-commerce:affiliates_folder', + 'icon' => 'affiliates', + 'label' => 'la_tab_Affiliates', + 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliates_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), + 'priority' => 5.1, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId'), + 'TableName' => TABLE_PREFIX.'Affiliates', - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId - LEFT JOIN '.TABLE_PREFIX.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId'), - 'SubItems' => Array('apayments'), + 'CalculatedFields' => Array ( + '' => Array ( + 'UserId' => 'u.PortalUserId', + 'UserName' => 'IF(u.Username = "", u.Email, u.Username)', + 'PlanName' => 'ap.Name', + ), + ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('CreatedOn' => 'desc', 'UserName' => 'asc'), - ) - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.PortalUserId = u.PortalUserId + LEFT JOIN '.TABLE_PREFIX.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId' + ), - 'Fields' => Array( - 'AffiliateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PortalUserId' => Array('type' => 'int', 'unique'=>Array(), 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!', 'unique' => '!la_affiliate_already_exists!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'required' => 1, 'default' => null), - 'AffiliatePlanId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, AffiliatePlanId FROM '.TABLE_PREFIX.'AffiliatePlans WHERE Enabled = 1 ORDER BY Name', 'option_key_field'=>'AffiliatePlanId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0), - 'AccumulatedAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0.00'), - 'AmountToPay' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0.00'), - 'LastPaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'default' => NULL), - 'LastOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Active', 2=>'la_Pending', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => '1','default' => STATUS_PENDING), - 'AffiliateCode' => Array('type' => 'string', 'not_null' => '1', 'default' => ''), - 'ItemsSold' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(0 => ''), 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0), - 'SSN' => Array('type' => 'string','not_null' => '1','default' => '', 'required' => 1), - 'Comments' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - ), + 'SubItems' => Array ('apayments'), - 'VirtualFields' => Array( - 'UserName' => Array('type'=>'string', 'default' => ''), - 'PlanName' => Array('type'=>'string', 'default' => ''), - 'UserId' => Array('type'=>'int', 'default' => 0), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('CreatedOn' => 'desc', 'UserName' => 'asc'), + ) + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'AffiliateId' => Array( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'UserName' => Array( 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'), - 'PlanName' => Array( 'title'=>'la_col_PlanName', 'filter_block' => 'grid_like_filter'), + 'Fields' => Array ( + 'AffiliateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PortalUserId' => Array ('type' => 'int', 'unique'=>Array (), 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!', 'unique' => '!la_affiliate_already_exists!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'required' => 1, 'default' => null), + 'AffiliatePlanId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT Name, AffiliatePlanId FROM '.TABLE_PREFIX.'AffiliatePlans WHERE Enabled = 1 ORDER BY Name', 'option_key_field' => 'AffiliatePlanId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0), + 'AccumulatedAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'default' => '0.00'), + 'AmountToPay' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'default' => '0.00'), + 'LastPaymentDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'LastOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>Array (1=>'la_Active', 2=>'la_Pending', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => '1', 'default' => STATUS_PENDING), + 'AffiliateCode' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'ItemsSold' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PaymentTypeId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => ''), 'options_sql' => 'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field' => 'PaymentTypeId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0), + 'SSN' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => 1), + 'Comments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + ), - 'PaymentTypeId' => Array( 'title' => 'column:la_fld_PaymentType', 'filter_block' => 'grid_options_filter', 'width' => 120, ), - 'CreatedOn' => Array( 'title' => 'column:la_fld_RegisteredOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), - 'Status' => Array( 'filter_block' => 'grid_options_filter', 'width' => 100, ), - ), - ), + 'VirtualFields' => Array ( + 'UserName' => Array ('type' => 'string', 'default' => ''), + 'PlanName' => Array ('type' => 'string', 'default' => ''), + 'UserId' => Array ('type' => 'int', 'default' => 0), + ), - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'AffiliateId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'UserName' => Array ( 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'), + 'PlanName' => Array ( 'title' => 'la_col_PlanName', 'filter_block' => 'grid_like_filter'), + + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_PaymentType', 'filter_block' => 'grid_options_filter', 'width' => 120, ), + 'CreatedOn' => Array ( 'title' => 'column:la_fld_RegisteredOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ), + 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), + ), + ), + ), +); Index: branches/5.2.x/units/helpers/helpers_config.php =================================================================== diff -u -N -r15134 -r16385 --- branches/5.2.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 15134) +++ branches/5.2.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 16385) @@ -2,17 +2,16 @@ defined('FULL_PATH') or die('restricted access!'); - $config = Array ( +$config = Array ( + 'Prefix' => 'in-commerce-helpers', - 'Prefix' => 'in-commerce-helpers', + 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - - 'RegisterClasses' => Array ( - Array ('pseudo' => 'OrderHelper', 'class' => 'OrderHelper', 'file' => 'order_helper.php', 'build_event' => ''), - Array ('pseudo' => 'CurrencyRates', 'class' => 'CurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''), - Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'BankLVCurrencyRates', 'file' => 'bank_lv_currency_rates.php', 'build_event' => ''), - Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'ECBCurrencyRates', 'file' => 'ecb_currency_rates.php', 'build_event' => ''), - Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'FRNYCurrencyRates', 'file' => 'frny_currency_rates.php', 'build_event' => ''), - ), - ); + 'RegisterClasses' => Array ( + Array ('pseudo' => 'OrderHelper', 'class' => 'OrderHelper', 'file' => 'order_helper.php', 'build_event' => ''), + Array ('pseudo' => 'CurrencyRates', 'class' => 'CurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''), + Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'BankLVCurrencyRates', 'file' => 'bank_lv_currency_rates.php', 'build_event' => ''), + Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'ECBCurrencyRates', 'file' => 'ecb_currency_rates.php', 'build_event' => ''), + Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'FRNYCurrencyRates', 'file' => 'frny_currency_rates.php', 'build_event' => ''), + ), +); \ No newline at end of file Index: branches/5.2.x/units/shipping_costs/shipping_costs_config.php =================================================================== diff -u -N -r14582 -r16385 --- branches/5.2.x/units/shipping_costs/shipping_costs_config.php (.../shipping_costs_config.php) (revision 14582) +++ branches/5.2.x/units/shipping_costs/shipping_costs_config.php (.../shipping_costs_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'sc', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'ShippingCostsEventHandler','file'=>'shipping_costs_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => true, - 'HookToPrefix' => 's', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'OnPreSaveAndGoToTab', 'OnPreSaveAndGo', 'OnPreSave', 'OnFlip', 'OnApplyModifier' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnCreate', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'ShippingCostId', - 'TableName' => TABLE_PREFIX.'ShippingCosts', - 'ForeignKey' => Array('z' => 'ZoneID', 'br' => 'BracketId'), - 'ParentTableKey' => Array('z' => 'ZoneID', 'br' => 'BracketId'), - 'ParentPrefix' => 'z', - 'AutoDelete' => true, - 'AutoClone' => true, +$config = Array ( + 'Prefix' => 'sc', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ShippingCostsEventHandler', 'file' => 'shipping_costs_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'ListSQLs' => Array( ''=> 'SELECT * FROM %s'), - // key - special, value - list select sql - 'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'), + 'AutoLoad' => true, - 'Fields' => Array( - 'ShippingCostId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ZoneID' => Array('type' => 'int', 'not_null' => true, 'default' => 0), - 'BracketId' => Array('type' => 'int', 'not_null' => true, 'default' => 0), - 'Flat' => Array('type' => 'double', 'formatter' => 'kFormatter', 'default' => 0), - 'PerUnit' => Array('type' => 'double', 'formatter' => 'kFormatter', 'default' => 0), - ), - ); \ No newline at end of file + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => true, + 'HookToPrefix' => 's', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'OnPreSaveAndGoToTab', 'OnPreSaveAndGo', 'OnPreSave', 'OnFlip', 'OnApplyModifier' ), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnCreate', + ), + ), + + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), + + 'IDField' => 'ShippingCostId', + 'TableName' => TABLE_PREFIX.'ShippingCosts', + 'ForeignKey' => Array ('z' => 'ZoneID', 'br' => 'BracketId'), + 'ParentTableKey' => Array ('z' => 'ZoneID', 'br' => 'BracketId'), + 'ParentPrefix' => 'z', + 'AutoDelete' => true, + 'AutoClone' => true, + + 'ListSQLs' => Array ( + ''=> ' SELECT * + FROM %s' + ), + + 'Fields' => Array ( + 'ShippingCostId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ZoneID' => Array ('type' => 'int', 'not_null' => true, 'default' => 0), + 'BracketId' => Array ('type' => 'int', 'not_null' => true, 'default' => 0), + 'Flat' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'default' => 0), + 'PerUnit' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'default' => 0), + ), +); \ No newline at end of file Index: branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_config.php =================================================================== diff -u -N -r15009 -r16385 --- branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_config.php (.../affiliate_plans_items_config.php) (revision 15009) +++ branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_config.php (.../affiliate_plans_items_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'api', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'AffiliatePlansItemsEventHandler','file'=>'affiliate_plans_items_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'AffiliatePlansItemsTagProcessor','file'=>'affiliate_plans_items_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnAfterItemDelete'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnDeleteDiscountedItem', - ), - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'AffiliateItemId', - 'StatusField' => Array('Status'), - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'AffiliatePlansItems', +$config = Array ( + 'Prefix' => 'api', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatePlansItemsEventHandler', 'file' => 'affiliate_plans_items_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AffiliatePlansItemsTagProcessor', 'file' => 'affiliate_plans_items_tag_processor.php', 'build_event' => 'OnBuild'), - 'CalculatedFields' => Array( - '' => Array( - 'ProductId' => 'p.ProductId', - 'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)', - 'SKU' => 'p.SKU', - 'Weight' => 'p.Weight', - 'CreatedOn' => 'p.CreatedOn', - 'BackOrderDate' => 'p.BackOrderDate', - 'Status' => 'p.Status', - 'CategoryId' => 'c.CategoryId', + 'AutoLoad' => true, - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnAfterItemDelete'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnDeleteDiscountedItem', + ), + ), - ), - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Categories c ON %1$s.ItemResourceId = c.ResourceId', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ForeignKey' => 'AffiliatePlanId', - 'ParentTableKey' => 'AffiliatePlanId', - 'ParentPrefix' => 'ap', - 'AutoDelete' => true, - 'AutoClone' => true, + 'IDField' => 'AffiliateItemId', + 'StatusField' => Array ('Status'), + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'AffiliatePlansItems', - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('ItemName' => 'asc'), - ) - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'ProductId' => 'p.ProductId', + 'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)', + 'SKU' => 'p.SKU', + 'Weight' => 'p.Weight', + 'CreatedOn' => 'p.CreatedOn', + 'BackOrderDate' => 'p.BackOrderDate', + 'Status' => 'p.Status', + 'CategoryId' => 'c.CategoryId', + ), + ), - 'Fields' => Array ( - 'AffiliateItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'AffiliatePlanId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'ItemResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'ItemType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'not_null' => 1, 'default' => 1, ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId + LEFT JOIN '.TABLE_PREFIX.'Categories c ON %1$s.ItemResourceId = c.ResourceId', + ), - 'VirtualFields' => Array( - 'ProductId' => Array('type' => 'int', 'default' => 0), - 'ItemName' => Array('type' => 'string', 'default' => ''), - 'SKU' => Array('type' => 'string', 'default' => ''), - 'Weight' => Array('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL), - 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, - 'default' => 2, - ), - 'CategoryId' => Array ('type' => 'int', 'default' => 0), - ), + 'ForeignKey' => 'AffiliatePlanId', + 'ParentTableKey' => 'AffiliatePlanId', + 'ParentPrefix' => 'ap', + 'AutoDelete' => true, + 'AutoClone' => true, - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array('default'=>'icon16_entire_order.gif'), - 'Fields' => Array( - 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td' ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('ItemName' => 'asc'), + ) + ), - ), - 'AffiliatePlansItems' => Array( - 'Icons' => Array( - 'default' => 'icon16_product.png', - 0 => 'icon16_product_disabled.png', - 1 => 'icon16_product.png', - 2 => 'icon16_product_pending.png', - ), - 'Fields' => Array( - 'ProductId' => Array('title' => 'column:la_fld_Id', 'data_block' => 'grid_item_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'ItemName' => Array('filter_block' => 'grid_like_filter'), - 'ItemType' => Array('title' => 'la_col_ItemType', 'filter_block' => 'grid_options_filter'), - ), + 'Fields' => Array ( + 'AffiliateItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'AffiliatePlanId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'ItemResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ), + 'ItemType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'not_null' => 1, 'default' => 1, ), + ), - ), - ), - ); \ No newline at end of file + 'VirtualFields' => Array ( + 'ProductId' => Array ('type' => 'int', 'default' => 0), + 'ItemName' => Array ('type' => 'string', 'default' => ''), + 'SKU' => Array ('type' => 'string', 'default' => ''), + 'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, + 'default' => 2, + ), + 'CategoryId' => Array ('type' => 'int', 'default' => 0), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_entire_order.gif'), + 'Fields' => Array ( + 'ItemType' => Array ( 'title' => 'la_col_ItemType', 'data_block' => 'grid_checkbox_td' ), + ), + ), + + 'AffiliatePlansItems' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_product.png', + 0 => 'icon16_product_disabled.png', + 1 => 'icon16_product.png', + 2 => 'icon16_product_pending.png', + ), + 'Fields' => Array ( + 'ProductId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_item_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'ItemName' => Array ('filter_block' => 'grid_like_filter'), + 'ItemType' => Array ('title' => 'la_col_ItemType', 'filter_block' => 'grid_options_filter'), + ), + ), + ), +); \ No newline at end of file