1
0
mirror of synced 2024-11-23 13:56:08 +03:00
bitrix-module/intaro.retailcrm/lib/model/bitrix/xml/xmloffer.php

142 lines
2.2 KiB
PHP
Raw Normal View History

2021-05-31 16:33:02 +03:00
<?php
/**
* PHP version 7.1
*
* @category Integration
* @package Intaro\RetailCrm\Model\Bitrix
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see http://retailcrm.ru/docs
*/
namespace Intaro\RetailCrm\Model\Bitrix\Xml;
/**
* Class XmlOffer
* @package Intaro\RetailCrm\Model\Bitrix\Xml
*/
class XmlOffer
{
/**
* @var int
*/
public $id;
2021-05-31 16:33:02 +03:00
/**
* @var int
*/
public $productId;
2021-05-31 16:33:02 +03:00
/**
* @var int
*/
public $quantity;
2021-05-31 16:33:02 +03:00
/**
* @var string
*/
public $picture;
2021-05-31 16:33:02 +03:00
/**
* @var string
*/
public $url;
2021-05-31 16:33:02 +03:00
/**
* @var float
*/
public $price;
2021-05-31 16:33:02 +03:00
/**
* Категории, к которым относится товар
*
* @var array
*/
public $categoryIds;
2021-05-31 16:33:02 +03:00
/**
* @var string
*/
public $name;
2021-05-31 16:33:02 +03:00
/**
* @var int
*/
public $xmlId;
2021-05-31 16:33:02 +03:00
/**
* @var string
*/
public $productName;
2021-05-31 16:33:02 +03:00
/**
* @var OfferParam[]
*/
public $params;
2021-05-31 16:33:02 +03:00
/**
* @var string
*/
public $vendor;
2021-05-31 16:33:02 +03:00
/**
* @var Unit
*/
public $unitCode;
2021-05-31 16:33:02 +03:00
/**
* ставка налога (НДС)
*
* @var string
*/
public $vatRate;
2021-05-31 16:33:02 +03:00
/**
* штрих-код
*
* @var string
*/
public $barcode;
2021-05-31 16:33:02 +03:00
/**
* Закупочная цена
*
* @var mixed|null
*/
public $purchasePrice;
2021-05-31 16:33:02 +03:00
/**
* Вес товара
*
* @var int
*/
public $weight;
2021-05-31 16:33:02 +03:00
/**
* Габариты товара
*
* @var string
*/
public $dimensions;
/**
* Тип каталога
* \Bitrix\Catalog\ProductTable::TYPE_PRODUCT - простой товар
* \Bitrix\Catalog\ProductTable::TYPE_SKU товар с торговыми предложениями
* \Bitrix\Catalog\ProductTable::TYPE_OFFER торговое предложение
*
* @var int
*/
public $productType;
2021-05-31 16:33:02 +03:00
/**
* @param $productValue
* @param $offerValue
* @return mixed
*/
public function mergeValues($productValue, $offerValue)
{
return empty($offerValue) ? $productValue : $offerValue;
}
}