diff --git a/CHANGELOG.md b/CHANGELOG.md index 39b49cee..9e6fd1cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2017-09-07 v.2.2.4 +* Исправлена работа истории пользователей +* Убраны события для старого API + ## 2017-09-04 v.2.2.3 * Исправлена работа истории diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php index ce8f92a1..6c9546db 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php @@ -28,17 +28,17 @@ class RetailCrmHistory public static function customerHistory() { if (!CModule::IncludeModule("iblock")) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'iblock', 'module not found'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'iblock', 'module not found'); return false; } if (!CModule::IncludeModule("sale")) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'sale', 'module not found'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'sale', 'module not found'); return false; } if (!CModule::IncludeModule("catalog")) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'catalog', 'module not found'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'catalog', 'module not found'); return false; } @@ -56,7 +56,7 @@ class RetailCrmHistory } while (true) { - $customerHistory = RCrmActions::apiMethod($api, 'ordersHistory', __METHOD__, $historyFilter); + $customerHistory = RCrmActions::apiMethod($api, 'customersHistory', __METHOD__, $historyFilter); $customerH = isset($customerHistory['history']) ? $customerHistory['history'] : array(); @@ -132,7 +132,7 @@ class RetailCrmHistory ); $registeredUserID = $newUser->Add($arFields); if ($registeredUserID === false) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'CUser::Register', 'Error register user'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'CUser::Register', 'Error register user'); continue; } diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index 628051fa..3c9cfc41 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -28,17 +28,17 @@ class RetailCrmHistory public static function customerHistory() { if (!CModule::IncludeModule("iblock")) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'iblock', 'module not found'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'iblock', 'module not found'); return false; } if (!CModule::IncludeModule("sale")) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'sale', 'module not found'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'sale', 'module not found'); return false; } if (!CModule::IncludeModule("catalog")) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'catalog', 'module not found'); + RCrmActions::eventLog('RetailCrmHistory::customerHistory', 'catalog', 'module not found'); return false; } @@ -56,7 +56,7 @@ class RetailCrmHistory } while (true) { - $customerHistory = RCrmActions::apiMethod($api, 'ordersHistory', __METHOD__, $historyFilter); + $customerHistory = RCrmActions::apiMethod($api, 'customersHistory', __METHOD__, $historyFilter); $customerH = isset($customerHistory['history']) ? $customerHistory['history'] : array(); diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index b06bbccf..f1935ac8 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1,2 @@ -- Исправлена работа истории +- Убраны старые обработчики событий +- Исправлена работа истории пользователей diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index 1bea47a9..d882f1b1 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -810,8 +810,6 @@ class intaro_retailcrm extends CModule RegisterModule($this->MODULE_ID); RegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder"); - RegisterModuleDependences("sale", "OnBeforeOrderAdd", $this->MODULE_ID, "RetailCrmEvent", "onBeforeOrderAdd"); - RegisterModuleDependences("sale", "OnOrderSave", $this->MODULE_ID, "RetailCrmEvent", "OnOrderSave"); RegisterModuleDependences("main", "OnAfterUserUpdate", $this->MODULE_ID, "RetailCrmEvent", "OnAfterUserUpdate"); RegisterModuleDependences("sale", "OnSaleOrderEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "orderSave"); RegisterModuleDependences("sale", "OnSaleOrderEntityDelete", $this->MODULE_ID, "RetailCrmEvent", "orderDelete"); @@ -1014,8 +1012,6 @@ class intaro_retailcrm extends CModule COption::RemoveOption($this->MODULE_ID, $this->HISTORY_TIME); UnRegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder"); - UnRegisterModuleDependences("sale", "OnBeforeOrderAdd", $this->MODULE_ID, "RetailCrmEvent", "onBeforeOrderAdd"); - UnRegisterModuleDependences("sale", "OnOrderSave", $this->MODULE_ID, "RetailCrmEvent", "OnOrderSave"); UnRegisterModuleDependences("main", "OnAfterUserUpdate", $this->MODULE_ID, "RetailCrmEvent", "OnAfterUserUpdate"); UnRegisterModuleDependences("sale", "OnSaleOrderEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "orderSave"); UnRegisterModuleDependences("sale", "OnSaleOrderEntityDelete", $this->MODULE_ID, "RetailCrmEvent", "orderDelete"); diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index 3a6152a6..8ccc20f9 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,5 +1,5 @@ "2.2.3", - "VERSION_DATE" => "2017-09-05 12:00:00" + "VERSION" => "2.2.4", + "VERSION_DATE" => "2017-09-07 12:00:00" );