Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2006
    Posts
    45
    Plugin Contributions
    0

    application error Add Fax field in the Admin's Order page

    Hi everyone,

    I need to display customers fax in the order page, in the admin (that one where you can see all the customers details like address, email, phone, etc).

    I have tried the following, but still no success. I really apreciate your help.

    In admin/orders.php, I added this code:
    Code:
    "%' or o.customers_fax like '%"
    Also this:
    Code:
                  <tr>
                    <td class="main"><strong><?php echo ENTRY_FAX_NUMBER; ?></strong></td>
                    <td class="main"><?php echo $order->customer['fax']; ?></td>
                  </tr>
    After these changes, in my order page, it appears "Fax number:" text, but not the actual fax.

    So, in admin/includes/classes/order.php I basicaly added fax. I replaced this:

    Code:
        function query($order_id) {
          global $db;
          $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode,
                                        customers_state, customers_country, customers_telephone,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
                                        cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified,
                                        order_total, order_tax, ip_address
                                 from " . TABLE_ORDERS . "
                                 where orders_id = '" . (int)$order_id . "'");

    by this:

    Code:
        function query($order_id) {
          global $db;
          $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode,
                                        customers_state, customers_country, customers_telephone, customers_fax,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
                                        cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified,
                                        order_total, order_tax, ip_address
                                 from " . TABLE_ORDERS . "
                                 where orders_id = '" . (int)$order_id . "'");

    And this:
    Code:
          $this->customer = array('name' => $order->fields['customers_name'],
                                  'company' => $order->fields['customers_company'],
                                  'street_address' => $order->fields['customers_street_address'],
                                  'suburb' => $order->fields['customers_suburb'],
                                  'city' => $order->fields['customers_city'],
                                  'postcode' => $order->fields['customers_postcode'],
                                  'state' => $order->fields['customers_state'],
                                  'country' => $order->fields['customers_country'],
                                  'format_id' => $order->fields['customers_address_format_id'],
                                  'telephone' => $order->fields['customers_telephone'],
                                  'email_address' => $order->fields['customers_email_address']);
    by this:
    Code:
          $this->customer = array('name' => $order->fields['customers_name'],
                                  'company' => $order->fields['customers_company'],
                                  'street_address' => $order->fields['customers_street_address'],
                                  'suburb' => $order->fields['customers_suburb'],
                                  'city' => $order->fields['customers_city'],
                                  'postcode' => $order->fields['customers_postcode'],
                                  'state' => $order->fields['customers_state'],
                                  'country' => $order->fields['customers_country'],
                                  'format_id' => $order->fields['customers_address_format_id'],
                                  'telephone' => $order->fields['customers_telephone'],
    							  'fax' => $order->fields['customers_fax'],
                                  'email_address' => $order->fields['customers_email_address']);
    After that, I get this error when I enter my customer order page:

    1054 Unknown column 'customers_fax' in 'field list'

    Can anyone help me with this or give me a hint where to go? please,

    Thanks,
    MikeX

  2. #2
    Join Date
    Oct 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Add Fax field in the Admin's Order page

    ha another thread about fax. All I can say is take a seat and wait for help there no sloution so far. As Ajeh mention there no such as customers_fax in the database. I think Zen-Cart team will work on it on later verson

  3. #3
    Join Date
    Jan 2005
    Location
    Minneapolis MN, USA
    Posts
    136
    Plugin Contributions
    1

    Default Re: Add Fax field in the Admin's Order page

    Quote Originally Posted by MikeX View Post
    Hi everyone,

    I need to display customers fax in the order page, in the admin (that one where you can see all the customers details like address, email, phone, etc).

    I have tried the following, but still no success. I really apreciate your help.

    In admin/orders.php, I added this code:
    I don't have the solution, but I can point you in the right direction... I think. "-)

    customers_fax is in the Customers table, so you have to query it from that table based on the customer ID before you can display it. Look at customers.php for ideas, if you need them.

    Hope that makes sense... I'm on a marathon ZC customization myself right now so lack of sleep may contribute to my confusing the issue for you!

    Cheers,

    Becky

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Add Fax field in the Admin's Order page

    The customers table has the field customers_telephone and customers_fax but only customers_telephone is added to the orders table in the field customers_telephone ...

    To add the customers_fax to the orders table, you would need to add the field:
    customers_fax

    Then, follow along in the code for where customers_telephone or telephone is referenced ...

    Developer's Tool Kit can help track those two down for you ...

    Where you see customers_telephone you would need to address customers_fax ...

    More than likely, you can manage the Catalog side in the:
    /includes/classes/order.php

    Note: there isn't an overrides file for this

    Then in the Admin you would want to update the class as well as the main display for:
    /admin/includes/classes/order.php
    /admin/orders.php
    /admin/includes/languages/english/orders.php
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Oct 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Add Fax field in the Admin's Order page

    wow all useful tips I already finish the edit. another tips. there not only the admin selection also the zen-cart/inculde need to edit as well. Later on today after I back home I may write a guide to show how to edit. Thanks for all the information and tips.

 

 

Similar Threads

  1. How do I add an order field to the admin orders page?
    By izar74 in forum General Questions
    Replies: 4
    Last Post: 4 Jun 2015, 07:53 PM
  2. v151 fax number on order page?
    By kitcorsa in forum General Questions
    Replies: 7
    Last Post: 18 Aug 2014, 01:56 PM
  3. Guide to show Fax # on Order page?
    By JohnsonY in forum Customization from the Admin
    Replies: 9
    Last Post: 7 Sep 2011, 03:26 PM
  4. Adding customer fax number to admin order display
    By cjsmiff in forum Customization from the Admin
    Replies: 0
    Last Post: 5 Mar 2010, 02:31 AM
  5. How do I add a purchase order field to the admin orders page?
    By kbascombe in forum Managing Customers and Orders
    Replies: 1
    Last Post: 1 Oct 2009, 02:48 AM

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