Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

greeting user function


save-lee

Recommended Posts

Hey there;

I want to change my greeting message as follows:

Welcome back John Doe. (The first and Lastname in the greeting)

 

I was thinking how to write this so I made in includes/function/general.php

CODE

 

// 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, 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'));

}

 

 

 

into:

 

CODE

// Return a customer greeting

function tep_customer_greeting() {

global $customer_id, $customer_first_name, $customer_last_name;

 

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

$greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name, $customer_last_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'));

}

 

 

 

But it doesn't seem to work... My greeting wont contain a lastname, neighter a first name anymore.

 

So grabbed the catalog/login.php

and wrote at line 50:

CODE

$customer_last_name = $check_customer['customers_lastname'];

tep_session_register('customer_last_name');

 

still it doesnt work.

What am I doing wrong????

 

(PS. sorry for double post; post the first message in wrong board)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...