![]() |
|
|||||||
| 代码交流 ASP,PHP,JSP等网站源代码下载与交流。 |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 153.99.38.51
|
|||
|
|||
|
Get a list of all orphaned products which are not associated with any category in Magento. Sometimes you may have missed to select categories for products by mistake when filling new product details, and now want to list them and assign categories to those products. You can’t get it from the Magento admin screen so you will need to run below MySQL query to get all the products without categories.
Code:
SELECT e.entity_id, e.sku, e.name FROM catalog_product_entity AS e LEFT JOIN catalog_category_product AS cp ON cp.product_id = e.entity_id WHERE cp.category_id IS NULL Above sql query will simply bring the product ID, SKU, Name of products where category is NULL. You can add more columns in select (like e.*) to list full details of products. |
![]() |
| Currently Active Users Viewing This Thread: 3 (0 members and 3 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Show Category and Tag Descriptions In WordPress Theme | topvip | WordPress | 0 | 2010-11-03 09:46 PM |
| How Can Your Products Show On Google Shopping Results | topvip | 闲话灌水 | 0 | 2010-10-30 10:37 AM |
| magento产品类别优化 | topvip | 代码交流 | 0 | 2010-10-26 01:25 PM |
| Becoming an editor at the Open Directory | yahoo | 闲话灌水 | 0 | 2009-05-24 01:08 PM |
| Category descriptions (phpld) | topvip | Web Directory | 1 | 2007-07-10 02:04 AM |