4

Is there any way to filter products grid collection in the admin > Product > Catalog grid by category Magento 2.1+?

I would like to filter products that are within a filtered category.

There seems to be a few examples of how to add Category column to the Grid however, I have tried 3 separate examples, and none of them seem to work.

3
  • take into consider that Product can be assign to more thn one category Commented Jan 13, 2017 at 6:52
  • I also have a similar problem. Could you help me to solve, please? magento.stackexchange.com/questions/173195/…
    – Trang Lee
    Commented May 8, 2017 at 2:12
  • Buy Amasty's Grid editor, it adds all sorts of sort functions including categories. Commented May 8, 2017 at 16:09

1 Answer 1

11

Even if this is an old thread there is still no free solution... So I've created a free extension that adds the feature of category filter in the admin product grid.

https://github.com/utklasad/magento2-admin-product-grid-category-filter

Cheers!

8
  • Hi i have installed your extension, but when i click on the catalog in admin panel i'm getting this error {"0":"Recoverable Error: Argument 1 passed to Utklasad\\AdminProductGridCategoryFilter\\Model\\Category\\CategoryList::__construct() must be an instance of Magento\\Catalog\\Model\\ResourceModel\\Category\\CollectionFactory, instance of Magento\\Framework\\ObjectManager\\ObjectManager given, called in \/var\/www\/html\/work\/hoodmart\/vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php . Can you help me please. Commented Aug 30, 2018 at 13:24
  • 2
    I have fixed it. app/code/Utklasad/AdminProductGridCategoryFilter/Model/Category/Categorylist.php. in this file change the class name from CategoryList to Categorylist Commented Aug 30, 2018 at 13:31
  • Ah, sorry for the typo there... I will fix it in the repo. Thanks!
    – utklasad
    Commented Aug 31, 2018 at 14:12
  • 3
    Man why is this not a core feature. Cheers! Commented Nov 18, 2019 at 23:20
  • 1
    it looks like the "open source community" has give in the edge to it's enterprise counterpart
    – Typo
    Commented Jul 1, 2020 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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