Hi,
I'm trying to customise the columns displayed in MY-ADMIN/customers.php so that it shows the customer's email address, telephone number and fax number.
I've managed to get the email and telephone number to show, but not the fax number.
Here's the existing code of MY-ADMIN/customers.php which controls this (line 1221 onwards)
PHP Code:
<td class="dataTableContent" align="right"><?php echo $customers->fields['customers_id'] . ($zc_address_book_count == 1 ? TEXT_INFO_ADDRESS_BOOK_COUNT . $zc_address_book_count : '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'action=list_addresses' . '&cID=' . $customers->fields['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . TEXT_INFO_ADDRESS_BOOK_COUNT . $zc_address_book_count . '</a>'); ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_lastname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_firstname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['entry_company']; ?></td>
<td class="dataTableContent"><?php echo zen_date_short($info->fields['date_account_created']); ?></td>
<td class="dataTableContent"><?php echo zen_date_short($customers->fields['customers_info_date_of_last_logon']); ?></td>
<td class="dataTableContent"><?php echo $group_name_entry; ?></td>
I changed this to the following which inserts the email, phone and fax after the company name and before the date the account was created:
PHP Code:
<td class="dataTableContent" align="right"><?php echo $customers->fields['customers_id'] . ($zc_address_book_count == 1 ? TEXT_INFO_ADDRESS_BOOK_COUNT . $zc_address_book_count : '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'action=list_addresses' . '&cID=' . $customers->fields['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . TEXT_INFO_ADDRESS_BOOK_COUNT . $zc_address_book_count . '</a>'); ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_lastname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_firstname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['entry_company']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_email_address']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_telephone']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_fax']; ?></td>
<td class="dataTableContent"><?php echo zen_date_short($info->fields['date_account_created']); ?></td>
<td class="dataTableContent"><?php echo zen_date_short($customers->fields['customers_info_date_of_last_logon']); ?></td>
<td class="dataTableContent"><?php echo $group_name_entry; ?></td>
The email address and telephone are now showing up in the table, but not the fax number. I checked in phpMyAdmin and 'customers_fax' is in the 'customers' table (as are 'customers_email_address' and 'customers_telephone'), so I'm not sure what I'm doing wrong - any ideas?
Many thanks
Lee
Bookmarks