Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Adding specific columns to Customers page in admin

    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 == 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'] > '&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 == 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'] > '&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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Adding specific columns to Customers page in admin

    You'll need to add your additional fields to the $customers_query_raw query string if you want it to retrieve that data from the database table.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Adding specific columns to Customers page in admin

    Fixed... thanks DrByte!

  4. #4
    Join Date
    Aug 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: Adding specific columns to Customers page in admin

    Quote Originally Posted by igi2011 View Post
    Fixed... thanks DrByte!
    HI, I am running: Zen Cart 1.5.0
    Database Patch Level: 1.5.0
    v1.5.0 [2012-06-19 14:08:50] (Fresh Installation)
    v1.5.0 [2012-06-19 14:08:50] (Fresh Installation)

    And, I am getting the same error. My customer registration form requires a telephone number but during the order/payment process when the customer address details are displayed, the phone number filed is not showing and the error, "Your Telephone Number a minimum of 10 characters." is displayed and the order cannot be completed.

    HELP!

    Thank you,
    - Deservingdog

  5. #5
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Adding specific columns to Customers page in admin

    Hi Guys/Dr. Byte,

    We are trying to add a new drop down field after the customer Authorization box (green/red), where it will simply say if a customer is Consumer, International or Wholesale (save it to a table in the database). What's easiest way to go by this, any add ons similar to this we can edit and use?

    Thanks.


    Quote Originally Posted by Deservingdog View Post
    HI, I am running: Zen Cart 1.5.0
    Database Patch Level: 1.5.0
    v1.5.0 [2012-06-19 14:08:50] (Fresh Installation)
    v1.5.0 [2012-06-19 14:08:50] (Fresh Installation)

    And, I am getting the same error. My customer registration form requires a telephone number but during the order/payment process when the customer address details are displayed, the phone number filed is not showing and the error, "Your Telephone Number a minimum of 10 characters." is displayed and the order cannot be completed.

    HELP!

    Thank you,
    - Deservingdog

 

 

Similar Threads

  1. v154 specific products for specific customers
    By frodemikal in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 6 Jan 2016, 09:18 PM
  2. Adding Banners to a Specific Page
    By Psykryph in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Sep 2011, 03:22 AM
  3. Specific pages for specific customers
    By DamienDLSkinSolution in forum General Questions
    Replies: 3
    Last Post: 15 Mar 2010, 04:28 AM
  4. Adding more columns to the product listing page
    By thunderbird2004 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 25 Mar 2008, 10:05 PM
  5. Adding Extra Rows and Columns in Category's Page
    By MDEE in forum Customization from the Admin
    Replies: 1
    Last Post: 6 Sep 2007, 11:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR