Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change 'my account' in 'login'


Darklings

Recommended Posts

In header.php you will need to modify your code for the bar with login/my account to read something like this:

 

if (tep_session_is_registered('customer_id')) {

echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') .

'"class=headerNavigation>Log Out</a> | <a href="account.php" class="headerNavigation">My Account</a>';

}

else {

echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') .

'"class=headerNavigation>Log In | </a>';

echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') .

'"class=headerNavigation>Create Account</a>';

}

 

 

For the login stuff you will want to delete or modify a few lines of code from login.php. Do a search in that file for snapshot and you will see a few lines of code that create one which you don't want.

 

 

Hope this helps.

Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

I did the following:

 

In /includes/header.php around line 61 i changed:

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <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>
</table>

 

To

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <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 } ?><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |   <?php } else { ?><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN; ?></a> |   <?php } ?><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>
</table>

 

 

To explain what i did:

 

i asked if the person viewing was already logged in by: if (tep_session_is_registerd('customer_id'))

Then he must show the 'account' btn if he is logged in - so thats what the :

 

<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <?php }

 

stands for

 

then a else

 

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

 

so, withouth knowing a word php - i just made this, by looking to the code.

Hope it will help anyone - as it helped me.

 

Kind regards,

tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...