sydjeii Posted November 22, 2011 Posted November 22, 2011 hello there.. can somebody teach me how to remove the header shortcut buttons (checkout, account, cart) and replace them with just text links with the same functions as the original shortcut buttons? i already tried editing the jquery-ui css and successfully removed the background so the button text and small icon-like beside it were left..i thought i was good but everytime i click on the text, the shape of the button is showing up.. i couldn't explain it well so i attached a screenshot.. any help will be so much appreciated..thanks in advance.. New Picture (8).bmp -=PINOY AKO=-
multimixer Posted November 22, 2011 Posted November 22, 2011 I would modify the file includes/header.php and replace the buttons there by plain links. Examples of a plain links (using tep_href_link) are in almost all files You can also style them individually using css by adding additional rules just for that buttons (in case you want to keep all other button in place), you can read here My community profile | Template system for osCommerce - New: Responsive | Feedback channel
sydjeii Posted November 23, 2011 Author Posted November 23, 2011 Thanks for the suggestion Mr. multimixer.. I tried it with user account and checkout and it's great..I had trouble with the shopping cart though..the code is quite complicated since there are additional parameters i dont know which one to remove or change.. can you help me with this?.. here's what i want to do: (1) i still want to preserve the parameter that checks if the cart is empty or not (2) replace the shopping cart image with something i made (3) remove the button.. Thanks in advance.. :) -=PINOY AKO=-
multimixer Posted November 23, 2011 Posted November 23, 2011 What way did you try? The css styling or the header.php modification? Also, what "cart image" do you refer to? The small image within the button, or something else? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
sydjeii Posted November 23, 2011 Author Posted November 23, 2011 i tried modifying header.php..i've also solved problem 1 and 3.. here's what i did.. originally i have this code.. 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')); i replaced it with echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>' .'<br />'.//replaced line 27 '<a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING,'', 'SSL').'">'."Checkout".'</a>'//code replaced to line 28 and deleted this part <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> right now i think my links are ok..i got no problem with it anymore.. the cart i was referring to was the small cart within the button..i was able to remove it maybe because i also removed this piece of code..i want to replace it with a different cart image.. <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> So my only problem now is how will i insert a different small cart image beside the "Cart Contents" link.. :) -=PINOY AKO=-
PupStar Posted November 23, 2011 Posted November 23, 2011 try it this way tep_image(DIR_WS_IMAGES . 'cart.jpg', 'What\'s in your current shopping basket', '25', '20') . ' ' . tep_draw_button(HEADER_TITLE_CART_CONTENTS . '<b>' . ($cart->count_contents() > 0 ? ' - ' . $cart->count_contents() . ' item(s) - ' . $currencies->format($cart->show_total()) : '') . '</b>', null, tep_href_link(FILENAME_SHOPPING_CART)) . ' | ' . This code may need tinkering with for your needs as I lifted it straight from my header.php Regards Mark
multimixer Posted November 24, 2011 Posted November 24, 2011 What you need is something like this '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '>' . tep_image(DIR_WS_IMAGES . 'your_image.jpg', 'image title tag', '30', '30') . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>' + you need to upload the image to /images/ folder My community profile | Template system for osCommerce - New: Responsive | Feedback channel
lia_green Posted November 28, 2011 Posted November 28, 2011 Hi - this is exactly what I was looking for. I did as suggested and got text links with no icons and link/cart are working correctly. However, I'm having trouble with the last line to show login id. this is what I have which is working: echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>' . ' - ' . '<a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING,'', 'SSL').'">'."Checkout".'</a>' . ' - ' . '<a href="'.tep_href_link(FILENAME_ACCOUNT,'', 'SSL').'">'."Login".'</a>' First three lines work, but when I added in the "if" line I get error message: Parse error: syntax error, unexpected T_IF, expecting ',' or ';' in if (tep_session_is_registered('customer_id')) { echo '<a href="'.tep_href_link(FILENAME_LOGOFF,'', 'SSL').'">'."Logoff".'</a>' Any suggestions would be appreciated!
♥Monika in Germany Posted November 28, 2011 Posted November 28, 2011 after each of your echo statements, you need to set a ; to finish the command ... :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
♥Monika in Germany Posted November 28, 2011 Posted November 28, 2011 :-) glad to hear! :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
sydjeii Posted November 29, 2011 Author Posted November 29, 2011 Thanks mr.multimixer for the help..exactly what I need.. :) -=PINOY AKO=-
Recommended Posts
Archived
This topic is now archived and is closed to further replies.