Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HEADER & FOOTER GOT LOST PLEASE HELP!!!!!!!


bid4tunes.com

Recommended Posts

I am runnig a new istall of OS Commerce, atww.bid4tunes.com/vinylstore

 

I have edited the index.php file to change a little text on the main page.

 

I set the banner management section to on and had 2 banners rotating in the footer, i also uploaded a site logo which i renamed to oscomerce.gif

 

Suddenly for some reason the whole header above the grey line has gone and so has the banner in the footer,

 

I have checked the files header.php and footer.php which are exactly the same as they were when the install was new and everything worked.

 

Please help me to get this working i want my site to go live very soon

 

Steve

www.bid4tunes.com

 

My oscommerce site

www.bid4tunes.con/vinylstore

Link to comment
Share on other sites

Suddenly for some reason the whole header above the grey line has gone and so has the banner in the footer

 

+

 

I have edited the index.php file to change a little text on the main page.

 

You've edited out the <?php require(DIR_WS_INCLUDES . 'header.php'); ?> and <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> references on the root level index.php page.

 

Vger

Link to comment
Share on other sites

Thanks, can you tell me what i need to add to to the files to put it back here is copy of my index.php file as it at the moment

 

<?php

/*

  $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

define('TEXT_MAIN','<b>Welcome to bid4tunes.com Vinylshop!</b><p>

<a img scr="http://www.bid4tunes.com/vinylstore/images/oscommerce.gif"/a>

<p>In addition to our online vinyl auction which you can find at <a href="http://www.bid4tunes.com" target="_blank"><b>www.bid4tunes.com</b></a> we have now opened our own online record store.<p>Bid4tunes.com Vinylstore will offer the latest dance releases, white labels, DJ Promo?s, a host of back catalogue product and more at very competitive prices.<p>Remember you can still sell your own tunes and find 100?s of tunes for sale on our free to use auction site <a href="http://www.bid4tunes.com" target="_blank"><b>www.bid4tunes.com</b></a>

');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

  define('HEADING_TITLE', 'Let\'s See What We Have Here');

  define('TABLE_HEADING_IMAGE', '');

  define('TABLE_HEADING_MODEL', 'Model');

  define('TABLE_HEADING_PRODUCTS', 'Product Name');

  define('TABLE_HEADING_MANUFACTURER', 'Labels');

  define('TABLE_HEADING_QUANTITY', 'Quantity');

  define('TABLE_HEADING_PRICE', 'Price');

  define('TABLE_HEADING_WEIGHT', 'Weight');

  define('TABLE_HEADING_BUY_NOW', 'Buy Now');

  define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

  define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

  define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

  define('TEXT_SHOW', '<b>Show:</b>');

  define('TEXT_BUY', 'Buy 1 \'');

  define('TEXT_NOW', '\' now');

  define('TEXT_ALL_CATEGORIES', 'All Categories');

  define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

  define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

  define('HEADING_TITLE', 'Categories');

}

?>

 

 

 

+

You've edited out the <?php require(DIR_WS_INCLUDES . 'header.php'); ?> and <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> references on the root level index.php page.

 

Vger

Link to comment
Share on other sites

well it is nothing to do with the requires otherwise there would be no grey navigation bar in the header and no grey bar in the footer.

 

post your header.php and footer.php

 

the page that you have posted is the catalog/includes/languages/english/index.php and not the catalog/index.php but then the issue is not with the index.php

 

the issues are with the header.php and the footer.php

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Here are the files header.php and footer.php from the includes directory

 

Thanks for your help

 

header.php

<?php

/*

  $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

// check if the 'install' directory exists, and warn of its existence

  if (WARN_INSTALL_EXISTENCE == 'true') {

    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

      $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

    }

  }

 

// check if the configure.php file is writeable

  if (WARN_CONFIG_WRITEABLE == 'true') {

    if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

      $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

    }

  }

 

// check if the session folder is writeable

  if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

    if (STORE_SESSIONS == '') {

      if (!is_dir(tep_session_save_path())) {

        $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

      } elseif (!is_writeable(tep_session_save_path())) {

        $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

      }

    }

  }

 

// check session.auto_start is disabled

  if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

    if (ini_get('session.auto_start') == '1') {

      $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

    }

  }

 

  if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

    if (!is_dir(DIR_FS_DOWNLOAD)) {

      $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

    }

  }

 

  if ($messageStack->size('header') > 0) {

    echo $messageStack->output('header');

  }

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr class="header">

    <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'Bid4tunes.com Vinylstore') . '</a>'; ?></td>

    <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

  </tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

  <tr class="headerNavigation">

    <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

    <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

  </tr>

</table>

<?php

  if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

  <tr class="headerError">

    <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

  </tr>

</table>

<?php

  }

 

  if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

  <tr class="headerInfo">

    <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

  </tr>

</table>

<?php

  }

?>

 

Footer.php

<?php

/*

  $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  require(DIR_WS_INCLUDES . 'counter.php');

?>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

  <tr class="footer">

    <td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>

    <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>

  </tr>

</table>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr>

    <td align="center" class="smallText">

<?php

/*

  The following copyright announcement can only be

  appropriately modified or removed if the layout of

  the site theme has been modified to distinguish

  itself from the default osCommerce-copyrighted

  theme.

 

  For more information please read the following

  Frequently Asked Questions entry on the osCommerce

  support site:

 

  http://www.oscommerce.com/community.php/faq,26/q,50

 

  Please leave this comment intact together with the

  following copyright announcement.

*/

 

  echo FOOTER_TEXT_BODY

?>

    </td>

  </tr>

</table>

<?php

  if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr>

    <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>

  </tr>

</table>

<?php

  }

?>

 

 

 

 

 

 

 

 

 

well it is nothing to do with the requires otherwise there would be no grey navigation bar in the header and no grey bar in the footer.

 

post your header.php and footer.php

 

the page that you have posted is the catalog/includes/languages/english/index.php and not the catalog/index.php but then the issue is not with the index.php

 

the issues are with the header.php and the footer.php

Link to comment
Share on other sites

A furthur development I noticed a newer podt in this forum called

 

"Header Image Gone"

 

Having read that post I noticed that the poster mentioned that he set image required to false and his header image had gone.

 

I thought this is worth a go and checked the setting in my setup and i had changed this to false also as i dont want to be required to have an image of every product inorder to save server space.

 

Changing this setting to true has brought my header graphics back! But still no banner in the footer.!!!

 

Any ideas??

Link to comment
Share on other sites

I don't know if this is what is causing the problem, or a result of copying and pasting the code you posted. However, I did copy and paste the code you posted for both files (header.php and footer.php) into a text document, and the result showed two lines of white space at the bottom of each file, beyond the last '?>'

 

Try opening these documents in a simple text editor (notepad), and see if the cursor drops below the closing '?>'. If it does then remove those last two lines and save, then upload to the webserver again.

 

If this doesn't work then wait for '241' to answer your last post. He is a team member and much more experienced than I am.

 

Vger

Link to comment
Share on other sites

vger is correct about the spaces after the last ?> however if this is going to cause anerror it is normally the cannot send header, header already sent.

 

did you create the banner group in admin 468x50 and assign your banner to this group, then make the banner active

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

vger is correct about the spaces after the last ?> however if this is going to cause anerror it is normally the cannot send header, header already sent.

 

did you create the banner group in admin 468x50 and assign your banner to this group, then make the banner active

 

 

thanks for your help guys. Everything is working now to resolve the problems i did the following

 

herader

 

I set the require image to true and refreshed my store and the header returned!

 

Footer

 

I deleted the banner then added it back as a new banner and the banner si back now

 

not sure what made this work but it does so thanks for your help guys also hope this helps anyone else with the same problem

 

Steve

www.bid4tunes.com

 

My oscommerce store

www.bid4tunes.com/vinylstore

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...