searchFuzzyCheck example

/** * Default search */
    public function defaultSearchAction()
    {
        $this->setDefaultSorting();

        $term = $this->getSearchTerm();

        // Check if we have a one to one match for order number, then redirect         $location = $this->searchFuzzyCheck($term);
        if (!empty($location)) {
            $this->redirect($location);

            return;
        }

        $this->View()->loadTemplate('frontend/search/fuzzy.tpl');

        $minLengthSearchTerm = $this->get(Shopware_Components_Config::class)->get('minSearchLenght');
        if (\strlen($term) < (int) $minLengthSearchTerm) {
            return;
        }
Home | Imprint | This part of the site doesn't use cookies.