Magento – List configurable products with certain criteria

associated-productsconfigurable-productmagento-1products-management

Is it possible to list all configurable products either on page or in SQL most likely to display any configurable products that have NO associated simple products on them.

For example – I have ~ 1,000 configurable products and to ensure none have been missed out having simple products assigned to them I want to be able to check without going through each one.

Also – the other way round is it possible to list simple products that have not been added to any configurable products at all?

Best Answer

You can use below mysql query to get all the configurable products which are not associated with any simple products.

SELECT entity_id FROM `catalog_product_entity`
WHERE `type_id` = 'configurable' AND entity_id NOT IN(
    SELECT DISTINCT parent_id FROM catalog_product_super_link
);