12/28/2010

how to get all products in magento

To get All products in magento Store not from a particular category or to get all products from default store in magento ,write the following code

<?php
Mage::getModel('catalog/product')->getCollection()->getData();
?>

2 comments:

  1. im not getting any product how??

    ReplyDelete
  2. From the above code you will get all product and and from product id you can get all details of a product.

    ReplyDelete