| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
if statement for excluding an item from https pages | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I dislplay the shopping.com rating gif on my site, which is hard coded (http://www.shopping.com/etc.), but dynamically generated off of their site. In other words, we have 4 1/2 check marks now, but if we get a better rating, we'll have 5 for a worse rating and we'll have 4, and the .gif will update itself. The problem is, that it's throwing a secure/nonsecure warning on the registration pages. Disableing https for the registration page is not an option.
Does anybody know the if statement to use to exclude this image from secure pages? have tried: {if $smarty.server.HTTPS eq "on"} What I want to go on the secure page {else} What I want to go on all the rest {/if} No-go, unfortunately. ![]() TIA
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#2
|
|||||||
|
|||||||
![]() Strange, I have that same code in my home.tpl file and it works fine. Do you have a link, also, what page are you trying to put the code on?
__________________
Mike Kenzie X Cart Gold Ver. 4.1.3 X-RMA X-AOM X-Product Comparison |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Thanks for taking a look. The link is:
https://www.heirloomwoodentoys.com/register.php since I use ezcheckout, which breaks the cart out of home.tpl, I don't have this issue anywhere else. Yes, a small issue, but I consider any security error on my site to be a bad thing. All the stuff on the lower right - shopping.com rating, BBB, and Geotrust images are all called from a .tpl I made called trust.tpl, which is called in home.tpl. I was trying to make it so only the shopping.com was omitted from the https pages. trust.tpl: Code:
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Just tried a slightly different tack:
Code:
Didn't work either. I do believe I'm going nuts. ![]()
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() Here's the code that should work:
Code:
If it doesn't work, which it sounds like it's not, try this: Open auth.php At the very end, but before ?> put: Code:
Then in your smarty template use: Code:
|
|||||||||
#6
|
|||||||||
|
|||||||||
![]() A million thanks Jon! Your solution to use the if statement works like a charm.
I'll restate it in case anybody wonders which solution I used. Put the following code in the template where the problem occurs. {if $smarty.server.HTTPS ne "on"} Here goes the script you want left out under https {/if} Don't forget the {/if} ! With this I was able to remove all the affiliate links, banners etc from showing on my secure pages (cart, checkout etc), causing the pop-up warning about secure and unsecure elements. My https pages now proudly show the golden lock up top of the new IE 7 browser and opens the https page without problems. Happy New Year!
__________________
Cordially, Just me X-Cart Gold Version 4.2.3 Multilingual shop: Spanish, French and US English |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|