![]() |
IF Statement for HTTPS/HTTP
Does anyone know of an IF statement that I could use in my template files to display a piece of code only if the site is not in https? For example
Code:
{if $site_secure_or_not == "http://"} |
Re: IF Statement for HTTPS/HTTP
I know in 4.1.3, you can use:
Code:
{if $smarty.server.HTTPS ne "on"}<img src="http://www.othersitewithnohttps.com/graphic.gif">{/if} I'm not sure if it's different for your version or not. Quote:
|
Re: IF Statement for HTTPS/HTTP
Hello,
This is what you would use: Code:
{if $smarty.server.HTTPS ne "on"} Quote:
|
Re: IF Statement for HTTPS/HTTP
Thanks a lot! It works perfect!
|
Re: IF Statement for HTTPS/HTTP
I am trying to do the same thing with Litecommerce so I can stop Google Adsense from appearing in my https:/ pages. The actual "If" statement for Litecommerce is fine but I am stuck on the translation of
$smarty.server.HTTPS ne "on" into Litecommerce. I just can't get. Appreciate any help you might be able to offer. Quote:
|
Re: IF Statement for HTTPS/HTTP
Ben, you should really post in the Litecommerce specific forums, as most of us X-Cart guys have no idea how LC works :)
|
Re: IF Statement for HTTPS/HTTP
Sorry had trouble finding it. Thought an Xcart guru might know.
Anyhow, if anyone would care to know, in Litecommerce it is : {if:!https}Insert Google Adsense Code Here{end:} |
All times are GMT -8. The time now is 05:37 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.