get product thumb images on view.phtml

get product thumb images on view.phtml

<?php $_images = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages(); ?>
 <?php if($_images){?>
 <?php $i=0; foreach($_images as $_image){ $i++; ?>
 <a href="#" onclick="ig_lightbox_show(-1)">
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail', $_image->getFile())->resize(108,90); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel());?>" title="<?php $this->htmlEscape($_image->getLabel());?>" />
 </a><?php } ?> <?php } ?>

You may also like...

%d bloggers like this: