The new order email template is rendering everything except the product image of the order.
This is how the template was trying to call it by default, which doesn't work:
{{layout handle="sales_email_order_items" order=$order}}
This is the error:
Can anyone advise on what might be the problem.
This is the function i worte:
app/design/frontend/base/default/template/email/order/items/order/default.phtml
if ($_item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
$parentId = Mage::getModel('catalog/product_type_configurable')
->getParentIdsByChild($_item->getProductId());
$_product = Mage::getModel('catalog/product')
->setStoreId($_item->getOrder()->getStoreId())
->load($parentId);
} else {
$_product = Mage::getModel('catalog/product')
->setStoreId($_item->getOrder()->getStoreId())
->load($_item->getProductId());
}
?>
this is display code:
<img src="<?php echo Mage::getModel('catalog/product_media_config')
->getMediaUrl($_product->getThumbnail()); ?>" width="135" height="135" alt="<?php echo $_item->getName() ?>" />
src
in your email when you inspect?src
this is thathttps://www.domain.in/media/catalog/product/
( for eg: www.domain.in)echo Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(135)->__toString();
as your image src value?