• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/base.php
  • Класс: BitrixIblockComponentBase
  • Вызов: Base::filterPureOffers
protected function filterPureOffers()
{
	if (!empty($this->productIds) && is_array($this->productIds))
	{
		foreach ($this->productIds as $productId)
		{
			// check if it's element
			if ($this->productIdMap[$productId] == $productId)
			{
				continue;
			}

			if (isset($this->elementLinks[$this->productIdMap[$productId]]) && !empty($this->elementLinks[$this->productIdMap[$productId]]['OFFERS']))
			{
				// clear all unwanted offers
				foreach ($this->elementLinks[$this->productIdMap[$productId]]['OFFERS'] as $key => $offer)
				{
					if ($offer['ID'] != $productId)
					{
						unset($this->elementLinks[$this->productIdMap[$productId]]['OFFERS'][$key]);
					}
				}
			}
		}
	}
}