public function load(Request
$request, SalesChannelContext
$salesChannelContext): SuggestPage
{ $page =
$this->genericLoader->
load($request,
$salesChannelContext);
$page = SuggestPage::
createFrom($page);
$criteria =
new Criteria();
$criteria->
setLimit(10
);
$criteria->
setTotalCountMode(Criteria::TOTAL_COUNT_MODE_EXACT
);
$page->
setSearchResult( $this->productSuggestRoute
->
load($request,
$salesChannelContext,
$criteria) ->
getListingResult() );
$page->
setSearchTerm((string) $request->query->
get('search'
));
$this->eventDispatcher->
dispatch( new SuggestPageLoadedEvent($page,
$salesChannelContext,
$request) );