- Priority: 0
- Status: Closed
- Theme: Venedor
-
Assigned To:
Alex
- Private: No
- Open Date: 18.07.16, 17:22
- Opened by: Eddie Piazza
- Closed by: Alex
- Closed on: 25.01.17, 12:58
- Reason: No answer from a customer
- Comment: Glad to help!
Ticket #9779 - Advert image, URL and SWIFT. Problems in MailBox
Hi, I am having some troubles to include images into mails. Seems images without SWIFT are hided in mailbox. For example Site Logo appears perfectly because it includes SWIFT on img URL.
I found this code to include in override/classes/Mail.php:
$templateVars['{MY_IMAGE_ID}'] = (file_exists(_PS_IMG_DIR_.'FILE.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'FILE.jpg'))) : ((file_exists(_PS_IMG_DIR_.'FILE.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'FILE.jpg'))) : '');
to include in mail HTML:
<img src="{MY_IMAGE_ID}" />
With this code SWIFT appears on mail source code, but for I don´t know which reason it´s not showing the image.
Then I decided to use your Advertising image which could solve my needs because variables are already built. But I found three problems:
First, image appears only if I give permissions to mailbox to accede to extra content (Not like with the Logo).
Secondly, even including the URL in Venedor settings, by clicking to the image, this one just open a popup with the image and don t send to the URL.
Finally, Advertising Image has to have a CSS somewhere because this one is broking my email structure.
Could you help me to find a way to include a image to my mail with Logo proprieties threw Advertising image or by new variable?
Thank you very much.
Comments
I try also to convert image to a URI with this generator:
http://dopiaza.org/tools/datauri/index.php
It works perfectly by including code in URL. For Thunderbird is working but Gmail is not accepting URI images.
Hi. Really sorry for waiting.
Everything seems ok http://prntscr.com/bv4tfl
http://prntscr.com/bv4tmf
I don’t see any issue and link is also works
I’ve removed my code from your email
When I use this kind of link depending on mail box thunderburd/gmail, image appears locked and needs to give access to embed content because of image credentials, that´s not happening with Logo because it´s not embed as an URl but as a SWIFT URL and that SWIFT huge code coded in 64bit is in the end of message. you can check source code at the end of message code.
I solved it by using your Advertising image, but this one is not sending me to the URL configured in venedor settings and also in broking my mail structure, I imagine because of CSS.
So, I would like to know where to locate the CSS code of your advertise image.
Well For now I will use the simple HTML code that is working but mailbox hide the image sometimes. anyway, It´s preferable to edit the advert image to fit perfectly in mail.
Thanks
image appears locked and needs to give access to embed content Show me please with the screenshot. It should look ok
So, I would like to know where to locate the CSS code of your advertise image. Here you can try to change the css style \override\classes\Mail.php line about 343