From 4dfc7b8d1acbf9bdc33ac6484f0d7f4171e774d6 Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 16 Jan 2019 13:11:34 +0300 Subject: [PATCH] v2.2.9 --- CHANGELOG.md | 3 +++ VERSION | 2 +- retailcrm/lib/RetailcrmCatalog.php | 20 ++++++++------------ retailcrm/lib/RetailcrmIcml.php | 5 ++--- retailcrm/retailcrm.php | 4 ++-- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8bd3fc..3c09de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v2.2.9 +* Добавлена выгрузка габаритов в специальный тег dimensions + ## v2.2.8 * Добавлена выгрузка картинок категорий товаров в ICML diff --git a/VERSION b/VERSION index 23a63f5..a6333e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.8 +2.2.9 diff --git a/retailcrm/lib/RetailcrmCatalog.php b/retailcrm/lib/RetailcrmCatalog.php index 57952c9..cca45b0 100644 --- a/retailcrm/lib/RetailcrmCatalog.php +++ b/retailcrm/lib/RetailcrmCatalog.php @@ -99,18 +99,14 @@ class RetailcrmCatalog $weight = null; } - $width = round($product['width'], 2); - $height = round($product['height'], 2); - $depth = round($product['depth'], 2); - + $width = round($product['width'], 3); + $height = round($product['height'], 3); + $depth = round($product['depth'], 3); + if (!empty($width) && !empty($height)) { - if (!empty($depth)) { - $size = implode('x', array($width, $height, $depth)); - } else { - $size = implode('x', array($width, $height)); - } + $dimensions = implode('/', array($width, $height, $depth)); } else { - $size = null; + $dimensions = null; } $productForCombination = new Product($product['id_product']); @@ -170,7 +166,7 @@ class RetailcrmCatalog 'vendor' => $vendor, 'article' => $article, 'weight' => $weight, - 'size' => $size + 'dimensions' => $dimensions ); if (!empty($combinations)) { @@ -210,7 +206,7 @@ class RetailcrmCatalog 'vendor' => $vendor, 'article' => $article, 'weight' => $weight, - 'size' => $size + 'dimensions' => $dimensions ); $items[] = $item; diff --git a/retailcrm/lib/RetailcrmIcml.php b/retailcrm/lib/RetailcrmIcml.php index 77b7f84..ab7c9ed 100644 --- a/retailcrm/lib/RetailcrmIcml.php +++ b/retailcrm/lib/RetailcrmIcml.php @@ -24,14 +24,14 @@ class RetailcrmIcml 'picture', 'url', 'xmlId', - 'productActivity' + 'productActivity', + 'dimensions' ); $this->params = array( 'article' => 'Артикул', 'color' => 'Цвет', 'weight' => 'Вес', - 'size' => 'Размер', 'tax' => 'Наценка' ); } @@ -94,7 +94,6 @@ class RetailcrmIcml private function addOffers($offers) { foreach ($offers as $offer) { - $e = $this->eOffers->appendChild( $this->dd->createElement('offer') ); diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index f8b45d3..e401a84 100644 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -3,7 +3,7 @@ * @author Retail Driver LCC * @copyright RetailCRM * @license GPL - * @version 2.2.6 + * @version 2.2.9 * @link https://retailcrm.ru * */ @@ -38,7 +38,7 @@ class RetailCRM extends Module { $this->name = 'retailcrm'; $this->tab = 'export'; - $this->version = '2.2.6'; + $this->version = '2.2.9'; $this->author = 'Retail Driver LCC'; $this->displayName = $this->l('RetailCRM'); $this->description = $this->l('Integration module for RetailCRM');