charmed-imsure Posted December 16, 2008 Share Posted December 16, 2008 I've posted already but no repsonses :-( so I've changed the title to see if anyone can help. I have an issue with the Welcome Guest - log yourself in or create account blah blah. When you log in, it still says the same Welcome Guest, yet it knows you're logged in because it displays your cart & order history. I've created a ficticious account so that if anyone would like to see for themselves please feel free if it will help. Please go to: www.just-keyrings.co.uk Log in as: john@doe.co.uk password: johndoe The current welcome bit is written into my includes/languages/english/index.php The file define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?'); is where it should be. So how come this isn't working? Should there be something somewhere else point to it after a successful log in & if so, where? Link to comment Share on other sites More sharing options...
markg-uk Posted December 17, 2008 Share Posted December 17, 2008 The code that either says welcome guest or welcome john is done by the function tep_customer_greeting() in functions/general : 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, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW)); } else { $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); } return $greeting_string; } Not sure why (unless the function is not as above). Logically, it would mean that there are no session variables for either the 'customer_first_name' or 'customer_id', so that the first if is always false. Try putting: . ' ' . $customer_first_name . ' ' . $customer_id before the last ; on the first $greeting_string as a test - it will echo the customer's first name and id number to the screen Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.