Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customers Name in the Header


Mort-lemur

Recommended Posts

Posted

I have noticed recently that some customers seem to register, then go straight back to the Create Account page.

 

Im getting the feeling that they may not know that creating an account has been successful and that they are logged in.

 

So my idea is to put the simple text "logged in as (customer name)" within my header bar.

 

I have searched for the correct code to use, without success.

 

I have the feeling that I need to insert something like if tep_session is registered echo ...............

 

But everything I try results in failure :(

 

Any suggestions or pointers gratefully received.

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

Header or Template Top or where-ever.

if (tep_session_is_registered('customer_id')) echo sprintf(LOGGED_IN_AS, $customer_first_name);

 

Language File

define('LOGGED_IN_AS', 'logged in as %s');

Posted

@@burt Thank you so much - works like a dream !

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

@@burt

I think putting this in the header in standard osc 2.3.3.4 would be a good addition

I have noticed that displaying the user logged in, becoming an internet standard as it is done on a lot of websites

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted

Suddenly my life seems worthwhile ...... (w00t)

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

Well I liked it enough to put it into my latest template. Similar behaviour already exists in the index page of osc in the tep_csutomer_greeting() function, but I don't really like that function at all as it is too strong:

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

No, I just want to have a look around thanks.

 

 

Posted

I hate that default function as well...

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Archived

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

×
×
  • Create New...