Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing the Header Title Link Target


foxkitsinc

Recommended Posts

Hi folks, I am very new to osCommerce and PHP. I have managed to figure out a great deal using this forum and the PDF user manual but I am not able to find or figure out a solution to my current problem.

 

This is likely very simple for someone:

I want to change the link destination for the HEADER_TITLE_TOP label (the first menu item in the header that is named "top" on installation). On installation it was set by default to my SSL Server address so that when you click on it you are taken to my hosts user interface for site administration. I want to point this to my site index page which is outside of osCommerce (who would want a client to go to their site admin?). I have found how to change the label name (which I have done) and the colors, etc. In researcing this I also discovered headerNavigation code in the includes/header.php file but that code only included the menu items on the right side of the header.

 

  <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>

 

Neither of the menu items on the left side of the header were listed in this code.

 

I have been in the languages/english.php file and changed the label to "Home"

I have discovered this code in the includes/application_top.php file on line 466:

 

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

and have made an assumption that this means that that link should go to the listed HTTP Server. Is this correct? I found the HTTP Server in the includes/configure.php file on line 14 and changed it from my sercure server URL

 

define('HTTP_SERVER', 'https://host444.ipowerweb.com');

 

to my site URL

 

define('HTTP_SERVER', 'http://www.foxkitsinc.com/index.htm');

 

Unfortunately this didn't work. I even tried exiting the osCommerce admin / catalog and re-entering, thinking that the configuration file might not update without opening the program anew. Still no luck.

 

Could someone please tell me how and where to make this change? Once I find the location I should be okay.

 

Thanks, Brian

Link to comment
Share on other sites

You may need to post both of your two configure.php files (the first 20 lines or so will do) here, as it is extra-ordinary and my first time to hear that someone has managed to install a new osc shop and have the top link to point to the site control panel instead of osc's index.php? Many people here will be able to point you to what causes it once they see them.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Thanks Ken,

 

 

 

I installed osCommerce through my host server interface called vDeck. I went to the menu and selected osCommerce and voila, it installed the program. Then all I had to do was use the osC admin to set up my store... well, until I found things I wanted to change that weren't in that nifty tool. :D That is when I had to start working with the code. :rolleyes:

 

 

 

Your comment, though very simple, slapped me right in the face! Duh, two configure files?!!! Sure enough, I looked closer and found the other one... the one with the HTTP Server still set at the setup default. I knew it had to be simple... but I didn't see it.

 

 

 

I will still show the first lines of my configure files just in case there is something else wrong that someone might catch and so if someone else has the same problem they can see the mess I made. :-

 

 

 

catalog/includes/configure.php

 

 

 

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.foxkitsinc.com/index.htm');  
 define('HTTPS_SERVER', 'https://host444.ipowerweb.com');
 define('ENABLE_SSL', true);   // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'foxkitsinc.com');
 define('HTTPS_COOKIE_DOMAIN', 'host444.ipowerweb.com/~foxkitsi');
 define('HTTP_COOKIE_PATH', '/~foxkitsi/osCommerce/catalog/');
 define('HTTPS_COOKIE_PATH', '/~foxkitsi/osCommerce/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/~foxkitsi/osCommerce/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/~foxkitsi/osCommerce/catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

 

 

catalog/admin/includes/configure.php

 

 

 

 // Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.foxkitsinc.com/index.htm');
 define('HTTP_CATALOG_SERVER', 'https://host444.ipowerweb.com');
 define('HTTPS_CATALOG_SERVER', 'https://host444.ipowerweb.com');
 define('ENABLE_SSL_CATALOG', true);  // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', '/home/foxkitsi/public_html/osCommerce/catalog/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/~foxkitsi/osCommerce/catalog/admin/');  // absolute path required
 define('DIR_FS_ADMIN', '/home/foxkitsi/public_html/osCommerce/catalog/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/~foxkitsi/osCommerce/catalog/');   // absolute path required
 define('DIR_FS_CATALOG', '/home/foxkitsi/public_html/osCommerce/catalog/'); // absolute path required
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

 

 

Before I made the changes the URL listed for the HTTPS Server was also listed for the HTTP Server in both configure files. I figured out and solved half of the problem... now I know you have to check both configure files. I made the change to the second file (the admin version) and it works like a charm!

 

 

 

Thanks again.

Link to comment
Share on other sites

Well, I was so excited that changing that second address fixed my "link problem" that I jumped the gun... now half of my links go to the secure server (where they belong) and the rest point to the correct address "at www.foxkitsinc.com (my non-secure server URL) :blink:

 

 

 

I am going to toy with changing them back and forth in different combinations. But if anyone has any suggestions that will leave the links on the page working properly and still allow me to change my "Top" link address - please let me know.

 

 

 

Thanks.

Link to comment
Share on other sites

Okay, setting either of the configure files to the original setting:

'https://host444.ipowerweb.com'

'https://host444.ipowerweb.com'

makes all of my other links work correctly but makes the "top" link point to the host444 address... is there another way to change the link without changing the HTTP Server setting in the configure files?

 

Thanks,

Brian

Link to comment
Share on other sites

In the first configure.php, the two lines:

 

define('HTTP_SERVER', 'http://www.foxkitsinc.com/index.htm');

define('HTTPS_SERVER', 'https://host444.ipowerweb.com');

 

Should be:

 

define('HTTP_SERVER', 'http://www.foxkitsinc.com/osCommerce/catalog');

define('HTTPS_SERVER', 'https://host444.ipowerweb.com/~foxkitsi/osCommerce/catalog');

 

and add this line after the above:

 

define('HTTP_CATALOG_SERVER', 'http://www.foxkitsinc.com/osCommerce/catalog');

 

Do the same to the one under admin/includes/ (the first 3 lines as you quoted in your post).

 

For the Top link, change the line 466 as you mentioned above to:

 

$breadcrumb->add(HEADER_TITLE_TOP, 'http://www.foxkitsinc.com/');

 

This should solve all your problems.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Wow, I did exactly what you said and it fixed the link problem but all my colors and pictures and I guess just about everything I set up using the host company vDeck interface just disappeared!!! I almost fainted. :) Anyway I put everything back the way it was except the $breadcrumb line 466 and it is absolutely perfect!

 

Thank you so much! I guess I didn't need the index.htm but I did need the / at the end of the path.

 

Now I get to take a break!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...