Sometimes merchants may have missed selecting categories for the products when creating new products or while importing them. If they want to list them at a later point in time and assign categories to those products, there is no default report in admin.
It will be great if there is such a report for merchants who manage products in Magento admin. We can use the below collection query in a custom module to generate a product report in admin for merchants.
The below product collection resolves the issue and provides us the list of configurable products
- whose child SKUs are in stock and
- assigned to none of the categories and
- that are not assigned to any of the active categories
The below collection result will provide us the following attributes
- Product ID
- Name of configurable product
We can add more columns in the $columns array and update the collection JOIN to filter the columns.
Columns can be added / removed and the developer can use this query to generate a report based on the business needs of the merchant.