• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/helpers/admin/iblockpricechanger.php
  • Класс: BitrixCatalogHelpersAdminIblockPriceChanger
  • Вызов: IblockPriceChanger::collectPriceSkuElementsId
private function collectPriceSkuElementsId($productsIdList)
{
	$sectionElementsIdList = array();

	$skuIdList = CCatalogSku::getOffersList($productsIdList['ELEMENTS'], $this->iblockId);
	if(is_array($skuIdList))
	{
		foreach ($skuIdList as $skuId => $skuListElements)
		{
			$sectionElementsIdList[] = $skuId;
			foreach ($skuListElements as $skuElement)
			{
				$priceElementsIdList['SKU_ELEMENTS'][] = $skuElement["ID"];
			}
		}
	}

	if (empty($priceElementsIdList))
	{
		$priceElementsIdList['SIMPLE_ELEMENTS'] = $productsIdList['ELEMENTS'];
	}
	elseif ($elementsWithoutSkuIdList = array_diff($productsIdList['ELEMENTS'], $sectionElementsIdList))
	{
		$priceElementsIdList['SIMPLE_ELEMENTS'] = $elementsWithoutSkuIdList;
		unset ($elementsWithoutSkuIdList);
	}

	return $priceElementsIdList;
}