Das Bild wird in Mail nicht angezeigt
-
16-10-2019 - |
Frage
Ich habe das benutzerdefinierte Modul erstellt, in diesem Bereich habe ich eine E -Mail mit Produktinformationen mit Produktbild gesendet. Gut funktionieren, aber das Bild wird nicht angezeigt, nur die URL wird in Mail angezeigt.
Mein Code ist:
observer.php
public function customerRegisterSuccess(Varien_Event_Observer $observer)
{
if (Mage::registry('my_observer_has_run')) {
return $this;
}
Mage::register('my_observer_has_run', true);
....
$emailTemplateVariables['Product_Name'] = $information['name'];
$emailTemplateVariables['Product_Price'] = $information['price'];
$emailTemplateVariables['Product_SKU'] = $information['sku'];
$emailTemplateVariables['Product_Description'] = $information['description'];
if (count($product->getMediaGalleryImages()) > 0){
foreach ($product->getMediaGalleryImages() as $_image){
$thumbnail12 = Mage::helper('catalog/image')->init($product->getProduct(), 'image', $_image->getFile())->resize(2000);
$thumbnail13 = str_replace('/webApps/migration/productapi/new/','/',$thumbnail12);
$emailTemplateVariables['Product_Image']=$thumbnail13;
}
}
.....
}
in locale\en_US\template\email\custom_mail.html
Thank You.<br /><br/><br/><br/>
<b>Product Details</b><br/><br/>
<a href="{{store url=""}}"><img src="{{var Product_Image}}" alt="{{var Product_Image}}" style="margin-bottom:10px;" border="0"/></a>
Product Name : {{var Product_Name}}.<br/>
Product Price : {{var Product_Price}}.<br/>
Product SKU : {{var Product_SKU}}.<br/>
Product Description : {{var Product_Description}}.<br/></br><br/><br/>
Meine Mail empfängt unten Text.
Thank you,
Product Details
http://localhost/magento/media/catalog/product/cache/1/image/2000x/9df78eab33525d08d6e5fb8d27136e95/c/o/computer.jpg.
Product Name : Monitor.
Product Price : 1000.0000.
Product SKU : Dell001.
Product Description : Monitor.
E -Mail empfängt, aber das Bild wird in Mail nicht angezeigt.
Kannst du mir sagen, wie ich das lösen kann?
Danke.
Lösung
Ich denke
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange