Open navigation

Search Page URL Conflict with Third-Party Module

If you are using other module for layered navigation (example Amasty, Manadev), you may find a conflict with Klevu's search result page URL. Issue: When you click on Klevu's autosuggestions it redirects you to URL which is handled by the other module, but not on Klevu's search result page. To resolve the issue, please follow the steps below :

  1. Open the file <magento-root>/vendor/klevu/module-productsearch/etc/frontend/routes.xml
  2. Change the following code
                         
    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
      <router id="standard">
        <route id="search" frontName="search">
          <module name="Klevu_Search"/>
        </route>
      </router>
    </config>
    to
    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
      <router id="standard">
        <route id="search" frontName="searchresult">
          <module name="Klevu_Search"/>
        </route>
      </router>
    </config>

Changing xml should resolve the issue, but after changing xml, if issue still persists, then follow the steps below :

  1. Open the file <magento-root>/vendor/klevu/module-productsearch/etc/frontend/routes.xml
  2. Change the following code
    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
      <router id="standard">
        <route id="search" frontName="search">
          <module name="Klevu_Search"/>
        </route>
      </router>
    </config>
           
    to
    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
      <router id="standard">
        <route id="searchresult" frontName="searchresult">
          <module name="Klevu_Search"/>
        </route>
      </router>
    </config>
           
  3. Open the directory <magento-root>/vendor/klevu/module-productsearch/view/frontend/layout.
    Replace the name of files from search_index_index.xml to searchresult_index_index.xml, from  search_index_runexternaly.xml  to  searchresult_index_runexternaly.xml  and from search_search_runexternalylog.xml to searchresult_search_runexternalylog.log. 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.