• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/base.php
  • Класс: BitrixIblockComponentBase
  • Вызов: Base::getBestSellersProductIds
protected function getBestSellersProductIds()
{
	$productIds = array();
	$filter = $this->getBestSellersFilter();

	if (!empty($filter))
	{
		$productIterator = CSaleProduct::GetBestSellerList(
			$this->arParams['BY'],
			array(),
			$filter,
			$this->arParams['PAGE_ELEMENT_COUNT']
		);
		while($product = $productIterator->fetch())
		{
			$productIds[] = $product['PRODUCT_ID'];
		}
	}

	return $productIds;
}