Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login link in header


danicasati

Recommended Posts

Actually I have following items in header.php:

 

BREADCUMB | (CLOSE SESSION) | ACCOUNT DATA | SHOPPING CART | CHECKOUT

 

with this code:

  <tr class="headerNavigation">
	<td class="headerNavigation">??<?php echo $breadcrumb->trail(' ? '); ?></td>
<td align="right" class="headerNavigation"><?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 } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> ?|? <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> ?|? <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> ??</td>
 </tr>

 

When user login, appears the "CLOSE SESSION" link.

 

I'd like to add a link to a login page, but, when user log on, the link must disappear.

How can I do this?

Link to comment
Share on other sites

Actually I have following items in header.php:

 

BREADCUMB | (CLOSE SESSION) | ACCOUNT DATA | SHOPPING CART | CHECKOUT

 

with this code:

  <tr class="headerNavigation">
	<td class="headerNavigation">??<?php echo $breadcrumb->trail(' ? '); ?></td>
<td align="right" class="headerNavigation"><?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 } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> ?|? <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> ?|? <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> ??</td>
 </tr>

 

When user login, appears the "CLOSE SESSION" link.

 

I'd like to add a link to a login page, but, when user log on, the link must disappear.

How can I do this?

Just check session(user_name) you can find code on almost most of the pages which checks whether the session has user name or not use that code part and put an if else condition for login and close session links.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Just check session(user_name) you can find code on almost most of the pages which checks whether the session has user name or not use that code part and put an if else condition for login and close session links.

Satish

Here is the code

if (!tep_session_is_registered('customer_id')) {

place link for login }

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...