How to restrict virtuemart product search to specific categories – Virtuemart 2.0.6 for Joomla 2.5
I have seen alot of people using Virtuemart shopping cart for their online shop. Everyone wants his/her own type of modules and plugins for shop.
I have seen people failing to restrict search for specific categories for joomla 2.5. So there is an easy hack for you that will help you to restrict search to specific categories.
Open this file:
On line 416:
$whereString = ‘ WHERE (‘.implode(‘ AND ‘, $where ).’) ‘;
replace this code with
$whereString = ‘ WHERE (‘.implode(‘ AND ‘, $where ).’) AND ( `#__virtuemart_product_categories`.`virtuemart_category_id` IN(1,2,3) )’;
here 1,2,3 are ids of your categories from where u want to do search.