ProductLoader::loadPropertyValues

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ProductLoader
  4. loadPropertyValues
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/documentgenerator/productloader.php
  • Класс: Bitrix\Crm\Integration\DocumentGenerator\ProductLoader
  • Вызов: ProductLoader::loadPropertyValues
protected function loadPropertyValues(): array
{
	if ($this->propertyValues !== null)
	{
		return $this->propertyValues;
	}
	$this->propertyValues = [];
	$productIds = $this->getProductIds();
	if (empty($productIds) || $this->productIblockId <= 0)
	{
		$this->propertyValues = [];
		return $this->propertyValues;
	}

	$productProperties = $this->loadProductProperties();
	$productPropertyIds = array_keys($productProperties);
	$this->propertyValues = $this->loadIblockPropertyValues($this->productIblockId, $productIds, $productPropertyIds);

	$offerIds = $this->getOfferIds();
	if (empty($offerIds) || $this->offerIblockId <= 0)
	{
		return $this->propertyValues;
	}

	$offerProperties = $this->loadOfferProperties();
	$offerPropertyIds = array_keys($offerProperties);
	$offerPropertyValues = $this->loadIblockPropertyValues($this->offerIblockId, $offerIds, $offerPropertyIds);
	foreach ($offerPropertyValues as $itemId => $values)
	{
		$this->propertyValues[$itemId] = $values;
	}

	return $this->propertyValues;
}

Добавить комментарий