It is easy to find out what products are in a category.

Is there a way to find out what products are NOT in a category?

Is there a way to find out what products are NOT in any categories?

My purpose for this is to search products that may have been entered and, for some reason, the category tab was forgotten resulting in a product that cannot be found as it should.


There is no way to do this from the Magento admin. If you are merely looking for a way to do this as a developer, the following query will get you a list of SKUs and product IDs:

SELECT e.entity_id, e.sku FROM catalog_product_entity AS e LEFT JOIN catalog_category_product AS l ON l.product_id = e.entity_id WHERE l.category_id IS NULL 

If you want to pull this functionality into the Magento admin for product managers to work with, you'll basically just need to build the UI and then join this same category link table to a product collection which you can then use to show a list of orphaned products.

| improve this answer | |

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.