Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add a shortcut button link


cyberndj

Recommended Posts

Hi,

 

I'm trying to add a button to the header shortcut section to link to an "about me" page.

 

I found the div in the includes/header.php file where the buttons are being drawn and try added my own entry:

tep_draw_button('', 'About Me', 'root_location/my_about_me_page.php', '', '');

 

However, when I do this it just displays this one button and not the other 3 buttons. How can I have it where it shows the original buttons plus my "about me" button-link?

 

-Jake

Link to comment
Share on other sites

@@cyberndj

 

Try this:

 

<?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_ABOUT_US, 'triangle-1-e', tep_href_link(FILENAME_ABOUT_US, '', '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'));

}

?>

 

Then ensure you have the filename added to the filename.php file, the language definition added to the english.php and the newly created about_us.php file added to the stores root

 

 

 

Chris

Link to comment
Share on other sites

Hi Chris,

 

Thanks for the quick response!

Looking over the code you posted, I noticed something in mine. At the end of my tep_draw line, I had a semicolon. I changed it into a period, and now it works just as I want it to.

(I'm backwords sometimes as I have my "About Me" page as the site root and the OSC install in as a "Store" directory).

 

Thanks again for you response and help!

 

-Jake

Link to comment
Share on other sites

In case you link to any page out of the osCommerce environment you'll loose the session anyway and therefor you don't need the tep_href_link function for the button link

 

You can find an illustrated example about how to add buttons to your header here

Link to comment
Share on other sites

@@cyberndj

 

You are welcome :)

 

I would however suggest, you place your "about us" page within your osCommerce structure. The way you have it now, anyone who will read "about you" will loose the session and cart contents, a click on "about us" will function like a "cart emptier" and I don't think you want this right?

 

Do you know how to create an about us page within oscommerce?

Link to comment
Share on other sites

My "About Me" page is a page I've built to be an "online resume." It is full of different sections and has its own navigation menu and article/guides with full size pictures. Do you have a link in your tricks to keep the session info if they browse to my about/resume page and go back? --that would be really cool!

 

-Jake

 

(Note to Self: set owner on all new files copied in -- that way Apache will server them up! )

Link to comment
Share on other sites

  • 11 months later...

Hi,

Great topic.... I would appreciate if you can tell me how to put buttons in infoBoxContainer (box where is button ''Catalog'' and ''Top'') in header on the bottom. And not on the top, right corner where is My account, Checkbox... I need to put in buttons like ''specials'', ''Login'', ''Contact''... with links to that pages, so with internal links. Buttons should be on the right side and not on the left side beside the Catalog... butons. Which .php files should be changed?

Or alternatively; can I make separated block and insert it into header with those buttons, including links and functionality.

Thanks and regards.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...