I have used below code in,



  $_productCollection = $block->getLoadedProductCollection();
  $_helper = $this->helper('Magento\Catalog\Helper\Output');

I am filtering category loaded products here, with the attribute "best_seller".

The code is working and products are filtered and showing in list page, but the count in layer navigation is not correct.

Am i used correct code? Is there any other way to override list page products.

Please anyone suggest me how this can be done? Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.