From 735b0f977d20ab8394d828e9701050fbe4363827 Mon Sep 17 00:00:00 2001 From: gorokh Date: Wed, 15 Apr 2020 16:01:21 +0300 Subject: [PATCH] logic fix --- .../classes/general/icml/RetailCrmICML.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php index 9fd0ee2f..740aa32f 100644 --- a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php +++ b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php @@ -624,11 +624,15 @@ class RetailCrmICML $offer .= "" . $this->protocol . $this->serverName . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "\n"; $offer .= "" . $this->PrepareValue($arOffer['PRICE']) . "\n"; - if ($arOffer['PURCHASE_PRICE'] && $this->loadPurchasePrice) { - $offer .= "" . $this->PrepareValue($arOffer['PURCHASE_PRICE']) . "\n"; - } elseif ("Y" == $this->purchasePriceNull) { - $offer .= "0\n"; + + if ($this->loadPurchasePrice) { + if ($arOffer['PURCHASE_PRICE']) { + $offer .= "" . $this->PrepareValue($arOffer['PURCHASE_PRICE']) . "\n"; + } elseif ("Y" == $this->purchasePriceNull) { + $offer .= "0\n"; + } } + foreach ($categories as $category) { $offer .= "" . $category['ID'] . "\n"; }