Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Get All Products
 
tman_f
Sr. Member
 
Total Posts:  85
Joined:  2008-02-12
 

Community,

Does anybody know an easy way to get all products?

for instance:

$products Mage::getSingleton('catalog/products')->getAllProducts();

Does anybody know of something like this?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
chapagain
Sr. Member
 
Avatar
Total Posts:  202
Joined:  2009-07-19
 

$collection Mage::getModel('catalog/product')
                        ->
getCollection()
                        ->
addAttributeToSelect('*');

foreach (
$collection as $product{
    
echo $product->getName() . "<br />";
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Vipan Kumar
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2012-08-27
Ludhiana, Punjab, India
 

$collection Mage::getModel('catalog/product')
                        ->
getCollection();

foreach (
$collection as $product{
    
echo $product->getName() . "<br />";
}

Tutorials
Join me at Facebook

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amit Kamboj
Jr. Member
 
Total Posts:  1
Joined:  2013-04-26
 

$products = Mage::getModel(’catalog/product’)->getCollection()->getData();
foreach ($products as $product) {
$id = $product[’entity_id’];
$newProduct = Mage::getModel(’catalog/product’)->load($id);
$sku = $product[’sku’];
}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top