Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

messed up header need help!!!


OKCEA

Recommended Posts

I was trying to follow the instructions for replacing the osCommerce header with my own logo. Please go to "www.okcea.org/osCommerce" to see what happened. Obviously I messed up. I made a copy of the original header before I started messing with it... but it saved as an html page and I don't know how to get it back as a PHP file. Can anyone help me either replace the original osCommerce header back...or tell me what I need to do to upload my own logo as the header? If you look at this site you will see that my logo is showing as a footer right now. Any help anyone can give me would be GREATLY appreciated. I am completely lost as far as anything to do with PHP....

 

Thank you!

Link to comment
Share on other sites

No... I kept messing with my header.php and now nothing will come up. I am thinking that what I did that may have worked is as follows...tell me if this sounds reasonable...

 

1. I am using Frontpage for my website.

2. I was trying to edit my header from cpanel.

3. I copied the original header.php from cpanel onto my desktop where it saved as an html page. I copied that file and opened it in notepad where I did the edits I "thought" I was supposed to do.

 

This is where I ran into my problem. I now had the revised header but on notepad. All the instructions I could find for installing this file back onto my cpanel involved FTP... All my files for osCommerce are in HTTP.

 

I have been unable to figure out how to save this notpad file as a PHP document and copy it back into my http oscommerce file.

 

One thing I tried...which may have worked and I didn't know it... I saved that notepad file on my store file that I have on Frontpage and uploaded it just like I do backups from oscommerce.admin. Looking at the time of your post... this may have worked and I didn't know it. My webhost server updates about every 30 minutes... so I might not have known that I fixed the problem at one point.

 

Does this sound like a possibility? Thanks...

Link to comment
Share on other sites

I will try this "fix" again this evening if anyone out there thinks it will work. But... If it doesn't... does anyone have any suggestions for saving a notepad file as a php document using http instead of ftp? Is there any way of sending a copy of a php header file that I could just copy and paste into a blank header.php using cpanel edit? If someone can send me a copy of their header or the original osCommerce header...I think I could change it through cpanel without ever sending it to my PC.

 

Thank you.

Link to comment
Share on other sites

No... I kept messing with my header.php and now nothing will come up. I am thinking that what I did that may have worked is as follows...tell me if this sounds reasonable...

 

1. I am using Frontpage for my website.

2. I was trying to edit my header from cpanel.

3. I copied the original header.php from cpanel onto my desktop where it saved as an html page. I copied that file and opened it in notepad where I did the edits I "thought" I was supposed to do.

 

This is where I ran into my problem. I now had the revised header but on notepad. All the instructions I could find for installing this file back onto my cpanel involved FTP... All my files for osCommerce are in HTTP.

 

I have been unable to figure out how to save this notpad file as a PHP document and copy it back into my http oscommerce file.

 

One thing I tried...which may have worked and I didn't know it... I saved that notepad file on my store file that I have on Frontpage and uploaded it just like I do backups from oscommerce.admin. Looking at the time of your post... this may have worked and I didn't know it. My webhost server updates about every 30 minutes... so I might not have known that I fixed the problem at one point.

 

Does this sound like a possibility? Thanks...

 

 

Well, a couple of things. I have only been here for a very short time and am learning alot over the past couple of weeks. I was told when I first signed up here that I should NOT, repeat NEVER!!!! use FrontPage to make my website. Do a search here regarding FrontPage and check out what the ones in the know say about it.

 

Second, it is probably better to get a proper php text editor. I downloaded one for free called PSPad. Just do a search in Google for it and I am sure that you will find it easily. I tell you that it has made it VERY VERY easy to make changes and even reverse these changes if they don't work. It has unlimited undo's and I have had to use it many times, and it has made my life alot less stressful.

Link to comment
Share on other sites

Thanks for the advice about both Frontpage and the PHP program. I am only using the oscommerce as an order entry program...I won't be accepting credit card payments or anything like that...so as long as I can get the order entry part to work for me... I can probably continue to use Frontpage by just adding a link from my web to osCommerce. I really didn't need to change the osCommerce logo. I just thought it would look better.

 

The main thing for me to remember is to always backup oscommerce and add that backup to FP before I upload any changes to my website. I doubt that I will be making that many changes to either as this is just a small site for the City of OKC Employee Association.

 

I will try to copy and paste my existing code in a separate response during my lunch hour. Thank you again for your help.

 

Darlene

Link to comment
Share on other sites

I am going to attempt to copy and paste what is in my header.php file right now. All I'm trying to do is get it back to the original osCommerce header. If anyone can tell me how to fix it... Please do so... I am thinking that there are a lot of lines that should just be deleted...but I don't know which ones.

Thank you,

 

 

Darlene

 

 

 

<?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', 'osCommerce') . '</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

}

?>

</TEXTAREA> <BR><INPUT type=hidden

value=/home/okcea29/public_html/osCommerce/includes name=dir> Save file as:

<INPUT value=header.php name=file> <BR><INPUT type=submit value=Save>

</FORM></CENTER></FONT><!---cPanel [10.8.1-STABLE_114] (pro) Copyright © 1997-2005 cPanel, Inc. Licensed on edge.hostmerit.com ---></BODY></HTML>

 

Save file as:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...