Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Username instead of Your Account!


Guest

Recommended Posts

Hi!

 

Please help me out!

 

I want to change the text when a registered user logges in, from "Your Account" to the logged in users name.

 

I tried to take <span class="greetUser">%s! and add it to the account.php file, but then it just wrote %s!?s account... and not username?s account!

 

Do somebody know witch command tell's what the name of the logged in user is?

 

Best Regards

 

Michael!

Link to comment
Share on other sites

In the file you want to edit, find the first:

 

?>

 

Add directly above something like ...

 

$custname_query = tep_db_query("select customers_name from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "';

 

(but check the customers_name and customers_id field names in the customers table as I just made them up)

 

 

Then change:

 

$info_box_contents[] = array('text' => BOX_HEADING_CUSTOMER_ORDERS);

 

to

 

$info_box_contents[] = array('text' => $custname_query['customers_name']);

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

 

Thanks, but it's not working.

 

The code you want me to change is in order_history.php and it's in Account.php the problem is!

 

Best Regards

 

Michael!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...