Header Ad

Monday, April 12, 2010

How to get product data using product id in MAGENTO

We can use the following code to get the product data using product id.
$_product = new Mage_Catalog_Model_Product();
$product_id = 535;//define the product id which you required
$_product->load($product_id);
From the above step, all the product data will be loaded in the $_product Product object. Use the following code to print the total data.
echo "

";

print_r($_product->getData());

No comments: