$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;
} /**
* Check if a product has an instant download
*
* @deprecated in 5.5, this function will be removed in 5.7 without replacement
*
* @param int $id s_articles.id
* @param int $detailsID s_articles_details.id
* @param bool $realtime
*
* @return bool
*/