Index: branches/5.1.x/units/affiliate_plans_items/affiliate_plans_items_config.php =================================================================== diff -u -N -r13156 -r13959 --- branches/5.1.x/units/affiliate_plans_items/affiliate_plans_items_config.php (.../affiliate_plans_items_config.php) (revision 13156) +++ branches/5.1.x/units/affiliate_plans_items/affiliate_plans_items_config.php (.../affiliate_plans_items_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array( - 'ProductId' => Array(), - 'ItemName' => Array(), - 'SKU' => Array(), - 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'), - 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL), + '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' => 0), + '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( Index: branches/5.1.x/install/upgrades.sql =================================================================== diff -u -N -r13809 -r13959 --- branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13809) +++ branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13959) @@ -180,3 +180,15 @@ # ===== v 5.1.0 ===== ALTER TABLE Products CHANGE CachedRating CachedRating varchar(10) NOT NULL default '0'; + +# ===== v 5.1.1-B1 ===== +ALTER TABLE Orders CHANGE ShippingOption ShippingOption TINYINT(4) NOT NULL DEFAULT '0'; + +ALTER TABLE ProductFiles CHANGE AddedById AddedById INT(11) NULL DEFAULT NULL; +UPDATE ProductFiles SET AddedById = NULL WHERE AddedById = 0; + +ALTER TABLE Products + CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL , + CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL; +UPDATE Products SET CreatedById = NULL WHERE CreatedById = 0; +UPDATE Products SET ModifiedById = NULL WHERE ModifiedById = 0; Index: branches/5.1.x/units/files/files_config.php =================================================================== diff -u -N -r13938 -r13959 --- branches/5.1.x/units/files/files_config.php (.../files_config.php) (revision 13938) +++ branches/5.1.x/units/files/files_config.php (.../files_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'AddedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'AddedById' => Array ('type' => 'int', 'default' => NULL), 'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), ), Index: branches/5.1.x/units/pricing/pricing_config.php =================================================================== diff -u -N -r13898 -r13959 --- branches/5.1.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 13898) +++ branches/5.1.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ( 'PriceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'MinQty' => Array ('type' => 'int', 'default' => 0), - 'MaxQty' => Array ('type' => 'int', 'default' => 0), + '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 ( @@ -91,7 +91,7 @@ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, 'default' => NULL, ), - 'Points' => Array ('type' => 'int', 'default' => 0), + '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), Index: branches/5.1.x/units/addresses/addresses_config.php =================================================================== diff -u -N -r13465 -r13959 --- branches/5.1.x/units/addresses/addresses_config.php (.../addresses_config.php) (revision 13465) +++ branches/5.1.x/units/addresses/addresses_config.php (.../addresses_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array( - 'ShortAddress' => Array('type'=>'string'), + 'ShortAddress' => Array('type'=>'string', 'default' => ''), ), 'Grids' => Array(), Index: branches/5.1.x/install/install_schema.sql =================================================================== diff -u -N -r13809 -r13959 --- branches/5.1.x/install/install_schema.sql (.../install_schema.sql) (revision 13809) +++ branches/5.1.x/install/install_schema.sql (.../install_schema.sql) (revision 13959) @@ -171,7 +171,7 @@ ReturnTotal decimal(20,4) NOT NULL DEFAULT '0.0000', CostTotal decimal(20,4) NOT NULL DEFAULT '0.0000', OriginalAmount decimal(20,4) NOT NULL DEFAULT '0.0000', - ShippingOption tinyint(4) DEFAULT NULL, + ShippingOption tinyint(4) NOT NULL DEFAULT '0', ShippingInfo text, CouponId int(11) DEFAULT NULL, CouponDiscount decimal(20,4) NOT NULL DEFAULT '0.0000', @@ -301,11 +301,11 @@ Modified int(10) unsigned DEFAULT NULL, Expire int(10) unsigned DEFAULT NULL, Hits double NOT NULL DEFAULT '0', - CachedRating varchar(10) NOT NULL default '0', + CachedRating varchar(10) NOT NULL DEFAULT '0', CachedVotesQty int(11) NOT NULL DEFAULT '0', CachedReviewsQty int(11) NOT NULL DEFAULT '0', - CreatedById int(11) NOT NULL DEFAULT '0', - ModifiedById int(11) NOT NULL DEFAULT '0', + CreatedById int(11) DEFAULT NULL, + ModifiedById int(11) DEFAULT NULL, Priority int(11) NOT NULL DEFAULT '0', `Status` tinyint(4) NOT NULL DEFAULT '2', EditorsPick tinyint(4) NOT NULL DEFAULT '0', @@ -444,7 +444,7 @@ IsPrimary tinyint(4) NOT NULL DEFAULT '0', Priority smallint(6) NOT NULL DEFAULT '0', AddedOn int(11) DEFAULT NULL, - AddedById int(11) NOT NULL DEFAULT '0', + AddedById int(11) DEFAULT NULL, MIMEType varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (FileId), KEY ProductId (ProductId), Index: branches/5.1.x/units/discount_items/discount_items_config.php =================================================================== diff -u -N -r13156 -r13959 --- branches/5.1.x/units/discount_items/discount_items_config.php (.../discount_items_config.php) (revision 13156) +++ branches/5.1.x/units/discount_items/discount_items_config.php (.../discount_items_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ( 'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'DiscountId' => Array('type' => 'int', 'default' => 0, ), - 'ItemResourceId' => Array('type' => 'int', '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(), - 'ItemName' => Array(), - 'SKU' => Array(), - 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'), - 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL), + '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' => 0), + '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( Index: branches/5.1.x/units/order_items/order_items_config.php =================================================================== diff -u -N -r13156 -r13959 --- branches/5.1.x/units/order_items/order_items_config.php (.../order_items_config.php) (revision 13156) +++ branches/5.1.x/units/order_items/order_items_config.php (.../order_items_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array('type'=>'int','default'=>0), 'DiscountType' => Array('type'=>'string','default'=>''), 'DiscountId' => Array('type'=>'int','default'=>0), - 'Name' => Array('formatter' => 'kMultiLanguage'), + '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', 'not_null' => 1, 'default' => 0,), + 'MinQtyFreeShipping'=> Array('type' => 'int', 'default' => 0,), ), 'Grids' => Array ( Index: branches/5.1.x/units/orders/orders_config.php =================================================================== diff -u -N -r13938 -r13959 --- branches/5.1.x/units/orders/orders_config.php (.../orders_config.php) (revision 13938) +++ branches/5.1.x/units/orders/orders_config.php (.../orders_config.php) (revision 13959) @@ -1,6 +1,6 @@ TABLE_PREFIX . 'Orders', + 'TableName' => TABLE_PREFIX . 'Orders', 'CalculatedFields' => Array ( '' => Array ( @@ -399,7 +399,7 @@ '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', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default' =>0), + 'ShippingOption' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'not_null' => 1, 'default' =>0), 'ShippingGroupOption' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default' =>0), 'GiftCertificateId' => Array ('type' => 'int', 'default' => null), 'GiftCertificateDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',), @@ -436,11 +436,15 @@ 'VirtualFields' => Array ( 'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'), - 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), - 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'), + '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'), '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 ResetToUser 'UserTo' => Array ('type' => 'string', 'default' => ''), @@ -456,16 +460,11 @@ 'UserCountry' => Array ('type' => 'string', 'default' => ''), // for Search - 'Username' => Array ('type' => 'string', 'filter_type' => 'like'), - 'OrderSearchId' => Array ('type' => 'int', 'filter_type' => 'equals', 'filter_field' => 'OrderId'), - '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) ), - 'FromAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_from', 'filter_field' => 'TotalAmount'), - 'ToAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_to', 'filter_field' => 'TotalAmount'), - 'HasBackOrders' => Array ('default' =>false), - 'PaymentCVV2' => Array ('type' => 'string', 'default' =>false), - 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like'), - 'AffiliatePortalUserId' => Array ('type' => 'int'), + '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), // export related fields: begin 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1), @@ -478,18 +477,18 @@ 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + 'use_phrases' => 1, 'default' => 1, ), - 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()), - 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()), - 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()), + '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, 'not_null' => 1, 'default' => 0, + 'use_phrases' => 1, 'default' => 0, ), - 'ExportPresetName' => Array ('type' => 'string'), + 'ExportPresetName' => Array ('type' => 'string', 'default' => ''), // export related fields: end ), 'Grids' => Array ( Index: branches/5.1.x/units/payment_type/payment_type_config.php =================================================================== diff -u -N -r13938 -r13959 --- branches/5.1.x/units/payment_type/payment_type_config.php (.../payment_type_config.php) (revision 13938) +++ branches/5.1.x/units/payment_type/payment_type_config.php (.../payment_type_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ('Name' => 'asc'), ) ), - + 'Fields' => Array ( 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100), @@ -106,15 +106,15 @@ '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, + '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, + '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 ), @@ -128,18 +128,18 @@ ), 'PlacedOrdersEdit' => Array ( 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + '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 ( - 'Qty' => 1, + 'Gateway' => Array ('type' => 'string', 'default' => ''), ), - */ + 'Grids' => Array ( 'Default' => Array ( 'Icons' => Array ( Index: branches/5.1.x/units/products/products_config.php =================================================================== diff -u -N -r13938 -r13959 --- branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 13938) +++ branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 13959) @@ -1,6 +1,6 @@ TABLE_PREFIX . 'Products', - + 'CalculatedFields' => Array ( '' => Array ( 'AltName' => 'img.AltName', @@ -492,9 +492,9 @@ 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null), 'Type' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ), 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'ModifiedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array ('type' => 'int', 'default' => 0), + 'ModifiedById' => Array ('type' => 'int', 'default' => NULL), + 'CreatedById' => Array ('type' => 'int', '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), @@ -539,13 +539,15 @@ ), 'VirtualFields' => Array ( - 'Qty' => 1, + '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), - 'IsHot' => Array ('type' => 'int'), - 'IsNew' => Array ('type' => 'int'), - 'IsPop' => Array ('type' => 'int'), - 'Manufacturer' => Array (), + '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' => ''), // export related fields: begin 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0), @@ -559,24 +561,24 @@ 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + 'use_phrases' => 1, 'default' => 1, ), - 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()), - 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()), + '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, 'not_null' => 1, 'default' => 0, + 'use_phrases' => 1, 'default' => 0, ), // export related fields: end // 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 . '/'), + '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), @@ -588,13 +590,13 @@ 'FullImage' => Array ('type' => 'string', 'default' => ''), 'ImageAlt' => Array ('type' => 'string', 'default' => ''), - 'Filename' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'Filename' => Array ('type' => 'string', 'default' => ''), 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), 'ParentPath' => Array ('type' => 'string', 'default' => ''), - 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0), - 'FilePath' => Array (), - 'FileVersion' => Array (), + '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' => ''), Index: branches/5.1.x/units/affiliate_payments/affiliate_payments_config.php =================================================================== diff -u -N -r13156 -r13959 --- branches/5.1.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 13156) +++ branches/5.1.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array( - 'Username' => Array('type' => 'string'), - 'PortalUserId' => Array('type' => 'int'), + 'Username' => Array('type' => 'string', 'default' => ''), + 'PortalUserId' => Array('type' => 'int', 'default' => 0), ), 'Grids' => Array( Index: branches/5.1.x/units/coupon_items/coupon_items_config.php =================================================================== diff -u -N -r13156 -r13959 --- branches/5.1.x/units/coupon_items/coupon_items_config.php (.../coupon_items_config.php) (revision 13156) +++ branches/5.1.x/units/coupon_items/coupon_items_config.php (.../coupon_items_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ( 'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'CouponId' => Array('type' => 'int', 'default' => 0, ), - 'ItemResourceId' => Array('type' => 'int', 'default' => 0, ), + 'CouponId' => 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(), - 'ItemName' => Array(), - 'SKU' => Array(), - 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'), - 'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'BackOrderDate' => Array('formatter' => 'kDateFormatter', 'default' => NULL), + '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' => 0), + '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( Index: branches/5.1.x/units/gateways/gateways_config.php =================================================================== diff -u -N -r13156 -r13959 --- branches/5.1.x/units/gateways/gateways_config.php (.../gateways_config.php) (revision 13156) +++ branches/5.1.x/units/gateways/gateways_config.php (.../gateways_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ( 'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), - 'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ), - 'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => 0, ), - 'ElementType' => Array('type' => 'string', '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(), + 'Value' => Array('type' => 'string', 'default' => ''), ), 'Grids' => Array( Index: branches/5.1.x/units/shipping_quote_engines/shipping_quote_engines_config.php =================================================================== diff -u -N -r13938 -r13959 --- branches/5.1.x/units/shipping_quote_engines/shipping_quote_engines_config.php (.../shipping_quote_engines_config.php) (revision 13938) +++ branches/5.1.x/units/shipping_quote_engines/shipping_quote_engines_config.php (.../shipping_quote_engines_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ('Name' => 'asc'), ) ), - + 'Fields' => Array ( 'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), @@ -97,82 +97,96 @@ ), 'VirtualFields' => Array ( - 'AccountLogin' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'AccountPassword' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + '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', 'not_null' => 1, 'default' => ''), + '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', 'not_null' => 1, 'default' => ''), + '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', 'not_null' => 1, 'default' => ''), + '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', 'not_null' => 1, 'default' => ''), + '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', 'not_null' => 1, 'default' => ''), + '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', @@ -181,6 +195,7 @@ 'DRP' => 'Drop-Off At Carrier Location', 'PCK' => 'Schedule A Special Pickup', 'SCD' => 'Regularly Scheduled Pickup'), + 'default' => null ), ), 'Grids' => Array ( Index: branches/5.1.x/units/affiliates/affiliates_config.php =================================================================== diff -u -N -r13578 -r13959 --- branches/5.1.x/units/affiliates/affiliates_config.php (.../affiliates_config.php) (revision 13578) +++ branches/5.1.x/units/affiliates/affiliates_config.php (.../affiliates_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array( 'UserName' => Array('type'=>'string', 'default' => ''), 'PlanName' => Array('type'=>'string', 'default' => ''), + 'UserId' => Array('type'=>'int', 'default' => 0), ), 'Grids' => Array( Index: branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php =================================================================== diff -u -N -r13549 -r13959 --- branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 13549) +++ branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 13959) @@ -1,6 +1,6 @@ Array ('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ), 'Availability' => Array ( 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + '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, ), @@ -91,7 +91,8 @@ ), ), 'VirtualFields' => Array ( - 'FinalPrice' => Array ('formatter' => 'kCombPriceFormatter', 'format' => '%.2f'), + 'FinalPrice' => Array ('type' => 'float', 'formatter' => 'kCombPriceFormatter', 'format' => '%.2f', 'default' => NULL), + 'BasePrice' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), ), 'Grids' => Array ( 'Default' => Array (