$criteria =
$this->
createCategoryStreamCriteria($categoryId,
$streamId,
$context);
} else { $criteria =
$this->storeFrontCriteriaFactory
->
createListingCriteria($this->
Request(),
$context);
} // Creating the criteria above will also set the sPage param to at least 1, which we don't want
$this->
Request()->
setParam('sPage', null
);
// Performance increase
$criteria->
setFetchCount(false
);
$criteria->
resetFacets();
$criteria->
limit(1
);
$numberResult =
$this->productNumberSearch->
search($criteria,
$context);
return $numberResult->
getTotalCount() > 0;
} /**
* @param array<string, mixed> $categoryContent
*/
private function getRedirectLocation(array
$categoryContent, bool
$hasEmotion, ShopContextInterface
$context): ?string
{