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

Help with Conditional

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-26-2005, 07:43 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Help with Conditional

Hello,

I use live support on my sites and I have two sets of code...one for the secure site https and one for non secure http. I am told that the https code takes longer to load and I don't need it until the customer gets to checkout.

How would I code a conditional to use the secure button code with the customer goes to checkout and use the regular button code when they are just shopping?

I know it would be something like:

Code:
{if ????????} <script language="JavaScript" src="https://xxxxxxx.xxx"></script>[img]https://xxxxxxx.gif[/img]<noscript>[img]https://secure.providesupport.com/image/spacer.gif[/img]</noscript> {else} <script language="JavaScript" src="http://xxxxxxx.xxx"></script>[img]http://xxxxxxx.gif[/img]<noscript>[img]http://providesupport.com/image/spacer.gif[/img]</noscript> {/if}

What goes where I have the question marks?

Hope that makes senses....thanks

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #2  
Old 09-27-2005, 05:34 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

Anyone know the answer or refer me to a link that would help?

Thanks,
Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #3  
Old 09-27-2005, 05:42 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

give this a whirl

Code:
{if $smarty.server.HTTPS eq "on"} <script language="JavaScript" src="https://xxxxxxx.xxx"></script>[img]https://xxxxxxx.gif[/img]<noscript>[img]https://secure.providesupport.com/image/spacer.gif[/img]</noscript> {else} <script language="JavaScript" src="http://xxxxxxx.xxx"></script>[img]http://xxxxxxx.gif[/img]<noscript>[img]http://providesupport.com/image/spacer.gif[/img]</noscript> {/if}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 09-27-2005, 05:51 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

Shan,

Thanks, that was the bit of code I needed. Works perfectly!

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
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 01:20 PM.

   

 
X-Cart forums © 2001-2020