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