网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > 代码交流
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

代码交流 ASP,PHP,JSP等网站源代码下载与交流。

Reply
 
Thread Tools Display Modes
  #1   IP: 153.99.38.51
Old 2015-04-24, 04:03 AM
Ranchos de Taos Ranchos de Taos is offline
初级会员
 
Join Date: 2007-07-15
Posts: 1
Ranchos de Taos 现在声名狼藉
Default Magento get products without category

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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

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

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:44 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.