From e0903610b5eb81f5dd07cae455b9f86713c59370 Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 31 Oct 2018 16:25:53 +0300 Subject: [PATCH 1/4] v2.4.0 --- CHANGELOG.md | 5 + .../classes/general/events/RetailCrmEvent.php | 99 ++++++++----------- intaro.retailcrm/description.ru | 2 +- intaro.retailcrm/install/index.php | 17 +++- intaro.retailcrm/options.php | 4 +- 5 files changed, 64 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20634551..49ea329d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2018-10-25 v.2.4.0 +* Изменена привязка на событие сохранения заказа. Используется привязка к событию "OnSaleOrderSaved" +* Исправлено удаление событий модуля при удалении модуля интеграции из CMS +* Исправлен баг с некорректным удалением модуля из CMS + ## 2018-10-25 v.2.3.13 * Добавлен функционал для активации модуля в маркетплейсе retailCRM * Исправлен баг при генерации каталога с подстановкой схемы diff --git a/intaro.retailcrm/classes/general/events/RetailCrmEvent.php b/intaro.retailcrm/classes/general/events/RetailCrmEvent.php index 1b055502..b89af713 100644 --- a/intaro.retailcrm/classes/general/events/RetailCrmEvent.php +++ b/intaro.retailcrm/classes/general/events/RetailCrmEvent.php @@ -168,7 +168,6 @@ class RetailCrmEvent $arParams['crmOrder'] = $orderCrm['order']; } else { $methodApi = 'ordersCreate'; - $GLOBALS['RETAILCRM_ORDER_NEW_ORDER'] = true; } //user @@ -222,7 +221,6 @@ class RetailCrmEvent 'SUM' => $event->getField('SUM'), 'LID' => $event->getField('LID'), 'DATE_PAID' => $event->getField('DATE_PAID'), - 'METHOD' => $GLOBALS['RETAILCRM_ORDER_NEW_ORDER'], ); try { @@ -252,65 +250,52 @@ class RetailCrmEvent $payments = $orderCrm['order']['payments']; } - if ($arPayment['METHOD'] === true) { - if ($payments) { - foreach ($payments as $payment) { - if (!isset($payment['externalId'])) { - if ($payment['type'] == $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']]) { - $payment['externalId'] = $arPayment['ID']; - RCrmActions::apiMethod($api, 'paymentEditById', __METHOD__, $payment, $site); - } - } + if ($payments) { + foreach ($payments as $payment) { + if (isset($payment['externalId'])) { + $paymentsExternalIds[$payment['externalId']] = $payment; } } + } + + if (!empty($arPayment['PAY_SYSTEM_ID']) && isset($optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']])) { + $paymentToCrm = array( + 'type' => $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']], + 'amount' => $arPayment['SUM'] + ); + + if (!empty($arPayment['ID'])) { + $paymentToCrm['externalId'] = $arPayment['ID']; + } + + if (!empty($arPayment['DATE_PAID'])) { + if (is_object($arPayment['DATE_PAID'])) { + $culture = new Bitrix\Main\Context\Culture(array("FORMAT_DATETIME" => "YYYY-MM-DD HH:MI:SS")); + $paymentToCrm['paidAt'] = $arPayment['DATE_PAID']->toString($culture); + } elseif (is_string($arPayment['DATE_PAID'])) { + $paymentToCrm['paidAt'] = $arPayment['DATE_PAID']; + } + } + + if (!empty($optionsPayStatuses[$arPayment['PAID']])) { + $paymentToCrm['status'] = $optionsPayStatuses[$arPayment['PAID']]; + } + + if (!empty($arPayment['ORDER_ID'])) { + $paymentToCrm['order']['externalId'] = $arPayment['ORDER_ID']; + } } else { - if ($payments) { - foreach ($payments as $payment) { - if (isset($payment['externalId'])) { - $paymentsExternalIds[$payment['externalId']] = $payment; - } - } - } + RCrmActions::eventLog('RetailCrmEvent::paymentSave', 'payments', 'OrderID = ' . $arPayment['ID'] . '. Payment not found.'); + return; + } - if (!empty($arPayment['PAY_SYSTEM_ID']) && isset($optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']])) { - $paymentToCrm = array( - 'type' => $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']], - 'amount' => $arPayment['SUM'] - ); - - if (!empty($arPayment['ID'])) { - $paymentToCrm['externalId'] = $arPayment['ID']; - } - - if (!empty($arPayment['DATE_PAID'])) { - if (is_object($arPayment['DATE_PAID'])) { - $culture = new Bitrix\Main\Context\Culture(array("FORMAT_DATETIME" => "YYYY-MM-DD HH:MI:SS")); - $paymentToCrm['paidAt'] = $arPayment['DATE_PAID']->toString($culture); - } elseif (is_string($arPayment['DATE_PAID'])) { - $paymentToCrm['paidAt'] = $arPayment['DATE_PAID']; - } - } - - if (!empty($optionsPayStatuses[$arPayment['PAID']])) { - $paymentToCrm['status'] = $optionsPayStatuses[$arPayment['PAID']]; - } - - if (!empty($arPayment['ORDER_ID'])) { - $paymentToCrm['order']['externalId'] = $arPayment['ORDER_ID']; - } - } else { - RCrmActions::eventLog('RetailCrmEvent::paymentSave', 'payments', 'OrderID = ' . $arPayment['ID'] . '. Payment not found.'); - return; - } - - if (!array_key_exists($arPayment['ID'], $paymentsExternalIds)) { - RCrmActions::apiMethod($api, 'ordersPaymentCreate', __METHOD__, $paymentToCrm, $site); - } elseif (array_key_exists($arPayment['ID'], $paymentsExternalIds) && $paymentsExternalIds[$arPayment['ID']]['type'] == $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']]) { - RCrmActions::apiMethod($api, 'paymentEditByExternalId', __METHOD__, $paymentToCrm, $site); - } elseif (array_key_exists($arPayment['ID'], $paymentsExternalIds) && $paymentsExternalIds[$arPayment['ID']]['type'] != $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']]) { - RCrmActions::apiMethod($api, 'ordersPaymentDelete', __METHOD__, $paymentsExternalIds[$arPayment['ID']]['id']); - RCrmActions::apiMethod($api, 'ordersPaymentCreate', __METHOD__, $paymentToCrm, $site); - } + if (!array_key_exists($arPayment['ID'], $paymentsExternalIds)) { + RCrmActions::apiMethod($api, 'ordersPaymentCreate', __METHOD__, $paymentToCrm, $site); + } elseif (array_key_exists($arPayment['ID'], $paymentsExternalIds) && $paymentsExternalIds[$arPayment['ID']]['type'] == $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']]) { + RCrmActions::apiMethod($api, 'paymentEditByExternalId', __METHOD__, $paymentToCrm, $site); + } elseif (array_key_exists($arPayment['ID'], $paymentsExternalIds) && $paymentsExternalIds[$arPayment['ID']]['type'] != $optionsPaymentTypes[$arPayment['PAY_SYSTEM_ID']]) { + RCrmActions::apiMethod($api, 'ordersPaymentDelete', __METHOD__, $paymentsExternalIds[$arPayment['ID']]['id']); + RCrmActions::apiMethod($api, 'ordersPaymentCreate', __METHOD__, $paymentToCrm, $site); } } diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index 86ad509e..5fd72fdc 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Добавлен функционал для активации модуля в маркетплейсе retailCRM \ No newline at end of file +- Изменена привязка на событие сохранения заказа. Теперь модуль привязан к событию, которое вызывается после сохранения всех сущностей. \ No newline at end of file diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index 11ab0390..97fed83f 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -891,7 +891,7 @@ class intaro_retailcrm extends CModule RegisterModule($this->MODULE_ID); RegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder"); RegisterModuleDependences("main", "OnAfterUserUpdate", $this->MODULE_ID, "RetailCrmEvent", "OnAfterUserUpdate"); - RegisterModuleDependences("sale", "OnSaleOrderEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "orderSave"); + RegisterModuleDependences("sale", \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, $this->MODULE_ID, "RetailCrmEvent", "orderSave"); RegisterModuleDependences("sale", "OnSaleOrderDeleted", $this->MODULE_ID, "RetailCrmEvent", "orderDelete"); RegisterModuleDependences("sale", "OnSalePaymentEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "paymentSave"); RegisterModuleDependences("sale", "OnSalePaymentEntityDeleted", $this->MODULE_ID, "RetailCrmEvent", "paymentDelete"); @@ -1067,6 +1067,8 @@ class intaro_retailcrm extends CModule include($this->INSTALL_PATH . '/../classes/general/Response/ApiResponse.php'); include($this->INSTALL_PATH . '/../classes/general/Exception/InvalidJsonException.php'); include($this->INSTALL_PATH . '/../classes/general/Exception/CurlException.php'); + include($this->INSTALL_PATH . '/../classes/general/RCrmActions.php'); + include($this->INSTALL_PATH . '/../classes/general/Logger.php'); if ($api_version == 'v4') { include($this->INSTALL_PATH . '/../classes/general/ApiClient_v4.php'); @@ -1128,10 +1130,19 @@ class intaro_retailcrm extends CModule COption::RemoveOption($this->MODULE_ID, $this->HISTORY_TIME); COption::RemoveOption($this->MODULE_ID, $this->CLIENT_ID); + if (CModule::IncludeModule('sale')) { + UnRegisterModuleDependences( + "sale", + \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, + $this->MODULE_ID, + "RetailCrmEvent", + "orderSave" + ); + } + UnRegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder"); UnRegisterModuleDependences("main", "OnAfterUserUpdate", $this->MODULE_ID, "RetailCrmEvent", "OnAfterUserUpdate"); - UnRegisterModuleDependences("sale", "OnSaleOrderEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "orderSave"); - UnRegisterModuleDependences("sale", "OnSaleBeforeOrderDelete", $this->MODULE_ID, "RetailCrmEvent", "orderDelete"); + UnRegisterModuleDependences("sale", "OnSaleOrderDeleted", $this->MODULE_ID, "RetailCrmEvent", "orderDelete"); UnRegisterModuleDependences("main", "OnBeforeProlog", $this->MODULE_ID, "RetailCrmCollector", "add"); UnRegisterModuleDependences("main", "OnBeforeProlog", $this->MODULE_ID, "RetailCrmUa", "add"); UnRegisterModuleDependences("sale", "OnSalePaymentEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "paymentSave"); diff --git a/intaro.retailcrm/options.php b/intaro.retailcrm/options.php index 2b65720e..df485965 100644 --- a/intaro.retailcrm/options.php +++ b/intaro.retailcrm/options.php @@ -276,12 +276,12 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) { $orderDischarge = (int) htmlspecialchars(trim($_POST['order-discharge'])); if (($orderDischarge != $previousDischarge) && ($orderDischarge == 0)) { // remove depenedencies - UnRegisterModuleDependences("sale", "OnSaleOrderEntitySaved", $mid, "RetailCrmEvent", "orderSave"); + UnRegisterModuleDependences("sale", \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, $mid, "RetailCrmEvent", "orderSave"); UnRegisterModuleDependences("sale", "OnOrderUpdate", $mid, "RetailCrmEvent", "onUpdateOrder"); UnRegisterModuleDependences("sale", "OnSaleOrderDeleted", $mid, "RetailCrmEvent", "orderDelete"); } elseif (($orderDischarge != $previousDischarge) && ($orderDischarge == 1)) { // event dependencies - RegisterModuleDependences("sale", "OnSaleOrderEntitySaved", $mid, "RetailCrmEvent", "orderSave"); + RegisterModuleDependences("sale", \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, $mid, "RetailCrmEvent", "orderSave"); RegisterModuleDependences("sale", "OnOrderUpdate", $mid, "RetailCrmEvent", "onUpdateOrder"); RegisterModuleDependences("sale", "OnSaleOrderDeleted", $mid, "RetailCrmEvent", "orderDelete"); } From 5187ec6e1fcbfdb34251141e605b35461645a1e2 Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 2 Nov 2018 12:27:29 +0300 Subject: [PATCH 2/4] merge fork --- CHANGELOG.md | 3 +++ intaro.retailcrm/description.ru | 2 +- intaro.retailcrm/install/index.php | 12 ++++++------ intaro.retailcrm/install/version.php | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ea329d..a6cd26f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ * Исправлено удаление событий модуля при удалении модуля интеграции из CMS * Исправлен баг с некорректным удалением модуля из CMS +## 2018-10-29 v.2.3.14 +* Добавлено подключение файла RCrmActions.php при удалении модуля + ## 2018-10-25 v.2.3.13 * Добавлен функционал для активации модуля в маркетплейсе retailCRM * Исправлен баг при генерации каталога с подстановкой схемы diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index 5fd72fdc..e016563b 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Изменена привязка на событие сохранения заказа. Теперь модуль привязан к событию, которое вызывается после сохранения всех сущностей. \ No newline at end of file +- Изменена привязка на событие сохранения заказа. Теперь модуль привязан к событию, которое вызывается после сохранения всех сущностей. diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index 97fed83f..996b212e 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -1132,12 +1132,12 @@ class intaro_retailcrm extends CModule if (CModule::IncludeModule('sale')) { UnRegisterModuleDependences( - "sale", - \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, - $this->MODULE_ID, - "RetailCrmEvent", - "orderSave" - ); + "sale", + \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, + $this->MODULE_ID, + "RetailCrmEvent", + "orderSave" + ); } UnRegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder"); diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index 13dfef96..4f4e5aff 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,5 +1,5 @@ "2.3.13", - "VERSION_DATE" => "2018-10-25 10:40:00" + "VERSION" => "2.3.14", + "VERSION_DATE" => "2018-10-29 11:40:00" ); From f80fed989a18787d0ceb3ab2e0646aa8f6f65a1c Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 2 Nov 2018 16:51:13 +0300 Subject: [PATCH 3/4] v2.4.0 --- CHANGELOG.md | 6 ++++-- .../classes/general/icml/RetailCrmICML.php | 14 +++----------- .../classes/general/order/RetailCrmOrder_v5.php | 2 +- intaro.retailcrm/description.ru | 1 + intaro.retailcrm/install/index.php | 10 ++++++++++ intaro.retailcrm/install/version.php | 4 ++-- intaro.retailcrm/options.php | 7 +++++++ 7 files changed, 28 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6cd26f7..ab336f8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ -## 2018-10-25 v.2.4.0 +## 2018-11-02 v.2.4.0 * Изменена привязка на событие сохранения заказа. Используется привязка к событию "OnSaleOrderSaved" * Исправлено удаление событий модуля при удалении модуля интеграции из CMS -* Исправлен баг с некорректным удалением модуля из CMS +* Добавлено подключение файла Logger.php при удалении модуля +* Изменен механизм определения протокола, с которым работает сайт. Используется метод isHttps() 1С-Bitrix +* Исправлена передача веса товара при отправке габбаритов заказа ## 2018-10-29 v.2.3.14 * Добавлено подключение файла RCrmActions.php при удалении модуля diff --git a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php index a46be235..745aa23c 100644 --- a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php +++ b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php @@ -36,6 +36,7 @@ class RetailCrmICML protected $MODULE_ID = 'intaro.retailcrm'; protected $CRM_CATALOG_BASE_PRICE = 'catalog_base_price'; + protected $PROTOCOL = 'protocol'; protected $measurement = array ( 'mm' => 1, // 1 mm = 1 mm @@ -74,17 +75,8 @@ class RetailCrmICML $defaultSite = CSite::GetList($by = "def", $order = "desc", array('DEF' => 'Y'))->Fetch(); $this->encodingDefault = $defaultSite["CHARSET"]; - $url = 'https://' . $this->defaultServerName; - $curlHandler = curl_init(); - curl_setopt($curlHandler, CURLOPT_URL, $url); - $responseBody = curl_exec($curlHandler); - $statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE); - curl_close($curlHandler); - if ($statusCode == 200) { - $this->protocol = 'https://'; - } else { - $this->protocol = 'http://'; - } + $this->protocol = COption::GetOptionString($this->MODULE_ID, $this->PROTOCOL); + $url = $this->protocol . $this->defaultServerName; $this->PrepareSettings(); diff --git a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php index b4109a7c..55e432b6 100644 --- a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php +++ b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php @@ -171,7 +171,7 @@ class RetailCrmOrder $width += $dimensions['WIDTH']; $height += $dimensions['HEIGHT']; $length += $dimensions['LENGTH']; - $weight += $product['WEIGHT']; + $weight += $product['WEIGHT'] * $product['QUANTITY']; } } } diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index e016563b..78f986d2 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1,2 @@ - Изменена привязка на событие сохранения заказа. Теперь модуль привязан к событию, которое вызывается после сохранения всех сущностей. +- Изменена механика получения протокола, с которым работает сайт клиента. ТЕперь используется внутренний метод 1C-Bitrix \ No newline at end of file diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index 947b9039..929a7712 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -70,6 +70,7 @@ class intaro_retailcrm extends CModule var $HISTORY_TIME = 'history_time'; var $CLIENT_ID = 'client_id'; + var $PROTOCOL = 'protocol'; var $INSTALL_PATH; @@ -512,6 +513,14 @@ class intaro_retailcrm extends CModule //form orderProps $arResult['arProp'] = RCrmActions::OrderPropsList(); + $request = \Bitrix\Main\Application::getInstance()->getContext()->getRequest(); + + if ($request->isHttps() === true) { + COption::SetOptionString($this->MODULE_ID, $this->PROTOCOL, 'https://'); + } else { + COption::SetOptionString($this->MODULE_ID, $this->PROTOCOL, 'http://'); + } + COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_TYPES_ARR, serialize(RCrmActions::clearArr($orderTypesArr))); COption::SetOptionString($this->MODULE_ID, $this->CRM_DELIVERY_TYPES_ARR, serialize(RCrmActions::clearArr($deliveryTypesArr))); COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_TYPES, serialize(RCrmActions::clearArr($paymentTypesArr))); @@ -1130,6 +1139,7 @@ class intaro_retailcrm extends CModule COption::RemoveOption($this->MODULE_ID, $this->CRM_API_VERSION); COption::RemoveOption($this->MODULE_ID, $this->HISTORY_TIME); COption::RemoveOption($this->MODULE_ID, $this->CLIENT_ID); + COption::RemoveOption($this->MODULE_ID, $this->PROTOCOL); if (CModule::IncludeModule('sale')) { UnRegisterModuleDependences( diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index 4f4e5aff..b2fec9d4 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,5 +1,5 @@ "2.3.14", - "VERSION_DATE" => "2018-10-29 11:40:00" + "VERSION" => "2.4.0", + "VERSION_DATE" => "2018-11-02 14:20:00" ); diff --git a/intaro.retailcrm/options.php b/intaro.retailcrm/options.php index df485965..1e308344 100644 --- a/intaro.retailcrm/options.php +++ b/intaro.retailcrm/options.php @@ -43,6 +43,7 @@ $CRM_API_VERSION = 'api_version'; $CRM_CURRENCY = 'currency'; $CRM_ADDRESS_OPTIONS = 'address_options'; $CRM_DIMENSIONS = 'order_dimensions'; +$PROTOCOL = 'protocol'; if(!CModule::IncludeModule('intaro.retailcrm') || !CModule::IncludeModule('sale') || !CModule::IncludeModule('iblock') || !CModule::IncludeModule('catalog')) return; @@ -513,6 +514,12 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) { COption::SetOptionString($mid, $CRM_UA_KEYS, serialize(RCrmActions::clearArr($uaKeys))); COption::SetOptionString($mid, $CRM_DIMENSIONS, $orderDimensions); + if ($request->isHttps() === true) { + COption::SetOptionString($mid, $PROTOCOL, 'https://'); + } else { + COption::SetOptionString($mid, $PROTOCOL, 'http://'); + } + $uri .= '&ok=Y'; LocalRedirect($uri); } else { From 562d16a5975e90b3d263e419bfa7ee427cd46924 Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 2 Nov 2018 17:41:00 +0300 Subject: [PATCH 4/4] v2.4.0 --- intaro.retailcrm/classes/general/icml/RetailCrmICML.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php index 745aa23c..98425ac4 100644 --- a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php +++ b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php @@ -36,7 +36,7 @@ class RetailCrmICML protected $MODULE_ID = 'intaro.retailcrm'; protected $CRM_CATALOG_BASE_PRICE = 'catalog_base_price'; - protected $PROTOCOL = 'protocol'; + protected $PROTOCOL_OPTION = 'protocol'; protected $measurement = array ( 'mm' => 1, // 1 mm = 1 mm @@ -75,8 +75,7 @@ class RetailCrmICML $defaultSite = CSite::GetList($by = "def", $order = "desc", array('DEF' => 'Y'))->Fetch(); $this->encodingDefault = $defaultSite["CHARSET"]; - $this->protocol = COption::GetOptionString($this->MODULE_ID, $this->PROTOCOL); - $url = $this->protocol . $this->defaultServerName; + $this->protocol = COption::GetOptionString($this->MODULE_ID, $this->PROTOCOL_OPTION); $this->PrepareSettings();