$minLengthSearchTerm =
$this->
get(Shopware_Components_Config::
class)->
get('minSearchLenght'
);
if (\
strlen($term) <
(int) $minLengthSearchTerm) { return;
} $context =
$this->
get(ContextServiceInterface::
class)->
getShopContext();
$criteria =
Shopware()->
Container()->
get(StoreFrontCriteriaFactoryInterface::
class) ->
createSearchCriteria($this->
Request(),
$context);
$result =
$this->
get(ProductSearchInterface::
class)->
search($criteria,
$context);
$products =
$this->
convertProducts($result);
if ($this->
get(Shopware_Components_Config::
class)->
get('traceSearch', true
)) { $this->
get('shopware_searchdbal.search_term_logger'
)->
logResult( $criteria,
$result,
$context->
getShop() );
} $pageCounts =
$this->
get(Shopware_Components_Config::
class)->
get('fuzzySearchSelectPerPage'
);