• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_product_helper.php
  • Класс: \CCrmProductHelper
  • Вызов: CCrmProductHelper::PrepareListItems
static function PrepareListItems($catalogID = 0)
{
	$catalogID = intval($catalogID);
	$result = array();
	$filter = array('ACTIVE' => 'Y');
	if ($catalogID > 0)
	{
		$filter['CATALOG_ID'] = $catalogID;
	}

	$rs = CCrmProduct::GetList(
		array('SORT' => 'ASC', 'NAME' => 'ASC'),
		$filter,
		array('ID', 'NAME')
	);

	while ($ar = $rs->Fetch())
	{
		$result[$ar['ID']] = $ar['NAME'];
	}

	return $result;
}