40 public function getList(array $options = []): array
44 if (!Loader::includeModule(
'sale'))
49 $limit = $options[
'limit'] ?? self::DEFAULT_GET_LIST_LIMIT;
51 $viewedProductsList = Catalog\CatalogViewedProductTable::getList(
54 '=FUSER_ID' => (
int)\CSaleBasket::GetBasketUserID(
55 !Catalog\
Product\Basket::isNotCrawler()
57 '=SITE_ID' => SITE_ID,
64 'DATE_VISIT' =>
'DESC',
70 while ($viewedProduct = $viewedProductsList->fetch())
73 Catalog\v2\IoC\ServiceContainer::getRepositoryFacade()
74 ->loadVariation((
int)$viewedProduct[
'PRODUCT_ID'])