Jump to content

 

RSW

Member Since 11 Nov 2009
Offline Last Active Sep 05 2013 10:28 PM
-----

Posts I've Made

In Topic: test if SSL/https

05 September 2013 - 10:29 PM

solution!!

add this too your main.tpl

{if $smarty.server.HTTPS eq 'on'}
{assign var="http_connection" value="https"}
{else}
{assign var="http_connection" value="http"}
{/if}

then you can use these test on this or any included templates:


{if $http_connection != 'https'}
{/if}

{if $http_connection == 'https'}
{/if}

{if $http_connection != 'http'}
{/if}

{if $http_connection == 'http'}
{/if}

also if all you need to do is change the path on a href/src.. you can use:
src="{$http_connection}://www.website.com?param=var"

In Topic: test if SSL/https

05 September 2013 - 09:46 PM

Has this issue been address yet?
I am trying to use the ADDthis social marketing button, and it causes a security warning if a secure page is loaded since it is loaded remotely via http.
Can't smarty determine if the page being loaded is HTTPS or http?
This is my biggest issue with templates in CS-cart.