Jump to content
ezfindit

Admin customers.php - Add Customer Phone Number in Summary View

Recommended Posts

Trying to modify the customers.php file (in admin) to also display the Customer Phone Number in the Summary view (along with First & Last Name, and Account Created fields).

I've added the heading in the language file and this code in the /admin/customers.php file:

<td class="dataTableContent"><?php echo $customers['customers_telephone']; ?></td>    

It should work.  Unfortunately, when viewing it (in summary view) it shows blank for all customers phone numbers.

I'm sure I've missed something. I run osComm 2.3.4.

Any thoughts?

Edited by ezfindit

Chris

Share this post


Link to post
Share on other sites
29 minutes ago, ArtcoInc said:

@ezfindit

Did you add the telephone number to the search query?

M

No.  I thought the query already pulled all the customer information.  Saw the telephone field listed in this query:

$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");


Is there another query I should modify?

Edited by ezfindit

Chris

Share this post


Link to post
Share on other sites

Figured it out!  Located the other query and added the field!
    $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_telephone, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_id DESC";

Thanks for the tip!


Chris

Share this post


Link to post
Share on other sites

I did this a long time ago along with some other info including the mobile number, which is just the standard fax column. I also added the customers number as it was useful for another link accounts addon I have. The extra info saves a lot of time when trying to contact customers.

Got to do it all again now that I am planning a new store of BS frozen.


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

I have a problem with the customer phone number.  It is set as 'required' and 'minimum 10' in Administration.  However  many of my customers do not enter their number, so it appears it is 'not required'.

Anyone know how to make it "required"?

Share this post


Link to post
Share on other sites
37 minutes ago, casemaker said:

I have a problem with the customer phone number.  It is set as 'required' and 'minimum 10' in Administration.  However  many of my customers do not enter their number, so it appears it is 'not required'.

Anyone know how to make it "required"?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×