I want to change the design product image section on view page.
Trying to fetch all three Images seprately.
$ImageAll = $_product->getMediaGalleryImages();
$mainImg = Mage::helper('catalog/image')->init($_product, 'small_image')->resize(163, 10);
$thumbNailImg = Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(400, 400);
$smallImg = Mage::helper('catalog/image')->init($_product, 'image')->resize(60,60);
One more thing if we change the position of above variable then the last variable is only used
But it gives me the same image in all the three images tags.
<img src="<?php echo $mainImg; ?>" alt="<?php echo $_product->getName()?>" />
<img src="<?php echo $thumbNailImg; ?>" alt="<?php echo $_product->getName()?>" />
<img src="<?php echo $smallImg; ?>" alt="<?php echo $_product->getName()?>" />
BUt if i use this way all works perfectly
<img src="<?php echo Mage::helper('catalog/image')->init($_product, 'image')->resize(100,160); ?>" alt="<?php echo $_product->getName()?>" />
<img src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(200, 200); ?>" alt="<?php echo $_product->getName()?>" />
<img src="<?php echo Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(400, 400); ?>" alt="<?php echo $_product->getName()?>" />
Can anyone help me to understand the difference between them?