Magento Coding Solutions

getMedia Image By product Id in magento

  $_product = Mage::getModel('catalog/product')->load($product->getId());

  $product->getMediaGalleryImages();        // This returns nothing
  $_product->getMediaGalleryImages(); 
 
 
 
<?php
$model = Mage::getModel('catalog/product') //getting product model
$_product = $model->load($productid); //getting product object for particular product id
echo $_product->getShortDescription(); //product's short description
echo $_product->getDescription(); // product's long description
echo $_product->getName(); //product name
echo $_product->getPrice(); //product's regular Price
echo $_product->getSpecialPrice(); //product's special Price
echo $_product->getProductUrl(); //product url
echo $_product->getImageUrl(); //product's image url
echo $_product->getSmallImageUrl(); //product's small image url
echo $_product->getThumbnailUrl(); //product's thumbnail image url  
?>
 

No comments:

Post a Comment