From 7a429e0129463de4bfa6e9690348a85a7d4a85fb Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Tue, 22 Jan 2019 11:39:23 +0300 Subject: [PATCH] Fixed #58 v2.4.4 --- CHANGELOG.md | 3 +++ .../classes/general/history/RetailCrmHistory_v4.php | 10 +++++++++- .../classes/general/history/RetailCrmHistory_v5.php | 8 ++++++++ intaro.retailcrm/description.ru | 4 +--- intaro.retailcrm/install/version.php | 4 ++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cdab3b4..bd264e48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2019-01-22 v.2.4.4 +* Добавлена обработка клиентов с внешним кодом в виде хэша при выгрузке истории изменений + ## 2019-01-15 v.2.4.3 * Добавлена выгрузка НДС в ICML каталоге * Улучшена выгрузка истории изменений заказа diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php index 193f07be..0ef737ee 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v4.php @@ -94,7 +94,11 @@ class RetailCrmHistory if (isset($customer['deleted'])) { continue; } - + + if (isset($customer['externalId']) && !is_numeric($customer['externalId'])) { + unset($customer['externalId']); + } + if (!isset($customer['externalId'])) { if (!isset($customer['id'])) { continue; @@ -307,6 +311,10 @@ class RetailCrmHistory continue; } + if (isset($order['customer']['externalId']) && !is_numeric($order['customer']['externalId'])) { + unset($order['customer']['externalId']); + } + if (!isset($order['externalId'])) { if (!isset($order['customer']['externalId'])) { if (!isset($order['customer']['id'])) { diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index 0377e55b..038df1df 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -96,6 +96,10 @@ class RetailCrmHistory continue; } + if (isset($customer['externalId']) && !is_numeric($customer['externalId'])) { + unset($customer['externalId']); + } + if (!isset($customer['externalId'])) { if (!isset($customer['id'])) { continue; @@ -325,6 +329,10 @@ class RetailCrmHistory continue; } + if (isset($order['customer']['externalId']) && !is_numeric($order['customer']['externalId'])) { + unset($order['customer']['externalId']); + } + if (!isset($order['externalId'])) { if (!isset($order['customer']['externalId'])) { if (!isset($order['customer']['id'])) { diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index 47ec11ac..313a5201 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1,3 +1 @@ -- Добавлена выгрузка НДС в ICML каталоге -- Улучшена выгрузка истории изменений заказа -- Улучшена настройка выгрузки типов цен \ No newline at end of file +- Добавлена обработка клиентов с внешним кодом в виде хэша при выгрузке истории изменений \ No newline at end of file diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index 349e710b..2c1fe9cc 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,5 +1,5 @@ "2.4.3", - "VERSION_DATE" => "2019-01-15 17:00:00" + "VERSION" => "2.4.4", + "VERSION_DATE" => "2019-01-22 12:00:00" );