Author Topic: shipment Logo is not showing in emails... after update to 3.2.1  (Read 124 times)

mahootshop

  • Beginner
  • *
  • Posts: 20
  • Store with 15,000 product
    • MAHOOT Store
  • VirtueMart Version: 3.2.1
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

Code: [Select]
<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.




lindapowers

  • Full Member
  • ***
  • Posts: 1340
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
http://www.comenaranjas.com - Navel oranges and clementines from Spain

mahootshop

  • Beginner
  • *
  • Posts: 20
  • Store with 15,000 product
    • MAHOOT Store
  • VirtueMart Version: 3.2.1
Re: shipment Logo is not showing in emails... after update to 3.2.1
« Reply #2 on: April 21, 2017, 22:43:23 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.


mahootshop

  • Beginner
  • *
  • Posts: 20
  • Store with 15,000 product
    • MAHOOT Store
  • VirtueMart Version: 3.2.1
Re: shipment Logo is not showing in emails... after update to 3.2.1
« Reply #3 on: April 22, 2017, 08:03:25 am »
this code:
Code: [Select]
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:
Code: [Select]
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?

mahootshop

  • Beginner
  • *
  • Posts: 20
  • Store with 15,000 product
    • MAHOOT Store
  • VirtueMart Version: 3.2.1
Re: shipment Logo is not showing in emails... after update to 3.2.1
« Reply #4 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.