Magento查找孤儿产品

问题描述:

有没有一种简便的方法可以获取/查看与类别或可配置产品都不相关的所有产品的列表?

Is there an easy way I can pull/see a list of all products that are neither associated to a category or configurable product?

我相信此SQL查询将为您提供帮助.

I believe this SQL Query will help you.

 select
    type_id,sku
 from catalog_product_entity a
 left join catalog_category_product cp on cp.`product_id` = a.entity_id
 left join catalog_product_relation cpr on cpr.child_id = a.entity_id
 where 
       cp.product_id is null 
   and cpr.parent_id is null
   and a.type_id != 'configurable' -- per ben below