Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display customer name somewhere


mattwho

Recommended Posts

What is the variable that hold s the customer name once they login?

 

I need to use this to display the customer name somewhere on my site.

 

please help

 

if you think you might know the answer or have any ideas at all please answer. you won't be wasting my time.

Link to comment
Share on other sites

look on account_edit.php

 

Find your query that draws out the information from the database. You will need that on the page you will be putting there name on.

 

I think then the variable then is $account['customers_firstname'] then there is $account['customers_lastname']

 

 

-Dennis

Link to comment
Share on other sites

Here is the query code. Its around line 116.

 

$account_query = tep_db_query("select customers_gender, customers_firstname, customers_lastname, customers_dob, customers_email_address, customers_telephone, customers_fax from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

 

$account = tep_db_fetch_array($account_query);

 

Obviously take out gender and dob and whatever you dont need so your not quering more then you need.

 

-Dennis

Link to comment
Share on other sites

Here is the query code.  Its around line 116.

 

$account_query = tep_db_query("select customers_gender, customers_firstname, customers_lastname, customers_dob, customers_email_address, customers_telephone, customers_fax from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

 

$account = tep_db_fetch_array($account_query);

 

Obviously take out gender and dob and whatever you dont need so your not quering more then you need.

 

-Dennis

 

Can I use this in an infobox?

 

this is the code for the box

<?php/*// Added for Live Support provided by Crafty Syntax Live Help // */?><!-- information //-->          <tr>            <td><?php  $info_box_contents = array();  $info_box_contents[] = array('align' => 'center',                               'text'  => BOX_HEADING_LIVE_SUPPORT                              );  new infoBoxHeading($info_box_contents, false, false);  $info_box_contents = array();  $info_box_contents[] = array('align' => 'center',                               'text'  => '<!-- Powered by: Crafty Syntax Live Help (CSLH) http://CSLH.com/ --><script language="javascript" src="/catalog/livesupport/livehelp_js.php?relative=Y&department=1&username=USERNAME"></script><!-- copyright 2003 by Eric Gerdes -->'                              );  new infoBox($info_box_contents);?>            </td>          </tr><!-- information_eof //-->
1

 

I need USERNAME to be the variable.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...