Why does my search engine not navigate or call my custom controller when i have overriden my default Magento search engine.
When i search for a product keyword, it redirects to core
localhost:1338/magento2x_2/catalogsearch/result/?q=keyword
But i want it as:
localhost:1338/magento2x_2/tglssearch/result/?q=keyword
I have overridden Catalogsearch in etc di as:
<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Company\Module\Controller\Result\Index" />
My frontend routes:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route id="tglssearch" frontName="tglssearch">
<module name="Vendor_Module"/>
</route>
</router>
</config>