Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to Display First Name in header after logged in?


taurianthebull

Recommended Posts

English.php contains

 

define('TEXT_GREETING_PERSONAL', '<span id="logout"><a href="%s">LOGOUT</a></span><span class="greetUser">%s - YOU ARE LOGGED IN</span> ');

 

This is used in general.php in tep_customer_greeting

 

if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {

$greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_href_link(FILENAME_LOGOFF, '', 'SSL'),tep_output_string_protected($customer_first_name));

} else {

$greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

}

 

tep_customer_greeting is used in 3 places in index.php.

 

With this info you should be able to track what you need to do

 

Happy hacking

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

<?php
if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
  echo '<div class="joking">So you came back ' . tep_output_string_protected($customer_first_name) . ' to spend more money .. GREAT!</div>' . "\n";
}  
?>

Link to comment
Share on other sites

<roflmao>

<?php
if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
  echo '<div class="joking">So you came back ' . tep_output_string_protected($customer_first_name) . ' to spend more money .. GREAT!</div>' . "\n";
}  
?>

</roflmao>

:D

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...