hi all,
I have been trying to figure this out but have lost on this one for sure....
basically the search field works fine when i search a subcategory which has some products in it but if i search the parent category's name, the search comes out with NO PRODUCTS.
What can I do to modify the sql query to get the search to list out all subcategories and their products when their parent category is searched for.
example -
Parent category - A
Sub-category - BB >> Products
Sub-category - CC >> Products
Sub-category - DD
Sub-category - EE >> Products
In the above scenario, in my search, as of now, if I search using BB/CC/EE, all the products from their respective categories get listed.
But if I search A/DD, since they do not have any products, the search returns no products.
Ideally what I would like to accomplish is if A is searched, all products from BB-CC-EE should be returned.
If DD is searched for, all products from EE should be listed.
The reason I wanna accomplish this especially for products to be returned when A is the search input is because in my scenario A would be the BRAND NAME. I cannot put this under manufacturer table, please don't ask me why because thats a long a different story.
I'm just not able to figure this out because i'm stuck with the idea that it cannot be done since the product to category table will not have the entry for the category_id of A/DD. So obviously no products are displayed....
if someone can just discuss this problem and guide me..i would be highly grateful.
Thank you.
callingrohit



