else { $category =
$this->categoryId;
} $context =
$this->contextService->
getShopContext();
$criteria =
$this->storeFrontCriteriaFactory->
createBaseCriteria([$category],
$context);
$criteria->
limit($sLimitChart);
$criteria->
addSorting(new PopularitySorting(SortingInterface::SORT_DESC
));
$criteria->
setFetchCount(false
);
$result =
$this->searchService->
search($criteria,
$context);
$products =
$this->legacyStructConverter->
convertListProductStructList($result->
getProducts());
Shopware()->
Events()->
notify( 'Shopware_Modules_Articles_GetArticleCharts',
['subject' =>
$this, 'category' =>
$category, 'articles' =>
$products] );
return $products;
}