is there a possibility to tell magento mini search to search only in one category ? I found couple of tutorials to get it in advanced search as a dropdown - but i want to specify only one category and in mini search


The quick and dirty way to do this is to add a hidden form element to the app/design/frontend/NAMESPACE/THEME/template/catalogsearch/form.mini.phtml template:

<input type="hidden" name="cat" value="CATEGORY_ID" />

When you submit the form, this category ID will be used to add a filter to the result collection.

  • 1
    I wouldn't call this dirty - it's clever. – philwinkle Feb 26 '14 at 16:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.