Showing posts with label magento email. Show all posts
Showing posts with label magento email. Show all posts

Tuesday, November 9, 2010

Magento - Add Thumbnail Image in Transaction email



A client requested adding product thumbnail images in the Order Confirmation Email that is sent after a customer order a product.. Without much ado here's the code...

<?php //added for sending image with order
$product = Mage::getModel('catalog/product')
->setStoreId($_item->getOrder()->getStoreId())
->load($_item->getProductId());
?>
<p align="center"><img src="<?php echo Mage::helper('catalog/image')->init($product, 'image')->resize(50); ?>" width="50" height="50" alt="" /></p>

add this snippet below <td align="left" valign="top" style="padding:3px 9px">

NOTE: Don't forget to allow Display of Image in your email client (mine is gmail)