From 04c1cc4c98f95fc0a9b9c9f60811203c2b83cc38 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 23 May 2019 17:01:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B5=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D1=82=D0=B8=D0=BF=D0=B0=20=D1=86=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D1=83=20=D1=82=D0=BE=D0=B2=D0=B0=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ .../classes/general/prices/RetailCrmPrices.php | 18 ++++++++++++++++++ intaro.retailcrm/description.ru | 2 +- intaro.retailcrm/install/version.php | 4 ++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5921840d..6f03bfde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2019-03-28 v.2.4.7 +* Добавлено удаление в системе типа цены у товара для неактивного типа цены на сайте + ## 2019-03-28 v.2.4.6 * Исправление проверки информации о контрагенте при обработке полученных изменений diff --git a/intaro.retailcrm/classes/general/prices/RetailCrmPrices.php b/intaro.retailcrm/classes/general/prices/RetailCrmPrices.php index 242fb9c2..c3f3564c 100644 --- a/intaro.retailcrm/classes/general/prices/RetailCrmPrices.php +++ b/intaro.retailcrm/classes/general/prices/RetailCrmPrices.php @@ -112,6 +112,24 @@ class RetailCrmPrices } } + foreach ($shops as $shop) { + foreach ($elems as $value) { + if (!array_key_exists($value . '-' . $shop, $pricesUpload)) { + foreach ($prices as $key => $price) { + $pricesUpload[$value . '-' . $shop] = array( + 'externalId' => $value, + 'site' => $shop + ); + + $pricesUpload[$value . '-'. $shop]['prices'][] = array( + 'code' => $prices[$key], + 'remove' => true + ); + } + } + } + } + //for log $splitedItems = array_chunk($pricesUpload, 200); foreach ($splitedItems as $chunk) { diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index d8526c7e..52758530 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/version.php b/intaro.retailcrm/install/version.php index 148ab98d..d3b44a29 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,5 +1,5 @@ "2.4.6", - "VERSION_DATE" => "2019-03-28 16:44:00" + "VERSION" => "2.4.7", + "VERSION_DATE" => "2019-05-23 16:30:00" );