I have used below code for Grid Products Image in shopping cart tab, Its showing same image in all products, Please help , Kindly check attached snap-shot for more detail.
$this->addColumn('Image', array(
'header'=> Mage::helper('catalog')->__('Image'),
'type' => 'image',
'width' => '100px',
'index' => 'image',
'frame_callback' => array($this, 'callback_image')
));
public function callback_image()
{
$_productCollection = $this->getCollection();
foreach ($_productCollection as $_product){
$product_id = $_product->getProductId();
}
if(isset($product_id)){
$product = Mage::getModel('catalog/product')->load($product_id);
$productMediaConfig = Mage::getModel('catalog/product_media_config');
$smallImageUrl = $productMediaConfig->getMediaUrl($product->getSmallImage());
$width = 70;
$height = 70;
return "<img src='".$smallImageUrl."' width=".$width." height=".$height."/>";
}
}