For sites using Magento Klevu module versions 3.x or 2.x, please refer to this article. For version 4.x, kindly follow this link.
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 :
- Open the file <magento-root>/vendor/klevu/module-productsearch/etc/frontend/routes.xml
- Change the following code
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="search"> <module name="Klevu_Search"/> </route> </router> </config>
<?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 :
- Open the file <magento-root>/vendor/klevu/module-productsearch/etc/frontend/routes.xml
- Change the following code
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="search"> <module name="Klevu_Search"/> </route> </router> </config>
<?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>
- 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.