Good evening, I add a function to insert a picture in the order confirmation email Magento 1.9

<img src="<?php echo Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getThumbnail()); ?>" 
 alt="<?php echo $_item->getName() ?>"/>

But I can't resize it

Example : getMediaUrl($_product->getThumbnail())->resize(150); ?>" alt="getName() ?>"/>

could you help me ?`


Try below code:

<img src="<?php echo Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(150); ?>" alt="<?php echo $_item->getName() ?>"/>

I hope this helps!

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.