Ajeh Posted December 17, 2002 Author Share Posted December 17, 2002 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. Quote Link to comment Share on other sites More sharing options...
Aodhan Posted December 17, 2002 Share Posted December 17, 2002 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 Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 17, 2002 Author Share Posted December 17, 2002 Very very technical ... you have to really delv into the heart of php to learn terms like moofy ... very, very deep ... :wink: Quote Link to comment Share on other sites More sharing options...
CC Posted December 17, 2002 Share Posted December 17, 2002 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. Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 18, 2002 Author Share Posted December 18, 2002 Did you touch /functions/general.php or change your language files for any of the TEXT_GREETING_* definitions? Quote Link to comment Share on other sites More sharing options...
CC Posted December 18, 2002 Share Posted December 18, 2002 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. Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 18, 2002 Author Share Posted December 18, 2002 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. Quote Link to comment Share on other sites More sharing options...
CC Posted December 18, 2002 Share Posted December 18, 2002 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. Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 18, 2002 Author Share Posted December 18, 2002 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? Quote Link to comment Share on other sites More sharing options...
CC Posted December 18, 2002 Share Posted December 18, 2002 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. Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 18, 2002 Author Share Posted December 18, 2002 :onfire: Another bug bites the dust ... Another bug bites the dust ... and another one ... Quote Link to comment Share on other sites More sharing options...
CC Posted December 18, 2002 Share Posted December 18, 2002 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. Quote Link to comment Share on other sites More sharing options...
CC Posted December 18, 2002 Share Posted December 18, 2002 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. Quote Link to comment Share on other sites More sharing options...
zboyblue Posted October 3, 2004 Share Posted October 3, 2004 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.