• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/helpers/admin/skuprops.php
  • Класс: BitrixSaleHelpersAdminSkuProps
  • Вызов: SkuProps::filterByProps
static function filterByProps(array $skuProps, array $offersIds = array())
{
	if(empty($offersIds))
		return array();

	if(!Loader::includeModule('iblock'))
		return array();

	$result = array();
	$filter = array('ID' => $offersIds);

	foreach($skuProps as $id => $value)
	{
		$propField = 'PROPERTY_'.$id;

		if($value == '-')
			$filter[$propField] = false;
		else
			$filter[$propField] = $value;
	}

	$res = CIBlockElement::GetList(array("SORT"=>"ASC"), $filter, false, false, array('ID'));

	while($el = $res->Fetch())
		$result[] = $el['ID'];

	return $result;
}