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)
-   -   Conditional display based on HTTPS (https://forum.x-cart.com/showthread.php?t=4904)

kpriest 10-22-2003 11:10 PM

Conditional display based on HTTPS
 
I have some javascript code that pulls in a weather feed and when the visitor goes to check out via HTTPS, they get that secure/nonsecure warning. I want to put an IF statement in the template that says if HTTPS, do not display the weather feed. Seems simple, but I do not know the syntax.

Any help?

funkydunk 10-23-2003 11:29 PM

{if $smarty.get.mode ne "checkout"}
java code here
{/if}

should do it

B00MER 10-24-2003 03:43 AM

Code:

{literal}
<SCRIPT>
var url =  document.URL;
var re = /^https/;
if ( !url.match(re) ) {
        document.write("Hi mom! I'm not on HTTPS.");
};
</SCRIPT>
{/literal}



All times are GMT -8. The time now is 07:49 PM.

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