cherubrock74 Posted April 20, 2010 Share Posted April 20, 2010 I would like to add some graphic buttons on the top navigation bar, instead of having simple text based links. Can someone suggest me where to start looking to accomplish this? Link to comment Share on other sites More sharing options...
NodsDorf Posted April 20, 2010 Share Posted April 20, 2010 I've done this on just about every Osc site I've worked on. Easiest thing to do is build the navigation in Dreamweaver or Front page Upload the button or menu bar images to your images folder. Place the Javascript in your catalog/includes/header.php file right under the first <Table> tag Then place the code from dreamweaver or frontpage into the table where you want them to be displayed (likely under the oscommerce.gif (logo) ) <- Probably rename that while you're in there. Then correct the linking structure properly for Oscommerce. IE in dreamweaver you'll link your "Home" button to http://www.mywebsite.com/catalog but you want the link to be formatted correctly in php which would look like this: <a href="<?php echo tep_href_link(FILENAME_DEFAULT);?>" target="_self"><img src="images/homebutton.gif" border="0" alt="My Website Homepage"></a> <- In this code FILENAME_DEFAULT is your home page. You want to reference all the links like this for every page, contact us, shipping & returns ect. They all have file names which can be found in your filenames.php. Hope this helps. Link to comment Share on other sites More sharing options...
DJMark Posted April 20, 2010 Share Posted April 20, 2010 I would like to add some graphic buttons on the top navigation bar, instead of having simple text based links. Can someone suggest me where to start looking to accomplish this? or just go to includes folder open up header.php and use the code below add it where ever you want your buttons to show but of course change the links to suit you <td> <a href="/Store/index.php"><img src="images/HomePage.jpg" alt=""> </a><a href="/Store/index.php"><img src="images/NewProducts.jpg" alt=""> </a><a href="/Store/account.php"><img src="images/MyAccount.jpg" alt=""></a><a href="/Store/contact_us.php"><img src="images/ContactUs.jpg" alt=""></a><a href="/Store/shopping_cart.php"><img src="images/ShoppingCart.jpg" alt=""></a><a href="/Store/wedding.php"><img src="images/Wedding.jpg" alt=""> </a><a href="/Store/coporate.php"><img src="images/Coporate.jpg" alt=""> </a></td> Link to comment Share on other sites More sharing options...
multimixer Posted April 21, 2010 Share Posted April 21, 2010 or just go to includes folder open up header.php and use the code below add it where ever you want your buttons to show but of course change the links to suit you <td> <a href="/Store/index.php"><img src="images/HomePage.jpg" alt=""> </a><a href="/Store/index.php"><img src="images/NewProducts.jpg" alt=""> </a><a href="/Store/account.php"><img src="images/MyAccount.jpg" alt=""></a><a href="/Store/contact_us.php"><img src="images/ContactUs.jpg" alt=""></a><a href="/Store/shopping_cart.php"><img src="images/ShoppingCart.jpg" alt=""></a><a href="/Store/wedding.php"><img src="images/Wedding.jpg" alt=""> </a><a href="/Store/coporate.php"><img src="images/Coporate.jpg" alt=""> </a></td> The way links get created in this example is wrong. You will loose the session id on every click on this menu. Read here about how to create proper links for osCommerce My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
cherubrock74 Posted April 21, 2010 Author Share Posted April 21, 2010 I've done this on just about every Osc site I've worked on. Easiest thing to do is build the navigation in Dreamweaver or Front page Upload the button or menu bar images to your images folder. Place the Javascript in your catalog/includes/header.php file right under the first <Table> tag Then place the code from dreamweaver or frontpage into the table where you want them to be displayed (likely under the oscommerce.gif (logo) ) <- Probably rename that while you're in there. Then correct the linking structure properly for Oscommerce. IE in dreamweaver you'll link your "Home" button to http://www.mywebsite.com/catalog but you want the link to be formatted correctly in php which would look like this: <a href="<?php echo tep_href_link(FILENAME_DEFAULT);?>" target="_self"><img src="images/homebutton.gif" border="0" alt="My Website Homepage"></a> <- In this code FILENAME_DEFAULT is your home page. You want to reference all the links like this for every page, contact us, shipping & returns ect. They all have file names which can be found in your filenames.php. Hope this helps. Once you placed your menu buttons on the top nav (home, catalog, log out, checkout etc.) wow did you deal with the fact that when you are browsing store products the name of the category and the name of the products show in the top nav? Can I see a sample of what you did? thank you for your reply Link to comment Share on other sites More sharing options...
cherubrock74 Posted April 21, 2010 Author Share Posted April 21, 2010 The way links get created in this example is wrong. You will loose the session id on every click on this menu. Read here about how to create proper links for osCommerce Interesting post...I will check it...thank you Link to comment Share on other sites More sharing options...
NodsDorf Posted April 21, 2010 Share Posted April 21, 2010 Once you placed your menu buttons on the top nav (home, catalog, log out, checkout etc.) wow did you deal with the fact that when you are browsing store products the name of the category and the name of the products show in the top nav? Can I see a sample of what you did? thank you for your reply For that look into Dynamic Menu (DHTML) This allows top, tree, flyout menu styles. I was referencing a navigation bar with buttons like you see here. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.