We would like to group variants, e.g. on the category pages, according to a product grouping field. But we only want this grouping to occur if the grouping field has a value, i.e. keep variants without a value as separate boxes on the category page.
The reason is that some products in the field template should be grouped, but others should be ungrouped. And the only way to currently achieve this is to “invent” separate values for the grouping field for all non-grouped variants, which we don’t want.
Is there an out-of-the-box accelerator way to accomplish this? If not, where in the accelerator should we look?
For Elastic, you could update CreateModelsPerChannel to introduce your logic and only group the variants with values and then index the variant without values as separate documents.