pberry4032 Posted November 20, 2010 Share Posted November 20, 2010 with 2.3.1 the header links are now buttons but I want to revert mine to text links with a small icon to the left of the link if possible. Can anyone help, been trying all night to no avail! Thanks. Link to comment Share on other sites More sharing options...
www.in.no Posted November 21, 2010 Share Posted November 21, 2010 Have not change it on 2.3.1 but it is in the include/header.php you have to remove the tep_draw_button function and add images and text insted. It is just in the start of the file, the 3 buttons and a few line down you have the logg off button if logged inn. Link to comment Share on other sites More sharing options...
burt Posted November 21, 2010 Share Posted November 21, 2010 Exactly the same as before mate; echo tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); would be echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . HEADER_TITLE_MY_ACCOUNT . '</a>'; Link to comment Share on other sites More sharing options...
pberry4032 Posted November 21, 2010 Author Share Posted November 21, 2010 Cheers G. It was how to re-arrange the link with the . ( ' and " in the right place that was getting me stuck. Link to comment Share on other sites More sharing options...
pberry4032 Posted November 21, 2010 Author Share Posted November 21, 2010 Actually, still a little confused. I've now got this: '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . HEADER_TITLE_MY_ACCOUNT . '</a>', '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">' . HEADER_TITLE_CART_CONTENTS . '</a>', '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . HEADER_TITLE_CHECKOUT . '</a>', but it still draws buttons so my guess is it's been created with css. I couldn't find it with a quick glance but will have a better look once he washing up's done! Link to comment Share on other sites More sharing options...
burt Posted November 21, 2010 Share Posted November 21, 2010 If you have the link still inside the headerShortcuts div you'll also need to remove this; <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> Or rename the div. Link to comment Share on other sites More sharing options...
pberry4032 Posted November 21, 2010 Author Share Posted November 21, 2010 You da man G! Cheers. That would have had me going for ages! Link to comment Share on other sites More sharing options...
ZwenZwenzzon Posted December 2, 2010 Share Posted December 2, 2010 Exellent tutoring guys :thumbsup: That solved my button customization confusion. What's the point with those tep_draw_button thangs when a simple class in the main stylesheet can do it as well? Link to comment Share on other sites More sharing options...
ZwenZwenzzon Posted December 2, 2010 Share Posted December 2, 2010 Ok, an other tricky one I ran into from the product_info.php page: <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> How to replace that one with an ordinary text link? (and eventually a GIF icon) Link to comment Share on other sites More sharing options...
ZwenZwenzzon Posted December 3, 2010 Share Posted December 3, 2010 with 2.3.1 the header links are now buttons but I want to revert mine to text links with a small icon to the left of the link if possible. Can anyone help, been trying all night to no avail! Thanks. Here is my contribution to the header shortcut block: <div id="headerShortcuts"> <?php echo '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>' . '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" alt="" >' . HEADER_TITLE_CHECKOUT . '</a>' . '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" alt="" >' . HEADER_TITLE_MY_ACCOUNT . '</a>'; if (tep_session_is_registered('customer_id')) { echo '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" alt="" >' . HEADER_TITLE_LOGOFF . '</a>'; } ?> </div> and some css to begin with: .headerShortcutLink { background: #2b5b2b url(icon.gif); border: 2px solid black; color:white; padding: 8px; margin-right:3px; } Don't forget to remove the JavaScript BS too as burt told. ---------------------------------------------------- I'm still trying to solve my previous question to remove tep_draw_hidden_field. Somebody knows how to? Link to comment Share on other sites More sharing options...
blr044 Posted January 25, 2011 Share Posted January 25, 2011 Have no reason why or what happen. Up to today, the navigation in header for account and etc. were buttons. Today they are as text links. The header has not been changed for except I added a create account button/link. Below is the section of header.php file: <div id="header" class="grid_24"> <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> <div id="headerShortcuts"> <?php echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CREATE_ACCOUNT, 'person', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); if (tep_session_is_registered('customer_id')) { echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL')); } ?> </div> <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> </div> Class headerShortcuts is still in the stylesheet and it isn't commented out. So am wondering if this has happen to anyone else and what might I have to look at to resolve this issue? Thanks. Bennett Link to comment Share on other sites More sharing options...
blr044 Posted January 25, 2011 Share Posted January 25, 2011 Have no reason why or what happen. Up to today, the navigation in header for account and etc. were buttons. Today they are as text links. The header has not been changed for except I added a create account button/link.[/code] Wasn't sure if this was the right place to place this posting. But found the error. When I downloaded a new theme fromThemeroller, I noticed it comes with jquery-ui-1.8.9.custom.css. As I have learned, jquery-ui-1.8.9.custom.css, needs to renamed as jquery-ui-1.8.9.css. But somehow I renamed ext/jquery/ui/jquery-ui-1.8.6.min.js of includes/template_top.php to ext/jquery/ui/jquery-ui-1.8.9.min.js Link to comment Share on other sites More sharing options...
Guest Posted March 8, 2011 Share Posted March 8, 2011 I have used the code suggested. It moved the text links to the upper left hand corner. My first choice would have the text links on the right hand side IN THE header bar, second choice would be immediately above the header bar. When I search for this, the search replies I am using html tags which I'm not. Thank you for your help. Carver Link to comment Share on other sites More sharing options...
Juzzyman Posted March 24, 2011 Share Posted March 24, 2011 If you have the link still inside the headerShortcuts div you'll also need to remove this; <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> Or rename the div. I have followed these instructions and managed to change the tabs to text but they are all right next to each other. So no spaces, how do I create a space between the words or add a vertical line to break them up or something? Link to comment Share on other sites More sharing options...
wildvettes Posted March 24, 2011 Share Posted March 24, 2011 I have followed these instructions and managed to change the tabs to text but they are all right next to each other. So no spaces, how do I create a space between the words or add a vertical line to break them up or something? I suck at coding and I'm barely learning, but this will be what you'll want yours to look like to do what you are describing... :) Glad I could actually help someone. <div class="grid_24 ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"> <?php echo ' ' . $breadcrumb->trail(' » '); ?> <div style="width:50%;float:right;text-align:right;padding-right:10px;"> <?php echo '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>'. ' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" alt="" >' . HEADER_TITLE_CHECKOUT . '</a>' .' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" alt="" >' . HEADER_TITLE_MY_ACCOUNT . '</a>'; if (tep_session_is_registered('customer_id')) { echo ' '.'»'.' '.'<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" alt="" >' . HEADER_TITLE_LOGOFF . '</a>'; } ?> </div> </div> </div> Link to comment Share on other sites More sharing options...
Juzzyman Posted March 24, 2011 Share Posted March 24, 2011 I suck at coding and I'm barely learning, but this will be what you'll want yours to look like to do what you are describing... :) Glad I could actually help someone. <div class="grid_24 ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"> <?php echo ' ' . $breadcrumb->trail(' » '); ?> <div style="width:50%;float:right;text-align:right;padding-right:10px;"> <?php echo '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>'. ' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" alt="" >' . HEADER_TITLE_CHECKOUT . '</a>' .' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" alt="" >' . HEADER_TITLE_MY_ACCOUNT . '</a>'; if (tep_session_is_registered('customer_id')) { echo ' '.'»'.' '.'<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" alt="" >' . HEADER_TITLE_LOGOFF . '</a>'; } ?> </div> </div> </div> You are an absolute LEGEND!!! Thanks so much for that!!! Link to comment Share on other sites More sharing options...
wildvettes Posted March 24, 2011 Share Posted March 24, 2011 You are an absolute LEGEND!!! Thanks so much for that!!! Not a problem. :D Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2011 Share Posted March 24, 2011 May I first of all apologize for my blatant thread hijack, not being aware of any nomenclature associated with these buttons, I came to the first thread to mention an issue with them. My problem is not getting the button's to operate as text but to have them working in the first place. My Code Snippet Is as standard <div id="header" class="grid_24"> <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> <div id="headerShortcuts"> <?php echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); if (tep_session_is_registered('customer_id')) { echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL')); } ?> </div> <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> </div> Yet the buttons simply do not function could someone point me in the right direction :) or supply link to more suitable thread :) I am thinking this is an sql issue..... Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2011 Share Posted March 24, 2011 May I first of all apologize for my blatant thread hijack, not being aware of any nomenclature associated with these buttons, I came to the first thread to mention an issue with them. My problem is not getting the button's to operate as text but to have them working in the first place. My Code Snippet Is as standard <div id="header" class="grid_24"> <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> <div id="headerShortcuts"> <?php echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); if (tep_session_is_registered('customer_id')) { echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL')); } ?> </div> <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> </div> Yet the buttons simply do not function could someone point me in the right direction :) or supply link to more suitable thread :) I am thinking this is an sql issue..... Having done some further testing it would appear that the header shortcuts work whilst not logged in or whilst the cart is empty, they will not work once thee cart has items in. Am I alone in these issues? Link to comment Share on other sites More sharing options...
Juzzyman Posted March 24, 2011 Share Posted March 24, 2011 Having done some further testing it would appear that the header shortcuts work whilst not logged in or whilst the cart is empty, they will not work once thee cart has items in. Am I alone in these issues? I think so. I have just checked my site, although still in development and all my buttons work. Whether the cart is empty or has stuff in it. I am using version 2.3.1,you? I think click on the "start new topic" button and go and ask in the "General Support" section. You may have more chance of getting the reply you need. Sorry I can't be of more assistance. I'm a newbie! Link to comment Share on other sites More sharing options...
Juzzyman Posted March 24, 2011 Share Posted March 24, 2011 Take a look at this too Adam http://www.oscommerce.com/forums/topic/358320-problem-with-buttons/page__p__1507007__hl__buttons+don%26%2339%3Bt+work__fromsearch__1#entry1507007 Link to comment Share on other sites More sharing options...
surrfman Posted March 24, 2011 Share Posted March 24, 2011 hey guys to get a break between the cart and account stuff just add a | between the two %nbsp's at end of the tep link line. here is my code <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ if ($messageStack->size('header') > 0) { echo '<div class="grid_24">' . $messageStack->output('header') . '</div>'; } ?> <div id="header" class="grid_24"> <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> <div id="headerShortcuts"> </div> </div> <div class="grid_24 ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"><?php echo ' ' . $breadcrumb->trail(' » '); ?> <span style="margin-left: 560px;"> <?php echo '<a class="headershortcutlink" href="' . tep_href_link(FILENAME_CART_CONTENTS) . '"alt="" >'.($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a> | ' . '<a class="headershortcutlink" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" alt="">' . HEADER_TITLE_CHECKOUT . '</a> | ' . '<a class="headershortcutlink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '"alt="">' . HEADER_TITLE_MY_ACCOUNT . '</a>' ; if (tep_session_is_registered('customer_id')) {echo '<a class="headershortcutlink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"alt="" >' . HEADER_TITLE_LOGOFF . '</a> | ' ; } ?> </span> </div> </div> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td> </tr> </table> <?php } ?> my problem is I can't figure out how to make the distance between the left side text and the right side text dynamic when clicking a right side text link. I know I have that 560px space in there. if i try the code Juzzyman posted it goes dynamic, but my right column shifts over to the left side of page. also can't get the bar itself to fill the 960 wide page, it will only go to 950px regardless of what i change? thanks, Timmy C Link to comment Share on other sites More sharing options...
wildvettes Posted March 24, 2011 Share Posted March 24, 2011 You are an absolute LEGEND!!! Thanks so much for that!!! ****UPDATE**** If you used my code you need to change the percentage from 50% to 32%...why? Because your breadcrumb is going to push into it causing it to shift down a line. I have pretty long deep categories but I'm still close...I might even have to go in later and remove top-catalog from my breadcrumb to fit it all. You may or may not run into this problem eventually, if you do this is your fix. :thumbsup: If you change to something smaller than 32% then when your customer is logged in it will shift down also, so this seems to be the best number Link to comment Share on other sites More sharing options...
surrfman Posted March 25, 2011 Share Posted March 25, 2011 thanks amn... the 32% worked fabuously! next issue is how to get the nav to understand it needs to go all the way? the site i'm constructing: www.discountegauges.com Timmy C Link to comment Share on other sites More sharing options...
wildvettes Posted March 25, 2011 Share Posted March 25, 2011 I found some issues with the way I had this setup, causing issues with the breadcrumbs...so I recoded it to not matter how long the breadcrumbs are. The breadcrumbs will hit the 65% point in the header and wrap to the next line automatically expanding their container and the 35% box stays fixed. I switched to 35% for different monitor resolutions and because once people put something in their shopping cart it begins placing numbers in front of the cart messing up the 32% container. I'll continue to play with it, but I'm pretty sure this should fix any possible issues. <div class="grid_24 ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"> <div style="width:65%;"> <?php echo ' ' . $breadcrumb->trail(' » '); ?> </div> <div style="width:35%;float:right;text-align:right;padding-right:10px;margin-top:-15px;"> <?php echo '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>'. ' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" alt="" >' . HEADER_TITLE_CHECKOUT . '</a>' .' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" alt="" >' . HEADER_TITLE_MY_ACCOUNT . '</a>'; if (tep_session_is_registered('customer_id')) { echo ' '.'»'.' '.'<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" alt="" >' . HEADER_TITLE_LOGOFF . '</a>'; } ?></div> </div> </div> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.