1
0
mirror of synced 2024-11-25 06:46:08 +03:00

logic fix

This commit is contained in:
gorokh 2020-04-15 16:01:21 +03:00
parent 30555f8146
commit 735b0f977d

View File

@ -624,11 +624,15 @@ class RetailCrmICML
$offer .= "<url>" . $this->protocol . $this->serverName . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "</url>\n"; $offer .= "<url>" . $this->protocol . $this->serverName . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "</url>\n";
$offer .= "<price>" . $this->PrepareValue($arOffer['PRICE']) . "</price>\n"; $offer .= "<price>" . $this->PrepareValue($arOffer['PRICE']) . "</price>\n";
if ($arOffer['PURCHASE_PRICE'] && $this->loadPurchasePrice) {
$offer .= "<purchasePrice>" . $this->PrepareValue($arOffer['PURCHASE_PRICE']) . "</purchasePrice>\n"; if ($this->loadPurchasePrice) {
} elseif ("Y" == $this->purchasePriceNull) { if ($arOffer['PURCHASE_PRICE']) {
$offer .= "<purchasePrice>0</purchasePrice>\n"; $offer .= "<purchasePrice>" . $this->PrepareValue($arOffer['PURCHASE_PRICE']) . "</purchasePrice>\n";
} elseif ("Y" == $this->purchasePriceNull) {
$offer .= "<purchasePrice>0</purchasePrice>\n";
}
} }
foreach ($categories as $category) { foreach ($categories as $category) {
$offer .= "<categoryId>" . $category['ID'] . "</categoryId>\n"; $offer .= "<categoryId>" . $category['ID'] . "</categoryId>\n";
} }