Index: branches/5.3.x/units/orders/orders_config.php =================================================================== diff -u -N -r16392 -r16398 --- branches/5.3.x/units/orders/orders_config.php (.../orders_config.php) (revision 16392) +++ branches/5.3.x/units/orders/orders_config.php (.../orders_config.php) (revision 16398) @@ -1,6 +1,6 @@ hAFTER, 'Conditional' => false, 'HookToPrefix' => 'u', - 'HookToSpecial' => '', + 'HookToSpecial' => '*', 'HookToEvent' => Array ( 'OnCreate' ), 'DoPrefix' => '', - 'DoSpecial' => '', + 'DoSpecial' => '*', 'DoEvent' => 'OnUserCreate', ), @@ -116,6 +116,16 @@ 'DoSpecial' => '', 'DoEvent' => 'OnRestoreOrder', ), + array( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'conf', + 'HookToSpecial' => '', + 'HookToEvent' => array('OnBeforeItemValidate'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnBeforeNextOrderNumberChange', + ), ), 'AggregateTags' => Array ( @@ -254,11 +264,11 @@ '' => 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(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )', - 'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)', - 'SubtotalWithDiscount' => '(SubTotal)', - 'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0)-IF(VATIncluded=1,VAT,0))', - 'TotalAmount' => 'SubTotal+ShippingCost+IF(VATIncluded=1,0,VAT)+ProcessingFee+InsuranceFee-GiftCertificateDiscount', + '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))', @@ -269,11 +279,11 @@ ), 'myorders' => Array ( - 'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )', - 'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)', - 'SubtotalWithDiscount' => '(SubTotal)', - 'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0)-IF(VATIncluded=1,VAT,0))', - 'TotalAmount' => 'SubTotal+ShippingCost+IF(VATIncluded=1,0,VAT)+ProcessingFee+InsuranceFee-GiftCertificateDiscount', + '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', ), @@ -446,7 +456,7 @@ 'TransactionStatus' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_opt_Invalid', 1 => 'la_opt_Verified', 2 => 'la_opt_Penging'), + '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),