Magento查找孤儿产品 [英] Magento find orphan products
本文介绍了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
这篇关于Magento查找孤儿产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文