Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


ezfindit

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?

Chris

Link to comment
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?

Chris

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 4 months later...

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"?

Link to comment
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"?

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...