I have a Store Model that can have multiple products. Each product has a category.
What is the most optimal way to get the list of categories for products in a store?
For eg. Store A has Products A (Cat1), Product B(Cat1), Product C (Cat2)
I want Cat1, Cat2 when I pass the Store A’s id.
1 Answer