如何让商店列出所有与产品无关的产品?
答案 0 :(得分:15)
这适用于所有Magento版本:
$products = Mage::getModel('catalog/product')->getCollection();
//Magento does not load all attributes by default
//Add as many as you like
$products->addAttributeToSelect('name');
foreach($products as $product) {
//do something
}