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" );