Skip to content

Issue while exclude products in category listing

I need to exclude specific attribute products in the category and search collection. I have created beforePrepareProductCollection from the ‘MagentoCatalogModelLayer’ Class. It is working fine. But It also excludes products from the category page and makes the pagination from 24 to 23. The pagination should be of 24