X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   if/then statement based on http vs https? (https://forum.x-cart.com/showthread.php?t=28858)

vickis 02-14-2007 09:26 AM

if/then statement based on http vs https?
 
Is it possible to use an if/then statement depending on if you are on an https page versus an http page? If so, what is $variable for that?

Why I'm asking... My site uses "top sites" banners on the pages and those banner images do not pull from https/secure sites. The rest of the store area is on a secure server and so, when a customer registers/logs in, they switch from browsing http pages to the https pages and keep getting that annoying "This page contains both secure and non-secure items." I'd like to have the banners displayed when on http and turned off when on https pages.

balinor 02-14-2007 09:50 AM

Re: if/then statement based on http vs https?
 
{if $smarty.server.HTTPS eq "on"}

content for secure page

{else}

content for insecure page

{/if}

vickis 02-17-2007 08:00 AM

Re: if/then statement based on http vs https?
 
Worked perfectly! Thanks ever so much!!!!

sunset 11-19-2007 12:36 AM

Re: if/then statement based on http vs https?
 
Sorry if i am asking a dumb question, but i am in the same situation as vickis.

Where abouts do i place the above code?

balinor 11-19-2007 05:12 AM

Re: if/then statement based on http vs https?
 
It is meant to be used to show one thing if the page is secure, and one if not secure, so you would place it wherever you want those items to show.

sunset 11-19-2007 05:25 AM

Re: if/then statement based on http vs https?
 
Thanks very much Balinor


All times are GMT -8. The time now is 08:50 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.