I have successfully extend the _getProductCollection function at \Magento\Catalog\Block\Product\ListProduct to my custom module block, the problem is I need to add text input to layered navigation so I can get the requested data in my block and do some custom filtering product collection roughly like this:

    protected function _getProductCollection()
        $productCollection = parent::_getProductCollection(); 
            $customInput = $_GET['custom_input'];
            $productCollection = $this->myModuleHelper->filterProduct(customInput, productCollection);
        $this->_productCollection = $productCollection;
        return $proCollection;

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.