I had added a category dropdown in form.mini.phtml file and submitted the search form. I tried modifying the collection of the list.phtml file which is in Magento_Catalog module but hard luck. Kindly advice how to filter the search result product collection using the category id.

  • hae you tried funtion addFeildToFilter('feild',$value) of magento category Collection Oct 30 '19 at 6:34
  • I have tried it in list.phtml for $block->getLoadedProductCollection(); but not working.
    – Rising
    Oct 30 '19 at 7:17

You can try (Magento 2.3)


on collection

Please refer below path


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.