Zen Cart Logo
Forums / General Questions / I want some footer code not to show up on the https pages

I want some footer code not to show up on the https pages

Views: 577

Results 1 to 4 of 4
4 Jul 2012, 2:28 AM
#1
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

I want some footer code not to show up on the https pages

I am using some retargetting codes from google and adroll

I dont want them to show up on the https pages of the website.

Currently they are in includes/templates/mytemplate/common/tpl_main_page.php but its still coming up on the https pages.

Any ideas? thanks

4 Jul 2012, 3:48 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: I want some footer code not to show up on the https pages

<?php 
if ($request_type != 'SSL') { 
?>
  // put non-ssl-only HTML code, including <script> tags, here
<?php
}
?>
4 Jul 2012, 4:05 AM
#3
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: I want some footer code not to show up on the https pages

Thanks

Its going in the footer before the </body>

It looks like this so do i do

<php> if ($request_type != 'SSL') { <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = xxxxxxxxxx; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "xxxxxxxxxx"; var google_conversion_value = 0; /* ]]> */ </script>

}

</php>

Sorry im not familair with putting in php tag

4 Jul 2012, 10:15 PM
#4
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,794
Plugin Contributions:
22

Re: I want some footer code not to show up on the https pages

Not exactly like that. You'll need to close php tags before adding other scripts. This is how it should look like:

<?php
if ($request_type != 'SSL') {
?>

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxxxxxxxx;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "xxxxxxxxxx";
var google_conversion_value = 0;
/* ]]> */
</script>

<?php
}
?>

I tried to point out what you were missing in red.