Script to get all product magento

Below is the script which display all magento product

create new file in root of the magento source and add below code in that file

$_productCollection = Mage::getModel('catalog/product')
->addAttributeToSort('created_at', 'DESC')
foreach ($_productCollection as $_product){
echo $_product->getId().'</br>';
echo $_product->getName().'</br>';
echo $_product->getProductUrl().'</br>';
echo $_product->getPrice().'</br>';

Tags: Magento1,

Related Posts

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *