I would like to have an open discussion around an issue we have related to product categories.
We have a set of products. Each product is related to a product category, in which has a set of attributes.
So far so good, we thought.
First out we started creating each of the product categories. The structure of the categories are roughly like this.
Product Categories |
Field 1 |
Field 2 |
Field 3 |
Field 4 |
Field 5 |
Category 1 |
X |
X |
X |
|
|
Category 2 |
X |
|
X |
|
X |
Category 3 |
X |
X |
|
X |
X |
In this setup we can see that some of the fields or used across multiple categories, and are duplicated in each category. So far this is not an issue.
We added data to the products, and it looked good. One of the conditions is that we do not want to show attributes not related to a specific item. So on a item card for product 1 which is related to category 1 we only want to show field1, field 2 and field 3. This is working as intended.
The problems started to show as soon as we wanted to add filtering using facets.
We wanted "Field 1" to be a filter group, but when we tried to add that we quickly saw that "Field 1" was present 3 times in the drop down. Not unexpected, but anyway not what we hoped for.
So the question is then, how can we use facets and product categories together in this scenario?
One solution would be to make all fields as regular flat out custom fields. But then we lose the possibility to only show a list of the relevant fields on a product. As mentioned, product 1 which is related to category 1 does not want to show fields releated to category 2 and 3. You might say that we can hide fields with no value, but that is not possible for boolean fields.
Another thing that is great about the category way of doing it is that the fields can be sorted in different ways related to the category.
All in all we are a bit stuck on this task. Are there other ways to solve this?
Is it possible to lets say aggregate same fields in multiple categories to one field which can be used in facets?