I am working on a Magento e-commerce site.
I need to disable the Catalog Advanced Search.
I checked with source code available in the stackexchange but its not working.
Magento – How to hide the Catalog Advanced Search in magento version 1.9
advanced-searchcatalogsearchmagento-1.9
Best Answer
To remove the link to advanced search edit
app/design/frontend/{package}/{theme}/layout/catalogsearch.xml
.If the file does not exist in your theme, copy it from
base/default
. Then remove this from the file:But this will still leave your controller active, and anyone with a link can access it.
To restrict this, create an observer for the events
controller_action_predispatch_catalogsearch_advanced_index
andcontroller_action_predispatch_catalogsearch_advanced_result
with this code:This will redirect the users to a 404 page when trying to access the advanced search form or result page.