Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

login link


yogi23

Recommended Posts

Posted

I want that in the Header Navigation, there is a link for login but when anybody does login then login link show off.

  • 2 months later...
Posted

Hi

A bit old thread but I am trying to do the same i.e.

 

I would like a login link in the top bar next to MY ACCOUNT |

instead of the hello guest blablabla register blablabla

 

Officially I would like it to disapear once logged in as the Log off link appears. in the same place.

 

Help will be welcome as I had a done some search but with no result yet.

 

Thanks

Posted

Well I found my way around it.

I hope this will help others as I have really struggled trying to find out how to do this, but with no luck until I throw myself into writing php.

 

In catalog/includes/header.php

 

The code was>> around line 128

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?> </a> | 

 

 

And I changed it to

 

 

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?> </a>  | 

 

<?php } else { ?><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN; ?> </a>  | 

 

 

 

That seems to works fine for me.

Please let me know if there is an obvious mistake or security issue as I am completely new to it all, and this is my first play around with php coding using a bit of copy paste and a bit of play and error. lol

 

Dam that was hard reading lot of the contributions and threads

Posted

Ooops be carefull, somehow it doesn't show it all.

Sorry I tried the code boxes to but the result was the same.

 

In the code the symbol | is in fact with invisible space. i.e

&.nbsp;|&.nbsp; without the dot between the & and n just as one does with a separator.

Archived

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

×
×
  • Create New...