I realise that I can only concentrate on one thing at a time, which is my excuse for missing all the posts in this thread regarding TXS presenting insecure images in their templates and modules.
I promise to try harder at keeping up to date with people's posts
Thanks to Jeremy for his posts on making images secure, you certainly keep us xcarters on the straight and narrow. In fact standing on the shoulders of Jeremy's work I have been able to modify my template so that all images and banners are secure on https pages AND they are still managed by extreme gear's admin interface. Here is what I did:
In file file smarty.php:
After
PHP Code:
$smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir);
Insert
PHP Code:
if ($_SERVER['HTTPS'] != 'on')
{
$smarty->assign("XGImagesDir", "http://www.domain.com/images/XG"); // If you use CDN replace www with cdn
}
else
{
$smarty->assign('XGImagesDir', $xcart_web_dir . '/images/XG');
}
Although it is unlikely you will need to change your logo often I have included here a fix for that too:
In file skin/extreme_gear/customer/head.tpl
Replace
Code:
<a href="{if $xg_config.top_logo_url ne ''}{$xg_config.top_logo_url}{else}/{/if}" {if $xg_config.top_logo_title ne ''}title="{$xg_config.top_logo_title}"{/if} {if $xg_config.top_logo_target ne ''}target="{$xg_config.top_logo_target}"{/if} id="logo-main"><img src="{$xg_top_logo.image_url}" {if $xg_top_logo.image_x ne ''}width="{$xg_top_logo.image_x}"{/if} {if $xg_top_logo.image_y ne ''}height="{$xg_top_logo.image_y}"{/if} {if $xg_config.top_logo_alt ne ''}alt="{$xg_config.top_logo_alt}"{/if} /></a>
With
Code:
<a href="{if $xg_config.top_logo_url ne ''}{$xg_config.top_logo_url}{else}/{/if}" {if $xg_config.top_logo_title ne ''}title="{$xg_config.top_logo_title}"{/if} {if $xg_config.top_logo_target ne ''}target="{$xg_config.top_logo_target}"{/if} id="logo-main"><img src="{$XGImagesDir}{$xg_top_logo.image_path|replace:'./images/XG':''}" {if $xg_top_logo.image_x ne ''}width="{$xg_top_logo.image_x}"{/if} {if $xg_top_logo.image_y ne ''}height="{$xg_top_logo.image_y}"{/if} {if $xg_config.top_logo_alt ne ''}alt="{$xg_config.top_logo_alt}"{/if} /></a>
To get the banners secure ( the Footer Left Banner, Footer Right Banner, and the Quick Links Right Banner)
in file skin/common_files/modules/TXS_Xtreme_Gear/xg_front_image.tpl
Replace
Code:
<img src="{$xg_images.$type.image_url}"
With
Code:
<img src="{$XGImagesDir}/{$xg_images.$type.filename}"
If you use xMultiCurrency then to get the little flag icon to be secure
In file skin/common_files/modules/XMultiCurrency/customer/complex_selector.tpl
Around line 114 find
Code:
<img src="{$curlng.tmbn_url|amp}"
Replace with
Code:
<img src="{$XGImagesDir}/../..{$curlng.image_path|replace:'./':'/'}"
These changes have worked for me and I hope they work for you too.