1
0
mirror of synced 2024-11-25 14:56:09 +03:00

Fix bug with ProductType

This commit is contained in:
Sergey Chazov 2022-02-03 15:17:19 +04:00
parent d25a6eddf3
commit f3f27af3a0
3 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ class IcmlDirector
do {
//Если каталог проиндексирован, у товара есть Тип и это простой товар, то просто записываем его
if ($product->productType = ProductTable::TYPE_PRODUCT) {
if ($product->productType === ProductTable::TYPE_PRODUCT) {
$this->icmlWriter->writeOffers([$product]);
break;
}

View File

@ -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']

View File

@ -125,7 +125,7 @@ class XmlOffer
* \Bitrix\Catalog\ProductTable::TYPE_SKU товар с торговыми предложениями
* \Bitrix\Catalog\ProductTable::TYPE_OFFER торговое предложение
*
* @var mixed
* @var int
*/
public $productType;