Forums / Templates, Stylesheets, Page Layout / Seperate footer for SSL pages

Seperate footer for SSL pages

Locked

Views: 1,407

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
26 Sep 2009, 5:14 AM
#1
ahall13 avatar

ahall13

New Zenner

Join Date:
Nov 2008
Posts:
33
Plugin Contributions:
0

Seperate footer for SSL pages

I have some links I'd like to have at least in the footer of my main page, but they are not https:\ so they can't be there for the SSL pages. I don't really care if they are on other pages or not.

I assume I need to use something like
if ($this_is_home_page) {
include('tpl_footer.php');
}
else
{
include('footer2.php');
}

If I am correct so far my question is where do I put this? If I put it in tpl_footer then it will run through the first footer file and then if it isn't main then also show footer 2.

dumb question I know, but thanks for the help anyhow.

Adam

26 Sep 2009, 5:35 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Seperate footer for SSL pages

Add to tpl_footer.php of template currently being used...
/nameoftemplate/common/

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

26 Sep 2009, 1:54 PM
#3
ahall13 avatar

ahall13

New Zenner

Join Date:
Nov 2008
Posts:
33
Plugin Contributions:
0

Re: Seperate footer for SSL pages

OK, what I did was place the code in the current tpl_footer but since it was showing duplicate footer information ie items from tpl_footer and info from footer1 or footer2 depending on the page I just gutted tpl_footer. Now the file is basically a pointer to either of the other 2 footer files. I don't think that is the best way of doing it, but I couldn't find much info in a search of the forum or in the faq about calling php files.

26 Sep 2009, 2:26 PM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Seperate footer for SSL pages

ahall13:

OK, what I did was place the code in the current tpl_footer but since it was showing duplicate footer information ie items from tpl_footer and info from footer1 or footer2 depending on the page I just gutted tpl_footer. Now the file is basically a pointer to either of the other 2 footer files. I don't think that is the best way of doing it, but I couldn't find much info in a search of the forum or in the faq about calling php files.

This might work a bit better:

open includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

find the following section of code (at around line 156)

<?php
 /**
  * prepares and displays footer output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
  }
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
?>

and replace it with the following:

<?php
 /**
  * prepares and displays footer output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
  }
if ($this_is_home_page) {
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
}
else
{
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer2.php');
}
?>

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 Sep 2009, 6:19 PM
#5
ahall13 avatar

ahall13

New Zenner

Join Date:
Nov 2008
Posts:
33
Plugin Contributions:
0

Re: Seperate footer for SSL pages

Thanks, that looks more like what I was looking for.