开发者

Get list of all products

How do I get the store to list all products, independent of 开发者_运维知识库category?


This should work in all Magento versions:

$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
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜