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)
-   -   Help with Conditional (https://forum.x-cart.com/showthread.php?t=16872)

dalmuti 09-26-2005 07:43 AM

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

dalmuti 09-27-2005 05:34 AM

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

Thanks,
Louise

shan 09-27-2005 05:42 AM

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}


dalmuti 09-27-2005 05:51 AM

Shan,

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

Louise


All times are GMT -8. The time now is 09:31 AM.

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