Index: branches/5.2.x/units/taxes/taxes_config.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/taxes/taxes_config.php (.../taxes_config.php) (revision 14258) +++ branches/5.2.x/units/taxes/taxes_config.php (.../taxes_config.php) (revision 14569) @@ -1,6 +1,6 @@ 'TaxZoneId', 'TitleField' => 'Name', + 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('tax' => '!la_title_AddingTaxZone!'), - 'edit_status_labels' => Array ('tax' => '!la_title_EditingTaxZone!'), - 'new_titlefield' => Array ('tax' => '!la_title_NewTaxZone!'), - ), - '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!", - ), - - - ), + '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!", + ), + ), + 'PermSection' => Array ('main' => 'in-commerce:taxes'), 'Sections' => Array ( Index: branches/5.2.x/admin_templates/discounts/coupon_clone_selector.tpl =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/admin_templates/discounts/coupon_clone_selector.tpl (.../coupon_clone_selector.tpl) (revision 14258) +++ branches/5.2.x/admin_templates/discounts/coupon_clone_selector.tpl (.../coupon_clone_selector.tpl) (revision 14569) @@ -31,42 +31,10 @@
- - - - - - - - - - - - - + +
- -   - -
- : -   - - (mm.dd.yy) - -   (h:mm:ss AM) -
- -
- - - - - \ No newline at end of file + \ No newline at end of file Index: branches/5.2.x/admin_templates/products/file_edit.tpl =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/admin_templates/products/file_edit.tpl (.../file_edit.tpl) (revision 14258) +++ branches/5.2.x/admin_templates/products/file_edit.tpl (.../file_edit.tpl) (revision 14569) @@ -17,7 +17,32 @@ } ) ); + a_toolbar.AddButton( new ToolBarSeparator('sep1') ); + + a_toolbar.AddButton( new ToolBarButton('prev', '', function() { + go_to_id('file', ''); + } + )); + + a_toolbar.AddButton( new ToolBarButton('next', '', function() { + go_to_id('file', ''); + } + )); + a_toolbar.Render(); + + + a_toolbar.HideButton('prev'); + a_toolbar.HideButton('next'); + a_toolbar.HideButton('sep1'); + + + a_toolbar.DisableButton('next'); + + + a_toolbar.DisableButton('prev'); + + Index: branches/5.2.x/admin_templates/orders/orders_edit_preview.tpl =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/admin_templates/orders/orders_edit_preview.tpl (.../orders_edit_preview.tpl) (revision 14258) +++ branches/5.2.x/admin_templates/orders/orders_edit_preview.tpl (.../orders_edit_preview.tpl) (revision 14569) @@ -362,11 +362,11 @@ - 43" class="order-totals-name">: + 43" class="order-totals-name">: - 43" class="order-totals-name">: + 43" class="order-totals-name">: Index: branches/5.2.x/units/gateways/gw_classes/multicards.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/gateways/gw_classes/multicards.php (.../multicards.php) (revision 14258) +++ branches/5.2.x/units/gateways/gw_classes/multicards.php (.../multicards.php) (revision 14569) @@ -1,6 +1,6 @@ Load($order_id); $url = $this->Application->GetVar('user2'); - echo ''.$this->Application->Phrase('la_multicards_continue').''; + echo ''.$this->Application->Phrase('lu_text_MulticardsContinue').''; return 1; } Index: branches/5.2.x/admin_templates/products/images_edit.tpl =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/admin_templates/products/images_edit.tpl (.../images_edit.tpl) (revision 14258) +++ branches/5.2.x/admin_templates/products/images_edit.tpl (.../images_edit.tpl) (revision 14569) @@ -19,15 +19,24 @@ } ) ); - a_toolbar.AddButton( new ToolBarSeparator('sep2') ); + a_toolbar.AddButton( new ToolBarSeparator('sep1') ); + a_toolbar.AddButton( new ToolBarButton('prev', '', function() { + go_to_id('img', ''); + } + )); + + a_toolbar.AddButton( new ToolBarButton('next', '', function() { + go_to_id('img', ''); + } + )); + a_toolbar.Render(); a_toolbar.HideButton('prev'); a_toolbar.HideButton('next'); - a_toolbar.HideButton('sep1'); - a_toolbar.HideButton('sep2'); + a_toolbar.HideButton('sep1'); a_toolbar.DisableButton('next'); Index: branches/5.2.x/install/upgrades.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/install/upgrades.php (.../upgrades.php) (revision 14258) +++ branches/5.2.x/install/upgrades.php (.../upgrades.php) (revision 14569) @@ -1,6 +1,6 @@ Array ('Core' => '5.1.1-B2'), '5.1.1-RC1' => Array ('Core' => '5.1.1-RC1'), '5.1.1' => Array ('Core' => '5.1.1'), + '5.1.2-B1' => Array ('Core' => '5.1.2-B1'), + '5.1.2-B2' => Array ('Core' => '5.1.2-B2'), + '5.1.2-RC1' => Array ('Core' => '5.1.2-RC1'), + '5.1.2' => Array ('Core' => '5.1.2'), ); } Index: branches/5.2.x/units/reports/reports_tag_processor.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/reports/reports_tag_processor.php (.../reports_tag_processor.php) (revision 14258) +++ branches/5.2.x/units/reports/reports_tag_processor.php (.../reports_tag_processor.php) (revision 14569) @@ -1,6 +1,6 @@ setID(1); $object->SetDBField('Metric', $metric); -// echo '
';
-//		print_r($a_report_options);
-//		echo date('m/d/Y H:i:s', $a_report_options['from']).'
'; -// echo date('m/d/Y H:i:s', $a_report_options['to']).'
'; - if (!($a_report_options['from'] && $a_report_options['to'])) { // calculate from & to as extreme order dates $sql = 'SELECT MAX(OrderDate) AS date_to, MIN(OrderDate) AS date_frm @@ -333,7 +328,7 @@ { $a_data[0] = Array( 'Metric' => $other_metric, - 'Name' => $this->Application->Phrase('la_Others'), + 'Name' => $this->Application->Phrase('la_text_Others'), ); } } Index: branches/5.2.x/units/gateways/gateways_config.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/gateways/gateways_config.php (.../gateways_config.php) (revision 14258) +++ branches/5.2.x/units/gateways/gateways_config.php (.../gateways_config.php) (revision 14569) @@ -1,6 +1,6 @@ 'GWConfigFieldId', 'TableName' => TABLE_PREFIX.'GatewayConfigFields', - 'ListSQLs' => Array (''=>'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), + 'ListSQLs' => Array ( + '' => 'SELECT * FROM %s', + ), // key - special, value - list select sql + + 'ItemSQLs' => Array ( + ''=>'SELECT * FROM %s', + ), 'Fields' => Array ( 'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), @@ -65,21 +68,7 @@ 'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ), ), - 'VirtualFields' => Array ( - 'Value' => Array('type' => 'string', 'default' => ''), - ), - - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'FieldName' => Array( 'title'=>'la_Fields' ), - 'Value' => Array( 'title'=>'la_Value' ), - ), - - ), - ), + 'VirtualFields' => Array ( + 'Value' => Array('type' => 'string', 'default' => ''), + ), ); \ No newline at end of file Index: branches/5.2.x/units/orders/orders_config.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/orders/orders_config.php (.../orders_config.php) (revision 14258) +++ branches/5.2.x/units/orders/orders_config.php (.../orders_config.php) (revision 14569) @@ -1,6 +1,6 @@ false, 'HookToPrefix' => 'u', 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'OnLogin' ), + 'HookToEvent' => Array ( 'OnAfterLogin' ), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'OnUserLogin', @@ -176,17 +176,9 @@ 'orders_gw_result' => Array ('prefixes' => Array ('ord'), 'format' => "!la_title_OrderGWResult!"), - 'order_items_edit' => Array ( 'prefixes' => Array ('ord', 'orditems'), - 'new_status_labels' => Array ('orditems' => '!la_title_Adding_Order_Item!'), - 'edit_status_labels' => Array ('orditems' => '!la_title_Editing_Order_Item!'), - 'new_titlefield' => Array ('orditems' => '!la_title_New_Order_Item!'), - 'format' => "#ord_status# '#ord_titlefield#' - #orditems_status# '#orditems_titlefield#'", - ), + 'orders_export' => Array ('format' => '!la_title_OrdersExport!'), - 'orders_export' => Array ('format' => '!la_title_OrdersExport!'), - - 'orders_product_edit' => Array ('format' => '!la_title_Editing_Order_Item!'), - + 'orders_product_edit' => Array ('format' => '!la_title_Editing_Order_Item!'), ), 'EditTabPresets' => Array ( @@ -404,15 +396,32 @@ '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'), '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), + '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_Invalid', 1 => 'la_Verified', 2 => 'la_Penging'), 'use_phrases' =>1, 'not_null' => 1, 'default' => 2), + 'TransactionStatus' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_opt_Invalid', 1 => 'la_opt_Verified', 2 => 'la_opt_Penging'), + '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.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'Login', 'not_null' =>1, 'default' =>0), Index: branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 14258) +++ branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 14569) @@ -1,6 +1,6 @@ 'AffiliatePaymentId', - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('apayments'=>'!la_title_Adding_Affiliate_Payment!'), - 'edit_status_labels' => Array('apayments'=>'!la_title_Editing_Affiliate_Payment!'), - 'new_titlefield' => Array('apayments'=>'!la_title_New_Affiliate_Payment!'), - ), - 'payments_log' => Array('prefixes' => Array('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!"), + 'TitlePresets' => Array ( + 'payments_log' => Array ( + 'prefixes' => Array ('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!", + ), + ), - ), - 'Sections' => Array( 'in-commerce:paymentlog' => Array( 'parent' => 'in-commerce', Index: branches/5.2.x/units/coupon_items/coupon_items_config.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/coupon_items/coupon_items_config.php (.../coupon_items_config.php) (revision 14258) +++ branches/5.2.x/units/coupon_items/coupon_items_config.php (.../coupon_items_config.php) (revision 14569) @@ -1,6 +1,6 @@ 'CouponItemId', - 'StatusField' => Array('Status'), - 'TitleField' => 'Name', + 'StatusField' => Array('Status'), 'TableName' => TABLE_PREFIX . 'ProductsCouponItems', 'ForeignKey' => 'CouponId', Index: branches/5.2.x/units/pricing/pricing_event_handler.php =================================================================== diff -u -N -r14436 -r14569 --- branches/5.2.x/units/pricing/pricing_event_handler.php (.../pricing_event_handler.php) (revision 14436) +++ branches/5.2.x/units/pricing/pricing_event_handler.php (.../pricing_event_handler.php) (revision 14569) @@ -1,6 +1,6 @@ Array('subitem' => 'add|edit'), - 'OnInfinity' => Array('subitem' => 'add|edit'), - 'OnArrange' => Array('subitem' => 'add|edit'), + 'OnMoreBrackets' => Array('subitem' => 'add|edit'), + 'OnInfinity' => Array('subitem' => 'add|edit'), + 'OnArrange' => Array('subitem' => 'add|edit'), + 'OnDeleteBrackets' => Array('subitem' => 'add|edit'), ); $this->permMapping = array_merge($this->permMapping, $permissions); } function mapEvents() { parent::mapEvents(); // ensure auto-adding of approve/decine and so on events - $brackets_events = Array( 'OnMoreBrackets' => 'PricingBracketsAction', - 'OnArrange' => 'PricingBracketsAction', - 'OnInfinity' => 'PricingBracketsAction'); + $brackets_events = Array( + 'OnMoreBrackets' => 'PricingBracketsAction', + 'OnArrange' => 'PricingBracketsAction', + 'OnInfinity' => 'PricingBracketsAction', + 'OnDeleteBrackets' => 'PricingBracketsAction', + ); $this->eventMethods = array_merge($this->eventMethods, $brackets_events); } @@ -98,8 +102,6 @@ $temp[$i]['Negotiated'] = '0'; $temp[$i]['IsPrimary'] = '0'; $temp[$i]['GroupId'] = $group_id; - - } $this->Application->SetVar($event->getPrefixSpecial(true), $temp); @@ -150,50 +152,56 @@ $this->Application->SetVar($event->getPrefixSpecial(true), $temp); $event->CallSubEvent('OnPreSaveBrackets'); break; + + case 'OnDeleteBrackets': + if ($group_id) { + $temp = ''; // delete all pricings from "pr_tang" var + + $sql = 'DELETE FROM ' . $bracket->TableName . ' + WHERE ProductId = ' . $this->Application->GetVar('p_id') . ' AND GroupId = ' . $group_id; + $this->Conn->Query($sql); + } + break; default: } - $this->Application->SetVar($event->getPrefixSpecial(true), $temp); + $this->Application->SetVar($event->getPrefixSpecial(true), $temp); // store pr_tang var } function OnPreSaveBrackets(&$event) { - if( $this->Application->GetVar('pr_tang')) - { + if( $this->Application->GetVar('pr_tang') ) { + $object =& $event->GetObject(); /* @var $object kDBItem */ + $product_id = $this->Application->GetVar('p_id'); $group_id = $this->Application->getVar('group_id'); - if($group_id>0){ - $where_group=' AND GroupId = '.$group_id.' '; - } - $stored_ids = $this->Conn->GetCol("SELECT PriceId FROM ".$object->TableName." WHERE ProductId=".$this->Application->GetVar("p_id").' '.$where_group); - - $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true)); - - + $sql = 'SELECT PriceId + FROM ' . $object->TableName . ' + WHERE ProductId = ' . $product_id . ' ' . ($group_id? 'AND GroupId = ' . $group_id : ''); + $stored_ids = $this->Conn->GetCol($sql); + + $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) ); // get pr_tang var uasort($items_info, 'pr_bracket_comp'); + + foreach ($items_info as $item_id => $values) { - - foreach ($items_info as $item_id=>$values) - { - if (in_array($item_id, $stored_ids)) { //if it's already exist $object->Load($item_id); $object->SetFieldsFromHash($values); + if (!$object->Validate()) { unset($stored_ids[array_search($item_id, $stored_ids)]); $event->redirect = false; continue; } - if( $object->Update($item_id) ) - { + if( $object->Update($item_id) ) { $event->status=kEvent::erSUCCESS; } - else - { + else { $event->status=kEvent::erFAIL; $event->redirect=false; break; @@ -203,18 +211,17 @@ else { $object->Clear(); $object->SetFieldsFromHash($values); - $object->SetDBField('ProductId', $this->Application->GetVar("p_id")); + $object->SetDBField('ProductId', $product_id); - if( $object->Create() ) - { + if( $object->Create() ) { $event->status=kEvent::erSUCCESS; } } } // delete - foreach ($stored_ids as $stored_id){ - $this->Conn->Query("DELETE FROM ".$object->TableName." WHERE PriceId=".$stored_id); + foreach ($stored_ids as $stored_id) { + $this->Conn->Query('DELETE FROM ' . $object->TableName . ' WHERE PriceId = ' . $stored_id); } } Index: branches/5.2.x/units/gift_certificates/gift_certificates_tp.php =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/units/gift_certificates/gift_certificates_tp.php (.../gift_certificates_tp.php) (revision 14258) +++ branches/5.2.x/units/gift_certificates/gift_certificates_tp.php (.../gift_certificates_tp.php) (revision 14569) @@ -1,6 +1,6 @@ Application->RecallVar('CoupLastCloneCount'); - if (!$clone_count){ - $clone_count = 1; - } - return $clone_count; - } - - function DefaultExpDate($params) - { - $object =& $this->getObject($params); - $formatter =& $this->Application->recallObject('kDateFormatter'); - - return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_date', $object); - } - - function DefaultExpTime($params) - { - $object =& $this->getObject($params); - $formatter =& $this->Application->recallObject('kDateFormatter'); - - return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_time', $object); - } - + function HasOrder($params) { if ($this->IsNewItem($params)) { Index: branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl =================================================================== diff -u -N -r14258 -r14569 --- branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl (.../orders_edit_shipping.tpl) (revision 14258) +++ branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl (.../orders_edit_shipping.tpl) (revision 14569) @@ -105,7 +105,9 @@ name="" id="_" value=""> 
- +