Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding external link to header.php button


thorin462

Recommended Posts

Posted

Dear All,

 

I am working on a web page and wish to add an external link to my top menu in the header.php file. If I copy the bold code below and paste it

a duplicate link appears on my web page for example to the Whats New? link/button. What I want is to make the link point to an external site outside of oscommerce and give it a new name.

 

 

<td <?php echo $item_menu_01;?> onClick="document.location='<?php echo tep_href_link('index.php')?>'" nowrap="nowrap">

<div class="div_l"><div class="div_r"><div class="div_c"><?php printf(BOX_MANUFACTURER_INFO_HOMEPAGE,"")?></div></div></div></td>

 

 

<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'spacer.gif')?></td>

<td <?php echo $item_menu_02;?> onClick="document.location='<?php echo tep_href_link('products_new.php')?>'">

<div class="div_l"><div class="div_r"><div class="div_c"><?php echo BOX_HEADING_WHATS_NEW?></div></div></div></td>

 

 

<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'spacer.gif')?></td>

<td <?php echo $item_menu_03;?> onClick="document.location='<?php echo tep_href_link('specials.php')?>'">

<div class="div_l"><div class="div_r"><div class="div_c"><?php echo BOX_HEADING_SPECIALS?></div></div></div></td>

 

 

<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'spacer.gif')?></td>

 

Any help would be greatly appreciated!

Posted

What I want is to make the link point to an external site outside of oscommerce and give it a new name.

Maybe I'm missing something here, but to do what you want you would simply:

 

<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'spacer.gif')?></td>
<td <?php echo $item_menu_02;?> onClick="document.location='http://www.yourexternalsite.com'">
<div class="div_l"><div class="div_r"><div class="div_c">Your External Site Name</div></div></div></td>

 

Change "http://www.yourexternalsite.com" to whatever you want.

Change "Your External Site Name" to whatever you want.

Posted

Petar,

 

Be careful when adding external links to/from your website because registered sessions will fail if the customer leaves/returns to the site from an external link.

 

Read this:

 

Losing OSCID

 

 

Chris

Archived

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

×
×
  • Create New...