VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: mahootshop on April 20, 2017, 16:08:55 PM

Title: shipment Logo is not showing in emails... after update to 3.2.1
Post by: mahootshop on April 20, 2017, 16:08:55 PM
After updating virtuemart from 3.0.18 to 3.2.1 i realized that the logo in successful email message (which is sending in complete order status situation)  is not working.

The meaning of "its not working":

the image state is 404.

Why?
becuase its trying to load this url.

http:///images/stories/virtuemart/shipment/mylogo.jpg instead of http:/websiteurl/..../images/stories/virtuemart/shipment/mylogo.jpg


Here the code i used from  /public_html/components/com_virtuemart/views/invoice/tmpl/mail_html.php


<td align="left"><?php
    echo 
$this->orderDetails['shipmentName'];
    ?>
</td>


i should mentioning that, other images like, custom filed images are showing correctly in the email.



Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: lindapowers on April 21, 2017, 20:00:46 PM
Hi, was sure I had read something related to your issue, maybe it helps

https://www.olympianthemes.com/forum/general-questions/704-mail-order-html-template-the-images-are-not-seen.html?limitstart=0
Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: mahootshop on April 21, 2017, 22:43:23 PM
Quote from: lindapowers on April 21, 2017, 20:00:46 PM
Hi, was sure I had read something related to your issue, maybe it helps

https://www.olympianthemes.com/forum/general-questions/704-mail-order-html-template-the-images-are-not-seen.html?limitstart=0
Yeah.  Looks like it's the same.

I will quote the answer

Quote
Hi,
it is a bug of the new version of virtuemart because it gets a relative path for the images instead of an absolute one. There is nothing i can do for this, you need to wait for a newer vm version that will contain a fix for this, meanwhile you can remove the images from the shipping/payment methods.
Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: mahootshop on April 22, 2017, 08:03:25 AM
this code: foreach ($logo_list as $logo) {
if(!empty($logo)){
$alt_text = substr ($logo, 0, strpos ($logo, '.'));
$img .= '<span class="vmCart' . ucfirst($this->_psType) . 'Logo" ><img align="middle" src="' . JUri::root(true).$url.'/'.$logo . '"  alt="' . $alt_text . '" /></span> ';
}
}


changed to: foreach ($logo_list as $logo) {
if(!empty($logo)){
if(JFile::exists(VMPATH_ROOT .$url .DS.$logo)){
$alt_text = substr ($logo, 0, strpos ($logo, '.'));
$img .= '<span class="vmCart' . ucfirst($this->_psType) . 'Logo" ><img align="middle" src="' . JUri::root().$url.'/'.$logo . '"  alt="' . $alt_text . '" /></span> ';
}
}


will you confirm that its a Bug?
Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: mahootshop on April 22, 2017, 08:10:37 AM
thank you for your kind help.

the problem has gone after code replacing...

and also i can see it in the repository, so it will fix on next version.
Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: EIF on September 05, 2017, 17:01:50 PM
I am running Joomla 3.7.5 and VM 3.2.4, which has the correct code, but with me no images are showing in my emails. I do also have hard codes links to other images online. These images are showing correctly, so it is no security issue of my e-mail client.

Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: GJC Web Design on September 05, 2017, 19:16:59 PM
example url to an image from the email source?
Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: EIF on September 05, 2017, 22:19:57 PM
I checked the source code of the email.

For the product thumbnail image, it is using this url: http://localhost/testshop/images/stories/virtuemart/product/resized/Black-Leaf-Steel-Spoon-Screen-15-mm_150x130.jpg
The url is correct and working on my local machine.

The url that is used for the shipment logo is: http://localhost/testshop//images/virtuemart/shipment/postnl.png"
It looks like there is a double forward slash. How / where do I need to change this?
Title: Re: shipment Logo is not showing in emails... after update to 3.2.1
Post by: GJC Web Design on September 06, 2017, 23:38:11 PM
How would the email client reach your "localhost"?

the standard email has no product thumbs so u must be using over rides