5

I used this code to display a Thumbnail image :

<?php echo $this->getProductThumbnail()->resize(50, 50)?>

but i would like to display the small image. I used that to my sidebar cart

  • Hey Amirov, did you have any progress on this question? – Sander Mangel Oct 7 '13 at 8:40
12

You can use the catalog image helper to get any type of image.

$_product = $_item->getProduct();
echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(50,50);

If I'm correct $_item->getProduct() is an instance of Mage_Catalog_Model_Product, if not you'll need to load the instance first per item

$_product = Mage::getModel('catalog/product')->load($_item->getProduct()->getId());
echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(50,50);
  • How can i get small image in View order inside customer account like -> snag.gy/2KUce6.jpg – zus May 26 '18 at 13:14
0
<img src='.$this->helper('catalog/image')->init($product, 'small_image')->resize(225, 225).' width=\'225\' height=\'225\'/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.