Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Menu Links


Guest

Recommended Posts

Posted

Hi all,

 

i have made a new page called Repairs.php and need to create a link to it at the top of the page

here is a screen-shot of where i am trying to add the link (Click Here)

 

as you can see the links are .gif's M1.gif M2.gif and so on.

the page and the new .gif have been uploaded to the server but i need to know where these are linked

 

any help would be much appreciated,

 

Thanks,

Tristan

Posted

i think i need to add somthing like

 

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

 

where would i add the link to the page and where would i add the link for the file?

 

Thanks,

Tristan

Posted

All that top section will be in includes/header.php. The code for just that link on its own would be:

 

<?php echo '<a href="' . tep_href_link(FILENAME_REPAIRS) . '">' . tep_image(DIR_WS_IMAGES . 'repairs.gif', 'Repairs Section') . '</a>'; ?>

 

That is assuming you have defined repairs.php in includes/filenames.php in a constant named FILENAME_REPAIRS and your gif is called repairs.gif, uploaded to the images directory.

 

The links in header.php will probably be joined together in one statement so you can either add that code after or you can add into the existing statement, where you want your link to be. For that, follow what is already there or if you're not sure, post it here and someone will do it for you.

Posted
All that top section will be in includes/header.php. The code for just that link on its own would be:

 

<?php echo '<a href="' . tep_href_link(FILENAME_REPAIRS) . '">' . tep_image(DIR_WS_IMAGES . 'repairs.gif', 'Repairs Section') . '</a>'; ?>

 

That is assuming you have defined repairs.php in includes/filenames.php in a constant named FILENAME_REPAIRS and your gif is called repairs.gif, uploaded to the images directory.

 

The links in header.php will probably be joined together in one statement so you can either add that code after or you can add into the existing statement, where you want your link to be. For that, follow what is already there or if you're not sure, post it here and someone will do it for you.

 

Thanks for your help Peter. will give this a go tonight.

i will let you know how it goes.

 

Thanks,

Tristan

Posted

Thanks for your help Peter,

i have now fixed this with your guidance.

 

i added the following code:

 

 href="<?php echo tep_href_link('repairs.php')?>"><?php echo tep_image_button('m6.gif')?></a></td>

 

button works great, os commerce seems to be quite straight forward but its just knowing where these simple things need to go.

 

Regards,

Tristan

Posted

Yeah that's close enough - well done!

 

For future reference, if you have a line of buttons to code in, or you need to come in and out of PHP code in an echo statement, you can use concatenation - which is joining two or more strings together, with the stop character. See the code I posted above.

Posted
Yeah that's close enough - well done!

 

For future reference, if you have a line of buttons to code in, or you need to come in and out of PHP code in an echo statement, you can use concatenation - which is joining two or more strings together, with the stop character. See the code I posted above.

 

i think i used concatenation. here is where i added the code:

 

<td class="menu"> <a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image_button('m1.gif')?></a><a href="<?php echo tep_href_link('specials.php')?>"><?php echo tep_image_button('m2.gif')?></a><a href="<?php echo tep_href_link('products_new.php')?>"><?php echo tep_image_button('m3.gif')?></a><a href="<?php echo tep_href_link('account.php')?>"><?php echo tep_image_button('m4.gif')?></a><a href="<?php echo tep_href_link('contact_us.php')?>"><?php echo tep_image_button('m5.gif')?></a><a href="<?php echo tep_href_link('repairs.php')?>"><?php echo tep_image_button('m6.gif')?></a><a href="<?php echo tep_href_link('website_management.php')?>"><?php echo tep_image_button('m7.gif')?></

 

Thanks again,

Tristan

Archived

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

×
×
  • Create New...