Posted on 16/04/2020 13:03:21
Hi Nicolai,
I agree suggesting a solution is not the way to go. I apologise.
My whole problem started when we started implementing Compare functionality.
We would like to only allow comparing products from the same group, mainly because the ProductCategoryFields should be the same.
I agree that it would be stupid for a user to try and compare Laptops with Shoes but if they are in a generic category called "Spring Products" and they both have the "Compare" option, in theory, they can select both of them to compare.
What we are doing is check if the second product added to the comparison is in the same group as the first one. To do that, we need a way to get a consistent definition of the relevant Group the product is assigned to. We are using right now PrimaryOrDefault but I am afraid the logic behind this tag might not render always the right group. That's why I thought that Having a default group per shop might help with this and any other situations where you need something similar.
I have not asked to have 2 product fields with the same name from different product categories inherited on the product. For Inheritance purposes, I'd expect that only the ProductCategories assigned to the groups of the shop I am looking into should be inherited. But that's another story.
The way the Product Categories are used right now prevents this type of filtering per shop and a product seems to inherit all ProductCategories from all groups regardless of the Shop. There are definitely benefits from this approach but also downsides. So far it seems that the benefits outweigh the downsides.
I hope my explanation makes sense.
Thank you,
Adrian