We need to add some special code to filter out what products are returned when a category is rendered. We can see in the code where SS builds the query to return the list of products. Is there a way for us to hook into that so we can edit the query before it goes to the server? We really don't want to edit the core code.
Customize the category product list return
1 Antwort zu diesem Thema
Geschrieben: 25 May 2018 - 08:47
You can use an action filter to filter the execution of CatalogController.Category and get to the view model CategoryModel. It has the property SearchResult with the search hits of the relevant category. Here is an example filter that shows this using for the product detail page as an example. Registration of the filter is here.
Schöne Grüße aus Düsseldorf,