Split product search results based on fieldtemplate

We’re trying to split up the search result based on which fieldtemplate that is used for products.

I’ve been looking in Litium.Accelerator\Builders\Search\SearchResultViewModelBuilder.cs on line 62, one of our ideas would be to iterate through searchResult.Products and separate the types of products into separate lists.

Then we could easily display the other type of product in a seprate list, the second list will look completely different, using a different ItemModel and view.

I don’t know if this is the right way to go, any help would be greatly appreciated.

Figure 1 - Current result

Figure 2 - Desired result

Litium version: 8.2.2

You can also create a field on the variant and depending on how many field templates you can choose the type of the field and base the search on that.

That could perhaps be a solution, I’ll have to discuss it with my team first.

I’ve managed to implement a solution that uses a field from the variant to create two separate lists.

Initially we had some issues with pagination, but I managed to create a workaround for that.
But there’s still an issue with filtering on the search result page.

We’re going to discuss this later today and see if it’s a viable solution.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.