Order Creation Notification email image display

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
10 years 7 months ago #153356

-- url of the page with the problem -- : midwest.testme.co
-- HikaShop Business version -- : 2.3.0 12 avril 2014
-- Joomla version -- : 3.2
-- PHP version -- : 5.3
-- Browser(s) name and version -- : N/A
-- Error-message(debug-mod must be tuned on) -- : N/A
-- Email client: Outlook 2010

When I force SSL in the checkout (option YES), my Order Creation Notification email does not display images as the image source path is https

Is there a solution for this? I would like to include my logo as the header image. It works fine if force SSL is set to NO but I need SSL.

Thanks and regards
Brett

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #153428

Hi,

I think that you will have to edit the email via the menu System > Emails, then in the preload part, add the code:

$image = str_replace('https','http',$image);
Just before:
$cartProduct['PRODUCT_IMG'] = '<img src="'.$image.'" alt="" style="float:left;margin-top:3px;margin-bottom:3px;margin-right:6px;"/>';

To add you logo, you can easily add an img tag in the html version of the email.

Please Log in or Create an account to join the conversation.

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
10 years 6 months ago #153775

Thanks Xavier

I tried this but it is not working.

I changed the Pre-load code to:

if(!empty($item->images[0]->file_path) && $config->get('thumbnail', 1) != 0) {
$img = $imageHelper->getThumbnail($item->images[0]->file_path, array(50, 50), array('forcesize' => true, 'scale' => 'outside'));
if($img->success) {
if(substr($img->url, 0, 3) == '../')
$image = str_replace('../', HIKASHOP_LIVE, $img->url);
else
$image = substr(HIKASHOP_LIVE, 0, strpos(HIKASHOP_LIVE, '/', 9)) . $img->url;
$image = str_replace('https','http',$image);
$cartProduct = '<img src="'.$image.'" alt="" style="float:left;margin-top:3px;margin-bottom:3px;margin-right:6px;"/>';
}
}

It's still generating the email as:

<table class="w600" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin:auto;background-color:#ebebeb;" border="0" cellspacing="0" cellpadding="0" width="600" align="center">
<tr style="line-height: 0px;">
<td class="w600" style="line-height:0px" width="600" valign="bottom">
<img class="w600" src=" midwest.testme.co/media/com_hikashop/images/mail/header.png " border="0" alt="Thanks for your order from MidWest Meats" />
</td>
</tr>

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #153849

Hi,

Ok the modification given was for the product images, for your needs, thanks to replace:

<img class="w600" src="{VAR:LIVE_SITE}media/com_hikashop/images/mail/header.png" border="0" alt="" />
By:
<?php $live = str_replace('https','http',HIKASHOP_LIVE); ?>
<img class="w600" src="<?php echo $live; ?>media/com_hikashop/images/mail/header.png" border="0" alt="" />
You can do this customization for each images in the emails.

The following user(s) said Thank You: bmm01

Please Log in or Create an account to join the conversation.

  • Posts: 99
  • Thank you received: 7
  • Hikashop Business
10 years 6 months ago #153941

Hi Xavier

Fantastic - that's fixed the issue and it's looking really good now.

I added the same code for the Footer.

Thanks
Brett

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum