Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Adding new buttons to my site???


Recommended Posts

Im wanting to add 3 new buttons








I want them to be add to the top of my website, which currently has these buttons



If some knows how to create new buttons here that would be fantastic




Link to comment
Share on other sites

Any graphics program (e.g. Fireworks, Photoshop, Paint Shop Pro) will allow you to create buttons.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Hey David-


I put some buttons up by the header logo on my site. The code needed to go into includes/header.php. I used this method:

1- made my button images and filed them in images/

2- edited includes/filenames.php to include the name of the files to open. In this case contact_us.php already exists with osCommerce and Sitemap is a contribution with a file called sitemap.php.

3- I made a new HTML row and cell with the buttons and links in them. See the code below.


<tr class="header"><td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_SITEMAP) . '">' . tep_image(DIR_WS_IMAGES . 'site_map.gif', 'Site Map') . '</a>'; echo '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_image(DIR_WS_IMAGES . 'contact_us_link.gif', 'Contact Us') . '</a>'; ?></td></tr>


Let's pull it apart. '<tr class "header">' is an HTML row with a stylesheet class called 'header' and '<td align="center">' is a centered HTML cell.

'<?php echo' tells the browser to do some PHP, but make it look like HTML, 'echo'.

'<a href="' is an HTML link.

The dot, '.' is to connect the previous line of PHP code to the next.

'tep_href_link(FILENAME_SITEMAP)' tells the browser to look in your includes/filename.php file for the link called FILENAME_SITEMAP.

Another dot, '.' to connect the PHP code.

'">' finishes the HTML 'a href'.

Another dot to connect the PHP code.

'tep_images(DIR_WS_IMAGES . 'site_map.gif', 'Site Map')'' tells the browser to look in the images/ folder for a file called site_map.gif and give the image an alt text of "Site Map".

Another dot to connect the PHP code

'</a>'; to finish the link.

This line of code has a second link in it which is similar to the first one then '?>' to tell the browser to stop doing PHP.

The </td> is the end of the HTML cell and </tr> is the end of the HTML row.


The reason the links are put into filename.php is to keep the session intact.


What I've described should put a button image on your website. Although your buttons on your website come from Java Scripts. This may be why no one has written to you on this forum about how to make buttons on your website. You may want to talk to the person who made your Java Scripts about putting more buttons on for you. Maybe you can also look at the Java Script code and see what they did to make a button and make your own.



If I'm giving advice, it is based on what path I would take to fix your problem. My path may be wrong.

Link to comment
Share on other sites

HTML coding is fine to add to the header.php file.. if you use something decent like dreamweaver it's a doddle. You can even make fantastic buttons in photoshop and add them if you don't have other design programs.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!


Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?


There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.



Link to comment
Share on other sites


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

  • Create New...