332 Posts
Kenneth
6 years ago
2
Topic

Hi,

I'm wondering if anyone has succeeded with a search that returns a list of categories that does in fact have articles in them that matches as search?

I'm building a product catalogue and on all products I want to add what the producer of the product is. 

I've also setup a listing to show all producers. And these producers have a detail page, where it's some information about them.

What I want to accomplish is to list products they have produced, and to be able to filter these products by their category. 

Let's say there is in total 30 categories. This specific producer has 100 products spread accross 10 of these categories.

Can I list these products with a category filter, that only shows the categories that in fact have a product from this producer?

I've tried to figure out how to do this, but I come up short..

Get a VIP membership
4229 Posts
Kadministrator
6 years ago
1
Level 1

Probably the easiest would be to use search join and do a right join on category id = product table catid, with the table that contains your products

332 Posts
Kenneth
6 years ago
0
Level 2

Genious!! 

I'll try this in the comming time, and post back with results.

Get a Book for SEBLOD