Fix bug with ProductType
This commit is contained in:
parent
d25a6eddf3
commit
f3f27af3a0
@ -251,7 +251,7 @@ class IcmlDirector
|
||||
|
||||
do {
|
||||
//Если каталог проиндексирован, у товара есть Тип и это простой товар, то просто записываем его
|
||||
if ($product->productType = ProductTable::TYPE_PRODUCT) {
|
||||
if ($product->productType === ProductTable::TYPE_PRODUCT) {
|
||||
$this->icmlWriter->writeOffers([$product]);
|
||||
break;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ class XmlOfferBuilder
|
||||
{
|
||||
$this->xmlOffer->id = $item['ID'];
|
||||
$this->xmlOffer->productId = $item['ID'];
|
||||
$this->xmlOffer->productType = $item['CATALOG_TYPE'];
|
||||
$this->xmlOffer->productType = (int) $item['CATALOG_TYPE'];
|
||||
$this->xmlOffer->quantity = $item['CATALOG_QUANTITY'] ?? '';
|
||||
$this->xmlOffer->url = $item['DETAIL_PAGE_URL']
|
||||
? $this->defaultServerName . $item['DETAIL_PAGE_URL']
|
||||
|
@ -125,7 +125,7 @@ class XmlOffer
|
||||
* \Bitrix\Catalog\ProductTable::TYPE_SKU – товар с торговыми предложениями
|
||||
* \Bitrix\Catalog\ProductTable::TYPE_OFFER – торговое предложение
|
||||
*
|
||||
* @var mixed
|
||||
* @var int
|
||||
*/
|
||||
public $productType;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user