Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Conditional display based on HTTPS

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-22-2003, 11:10 PM
  kpriest's Avatar 
kpriest kpriest is offline
 

eXpert
  
Join Date: Apr 2003
Location: Seattle, WA
Posts: 263
 

Default 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?
__________________
-Ken
X-Cart User / Developer Since April 2003
(Varying versions, multiple client sites, 3.x through 4.4.x)
www.pointbweb.com
Reply With Quote
  #2  
Old 10-23-2003, 11:29 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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

should do it
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 10-24-2003, 03:43 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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}
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:21 AM.

   

 
X-Cart forums © 2001-2020