Hi
Is it possible to create a search bar in each categories main page and it will only search within that category and it's sub category only.
Hi
Is it possible to create a search bar in each categories main page and it will only search within that category and it's sub category only.
Try the following solution
https://forum.cs-cart.com/topic/43343-add-categories-dropdown-to-search-box/#entry240914
Thanks. But I don't need a drop down select filter. I prefer, by default, the search bar I placed in the category layout to search only the product it's category and it's sub category without user to select more options.
I ask because I have many similar named product in different category. So if user entered one category, they will only search within that category.
So try to create the following file
/design/themes/YOUR_THEME/templates/addons/my_changes/hooks/search/additional_fields.pre.tpl
and this code
{if $smarty.request.category_id} {/if}
Then make sure that the My changes module is enabled and clear cache
(!) Not tested
thank you so much. it works!
You are welcome! :)