shipment Logo is not showing in emails... after update to 3.2.1

Started by mahootshop, April 20, 2017, 16:08:55 PM

Previous topic - Next topic

mahootshop

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.





mahootshop

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.

mahootshop

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?

mahootshop

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.

EIF

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.


GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EIF

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?

GJC Web Design

How would the email client reach your "localhost"?

the standard email has no product thumbs so u must be using over rides
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation