Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

changing top links on main page


Guest

Recommended Posts

I cannot find where to change the top links on the left side of the page (default.php) is it found in another file?

 

The link I want to change is found here "Top>>Catalog>>Equipment"

The link I want to change is "Top"

 

Thoughts?

 

 

D

Link to comment
Share on other sites

I have searched thru the wiki docs and have found no reference to changing the links on the top bar. I did see the info on changing the text of the top bar tho, do I need to go into the code and change it manually to include a herf statement?

 

 

D

Link to comment
Share on other sites

Read the docs more carefully 8) Here's the bit in header.php

 

"<table border="0" width="100%" cellspacing="0" cellpadding="0" background="images/default/bluebar.jpg">

<tr class="header"> <!-- class="header" -->

<td valign="middle">  <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'ecokidzheader1.gif', 'E c o K i d z') . '</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>"

 

Roger

facts invariably distort the truth

Link to comment
Share on other sites

Q: How do you change the text like "Top", "Catalog" on the top bar?

A: catalog/includes/languages/english.php - all of the heading listings are here.

 

I do not want to edit the text, I want to link it to the default.php and maybe I am missing it in the code copied above where the link would actually be since you have pulled code from your site and everything is different.

 

I am not trying to be difficult here but could you tell me the section of the code I am supposed to edit to make this change?

 

This is the header section I have currently:

 

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

<tr class="header">

<td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce'); ?></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, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', '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, '', 'NONSSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

</tr>

</table>

<?php

if ($HTTP_GET_VARS['error_message'] != '') {

?>

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

<tr class="headerError">

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

</tr>

</table>

<?php

}

 

if ($HTTP_GET_VARS['info_message'] != '') {

?>

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

<tr class="headerInfo">

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

</tr>

</table>

<?php

}

?>

 

:shock:

Link to comment
Share on other sites

If I understand you correctly, you want the link text "Top" to link to the same location as the text "Catalog". If that is correct and what you want, try this:

 

Open file catalog/includes/application_top.php and find the line:

 

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

Change it to:

 

$breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT));

 

I hope this helps :)

 

Justin =)

 

P.S. I am using a copy of osC 2.2ms2 to make these suggestions. If you have an earlier version it might be a little different.

Link to comment
Share on other sites

I see the file and it is the same as what you have above:

 

require(DIR_WS_CLASSES . 'breadcrumb.php');

$breadcrumb = new breadcrumb;

 

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

should I change the first breadcrumb to match the second?

 

like this?

 

require(DIR_WS_CLASSES . 'breadcrumb.php');

$breadcrumb = new breadcrumb;

 

$breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT));

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

:?:

Link to comment
Share on other sites

Yes, if that is what you want, that is correct. It would make more sense to me to comment out (put // at the beginning of the line) the HEADER_TITLE_TOP line so that you will only have one link. I.e. I don't see why you need Top and Catalog if they point to the same place.

 

Hth,

Matt

Link to comment
Share on other sites

How would you make this 'Top' link in the headerNavigation point wherever you want?

 

The answers I've seen all kind of go around the issue of being able to point it wherever you want. Is there some place you can input the address you want it to go to?

 

Matt

Link to comment
Share on other sites

In includes/application_top.php, change

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

by replacing HTTP_SERVER with whatever you want.

 

Hth,

Matt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...