Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add 'Login' to the header


Broadsword

Recommended Posts

Posted

Hello (again!)

 

Hopefully a quickie - although i can't find the answer....

 

In my header i have links as follows - My Account, Cart & Checkout.

 

Another - Log off - appears once a customer 'logs on' via the My Account link.

 

What i would also like to do is to add another called 'Login' )next to My Account) that CHANGES to 'Log Off' once actually logged in.

 

Can someone please explain to me how i achieve this? What do i need to add and where?

 

Many thanks.

Posted
Hello (again!)

 

Hopefully a quickie - although i can't find the answer....

 

In my header i have links as follows - My Account, Cart & Checkout.

 

Another - Log off - appears once a customer 'logs on' via the My Account link.

 

What i would also like to do is to add another called 'Login' (next to My Account) that CHANGES to 'Log Off' once actually logged in.

 

Can someone please explain to me how i achieve this? What do i need to add and where?

 

Many thanks.

 

 

Anyone? There are sites out there that have this.....i guess i'll just keep a-fiddlin'

Posted
Anyone? There are sites out there that have this.....i guess i'll just keep a-fiddlin'

If you change the "My Account" text to "Log in" that should achieve what you want. You might find this text in catalog.includes.languages.english.php or catalog.includes.languages.english.header.php. I'm don't have access to my files so can't find the exact location for you :D

Posted
If you change the "My Account" text to "Log in" that should achieve what you want. You might find this text in catalog.includes.languages.english.php or catalog.includes.languages.english.header.php. I'm don't have access to my files so can't find the exact location for you  :D

 

Hi - thanks for the reply. I know how to do what you suggest, but what i want to do is...

 

Have for example -

 

Cart | Checkout | My Account | Log In

 

across the top, but once the customer has logged in i want it to change to -

 

Cart | Checkout | My Account | Log Off

 

...then, once the customer 'logs off' the link changes back to Log In again.

 

Hope thats clearer. Cheers again :)

Posted

if you copy the line in the header.php in includes you will be 1/3 the way there you just need to give them different names and defintions in the english file

Vertical Climb watch me loose grip an plumit!!

Posted
if you copy the line in the header.php in includes you will be 1/3 the way there you just need to give them different names and defintions in the english file

 

Ive tried that but all i get is is going from -

 

Cart | Checkout | My Account | Log In

 

to

 

Log Off | Cart | Checkout | My Account | Log In

 

where as i want to get

 

Cart | Checkout | My Account | Log Off

 

where Log Off replaces Log In

 

I have found this site that does EXACTLY as i want!

 

http://www.mondberg.co.uk/index.php

 

I just need to know clearly what i have to do

Posted

Well, seeing as you were so nice about the site:

 

<tr>
   <td width=200><a href="index.php"><img src="images/spacer.gif" width=220 height=50 border=0 alt="Home"></a></td>
   <td class="headerNavigation" width=538><img src="images/textspacer.gif" width=1 height=30 alt=""><br><img src="images/textspacer.gif" width=190 height=1 alt=""><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  <font color="#444444">|</font>  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>  <font color="#444444">|</font>  <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a><?php if (tep_session_is_registered('customer_id')) { ?><a class="headerNavigation" href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation">  <font color="#444444">|</font>  <?php echo HEADER_TITLE_LOGOFF; ?></a><?
} else {
?>
<font color="#444444">  |  </font><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN; ?></a>


<?php } ?></td>
 </tr>

 

The first <td> relates to a background image as the home link.

 

Vger

Posted
Well, seeing as you were so nice about the site:

 

<tr>
   <td width=200><a href="index.php"><img src="images/spacer.gif" width=220 height=50 border=0 alt="Home"></a></td>
   <td class="headerNavigation" width=538><img src="images/textspacer.gif" width=1 height=30 alt=""><br><img src="images/textspacer.gif" width=190 height=1 alt=""><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  <font color="#444444">|</font>  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>  <font color="#444444">|</font>  <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a><?php if (tep_session_is_registered('customer_id')) { ?><a class="headerNavigation" href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation">  <font color="#444444">|</font>  <?php echo HEADER_TITLE_LOGOFF; ?></a><?
} else {
?>
<font color="#444444">  |  </font><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN; ?></a>
<?php } ?></td>
 </tr>

 

The first <td> relates to a background image as the home link.

 

Vger

 

 

That's absolutely fan, dabby (and if i may also say) dozie! I can now sleep like a baby at night!

 

Thanks very much. Mush appreciated!

Archived

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

×
×
  • Create New...