Jump to content
Sign in to follow this  
Ajeh

Login Box w/My Account v5.0

Recommended Posts

That I am not sure of either.

 

I looked at the code for the loginbox.php just in case there is something odd about it, but I am not seeing anything that would effect whether or not the name shows.

 

Everything is based on tep_session_is_registered('customer_id') and nothing is being set because of this, it is just used in the IF statements along with a test on the filenames to know what to show/not show.

 

Let me know if you come up with something if I get time, I will see if I can load a clean April snapshot and see if it gets moofy for me.

Share this post


Link to post
Share on other sites
That I am not sure of either.

 

Let me know if you come up with something if I get time, I will see if I can load a clean April snapshot and see if it gets moofy for me.

 

"MOOFY"?!?!

 

Hmmm...I've been looking Linda, and I can't find this in the PHP docs...is this a technical term? :lol: :lol: :lol:

 

Aodhan

Share this post


Link to post
Share on other sites

Very very technical ... you have to really delv into the heart of php to learn terms like moofy ... very, very deep ... :wink:

Share this post


Link to post
Share on other sites

Well I am stumped with this!

I have been comparing what the problem might be, but to no evail.

 

I even put back my old version of login box, and I found this...

 

The old version of login box did not show the user name in the welcome message after login either, but!! Only if you used the loginbox.

If you still went to login.php page, it would then show the name on the main page.

 

However since adding this version (5.2) of LoginBox it no longer shows the name in Welcome message which ever way I do it.

So something along the way is effecting the code, but I can not see what it is.

 

If anyone has any ideas, please let me know.

As mentioned before, I am using an April dated Snapshot.

Let me know if you have similar problems...

 

ta

 

CC.

Share this post


Link to post
Share on other sites

Did you touch /functions/general.php or change your language files for any of the TEXT_GREETING_* definitions?

Share this post


Link to post
Share on other sites

Nope, I have only messed with general.php to add some functions on the same day, but this was not related.

They were for manufacturer tables, so I cant see how that would have effected it.

 

And I havent touched the TEXT files at all on this one.

 

What are you thinking might be the cause Linda?

I'll have a butchers and see what I can find, if it is inline with your thinking.

 

CC.

Share this post


Link to post
Share on other sites

Check the function tep_customer_greeting in general.php

 

It has been changed over the months and perhaps one of the changes is effecting your greeting.

 

It should say Hi Linda when I am logged in and Hi Guest when I am logged out.

 

But ... back in the ol'den days ... it still said Hi Linda after I logged out. This has changed since then depending on what date that function is that you are using.

Share this post


Link to post
Share on other sites

I changed that a while back anyway.

 

I know it was put in on purpose, but I personally saw this as something customers might think is a bug. So I got rid of that a while ago.

 

Perhaps this is causing me problems...

 

Do you know, if I just update that part to the latest version, just the tep_customer_greeting in general.php, will it go straight in, or is it likely to cause me problems??

 

thanks again Lindy. :wink:

 

CC.

Share this post


Link to post
Share on other sites

This is the current function:

////

// Return a customer greeting

 function tep_customer_greeting() {

   global $customer_id, $customer_first_name;



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

     $greeting_string = sprintf(TEXT_GREETING_PERSONAL, $customer_first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

   } else {

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

   }



   return $greeting_string;

 }

 

This is from July 9th:

////

// Return a customer greeting

 function tep_customer_greeting() {

   global $HTTP_COOKIE_VARS, $customer_id, $customer_first_name;



   if ($HTTP_COOKIE_VARS['first_name']) {

     $first_name = stripslashes($HTTP_COOKIE_VARS['first_name']);

   } elseif ($customer_first_name) {

     $first_name = $customer_first_name;

   }



   if ($first_name) {

     $greeting_string = sprintf(TEXT_GREETING_PERSONAL, $first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

     if (!$customer_id) {

       $greeting_string .= '<br>' . sprintf(TEXT_GREETING_PERSONAL_RELOGON, $first_name, tep_href_link(FILENAME_LOGIN, '', 'SSL'));

     }

   } else {

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

   }



   return $greeting_string;

 }

 

How does your's compare?

Share this post


Link to post
Share on other sites

Ok, never mind the last question.

 

I did it anyway, and guess what?

 

Problem solved.

 

The latest function in general.php obviously does a better job thn my old one.

 

Sorted!

Thanks mate.

 

CC.

Share this post


Link to post
Share on other sites

:onfire:

Another bug bites the dust ... Another bug bites the dust ... and another one ...

Share this post


Link to post
Share on other sites

Ooooh you beat me to it.

 

Here is what I just tested.

My old code commented out, with my new in below it:

 

////

// Return a customer greeting

/*  function tep_customer_greeting() {

   global $HTTP_COOKIE_VARS, $customer_id, $customer_first_name;



   if ($HTTP_COOKIE_VARS['first_name']) {

     $first_name = stripslashes($HTTP_COOKIE_VARS['first_name']);

   } elseif ($customer_first_name) {

     $first_name = $customer_first_name;

   }



   if ($HTTP_COOKIE_VARS['first_name']) {

     $greeting_string = sprintf(TEXT_GREETING_PERSONAL, $first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

     if (!$customer_id) {

       $greeting_string .= '<br>' . sprintf(TEXT_GREETING_PERSONAL_RELOGON, $first_name, tep_href_link(FILENAME_LOGIN, '', 'SSL'));

     }

   } else {

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

   }



   return $greeting_string;

 }*/



////

// Return a customer greeting

 function tep_customer_greeting() {

   global $customer_id, $customer_first_name;



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

     $greeting_string = sprintf(TEXT_GREETING_PERSONAL, $customer_first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

   } else {

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

   }



   return $greeting_string;

 }

 

Works better now.

 

CC.

Share this post


Link to post
Share on other sites

Stop typing so fast Linda, you keep beating me to the 'submit' button! :D

 

"... and another bites the dust Yeeeeeeeh!

Dum dum dum, another one biiii....."

 

And so forth... :oops:

Catchy tune.

 

Right I'm off to bed.

Thanks for the help mate.

 

Latrz

CC.

Share this post


Link to post
Share on other sites

I know this thread is a little old but reuse and recycle. : )

 

Can someone tell me how to change the way the greetings work? I am mostly confused by all the %s'. I don't know what they are for - <a href=%s> ?????

 

I would like to rework some things and maybe make the link point to their account so they can check on orders they have placed, etc.

 

Any help is appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×