Adding filters to a page that takes a product list

Hello,

we have a page that takes a product list and renders all the products. The customer uses this kind of page for when they are having sales. The problem is the list contains products from alot of categories and we would like to add an extra filter for categories as well as color and sizes. I havn’t found any good resource in docs which would lead me in the correct direction. What is the best way to approach this for an accelerator solution?

Litium version: 6.2

Try changing the method GetPropertyNames in ProductFilterTags.cs:

if (_context.CurrentState.PageType.Name.IsSearchResultPageType() || _context.CurrentState.PageType.Name.IsProductListPageType())
{
	return new[] { FilteringConstants.FilterProductCategories }.Concat(filters);
}

This would give you the same view as on the search result page.

If you want to add additional products filters on your site, you can edit the AcceleratorFilterFields field under Settings > Products > Fields.

Changing the IF statement did the trick. Thank you @NilsN!

1 Like

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