1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Alter getProduct collection

Discussion in 'Programming/Internet' started by Morgan Tartreau, Oct 8, 2018.

  1. I need to alter the equivalent of native "getProductCollection", but I don't know how and where to do this.

    I need the getProductCollection to look like this :

    public function getProductCollection()
    $collection = $this->_productCollectionFactory->create();
    $collection->addFieldToFilter('bio', true);
    return $collection;

    this code works fine, but it's not on the catalog product page. How do I change the initial function to add my addFieldToFilter

    Login To add answer/comment

Share This Page