How to Get Product details Using Product Id in Magento


<code>$obj = Mage::getModel('catalog/product');
 $_product = $obj->load($product_id); // Enter your Product Id in $product_id
 // get  Product's name
 echo $_product->getName();
 //get product's short description
 echo $_product->getShortDescription();
 //get Product's Long Description
 echo $_product->getDescription();
 //get  Product's Regular Price
 echo $_product->getPrice();
 //get  Product's Special price
 echo $_product->getSpecialPrice();
 //get Product's Url
 echo $_product->getProductUrl();
 //get Product's image Url
 echo $_product->getImageUrl();</code>

Advertisements
  1. July 16th, 2011
    Trackback from : Magento « PHP Web Developer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: