小智 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
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
16900 次 |
| 最近记录: |