Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Adding Fax Number Field to Packing/Invoice

    Hi!

    I am trying to get the Fax Number field to show on my Packing and Invoice Slips.

    I know I have to edit invoice.php and packingslip.php from the admin folder but I don't know to get the fax number to show.

    I'd like it to go below:

    HTML Code:
    <tr><td class="main"><?php echo $order->customer['telephone']; ?></td></tr>
    So it prints:

    Fax Number: (whatever the customer entered)

    I thought I might have gotten away with it as

    HTML Code:
    <tr>
                <td class="main"><?php echo $order->customer['fax']; ?></td>
              </tr>
    but no.

    Thanks
    Ernie

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

    Default Re: Adding Fax Number Field to Packing/Invoice

    The fax is not stored with the order ...

    Either you would need to re-write the way the orders table entry is made and add this field or you would need to call the field from the customers table ...
    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!

  3. #3
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Re: Adding Fax Number Field to Packing/Invoice

    So is there an easy way to `call the field from the customers table' so that it will display/print on the invoice and packing slip.

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

    Default Re: Adding Fax Number Field to Packing/Invoice

    You might make your own function that can call the customers and customers_info tables similar to the function zen_products_lookup in the functions_lookups.php and retrieve the contents of any field you like ...

    Makes it a little more useful than a single function for just 1 peice of information ...
    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
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Re: Adding Fax Number Field to Packing/Invoice

    Quote Originally Posted by esugrue View Post
    So is there an easy way to `call the field from the customers table' so that it will display/print on the invoice and packing slip.
    You might make your own function that can call the customers and customers_info tables similar to the function zen_products_lookup in the functions_lookups.php and retrieve the contents of any field you like ...

    Makes it a little more useful than a single function for just 1 peice of information ...
    So for somone who doesn't write pages of code for a living, that would be a no, since unless you can understand how all those function calls and lookups etc are coded and work together, it's not easy.

  6. #6
    Join Date
    May 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Adding Fax Number Field to Packing/Invoice

    I wanted to do the same thing. I was pretty shocked to find that the zen_orders table doesn't capture the customer's fax number! It manages to capture everything else BUT the fax number. So, aside from having a good understanding of the schema and writing some code, there is no way to add the customer's fax number to the invoice. It's insane.

    If anyone out there could post a sql query that pulls customers_fax from the zen_customers table for the given order id and can be pasted into the invoice.php file, it would be very useful for a lot of people!


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

    Default Re: Adding Fax Number Field to Packing/Invoice

    A quick way to do this on invoice.php is to change:
    PHP Code:
      $oID zen_db_prepare_input($_GET['oID']); 
    To read:
    PHP Code:
      $oID zen_db_prepare_input($_GET['oID']);

      
    $sql "SELECT o.customers_id, c.customers_fax from " TABLE_ORDERS " o, " TABLE_CUSTOMERS " c WHERE c.customers_id= o.customers_id and o.orders_id = '" $oID "'";
      
    $chk_customers_fax $db->Execute($sql);
      
    $customers_fax $chk_customers_fax->fields['customers_fax']; 
    Now you can use:
    $customers_fax

    anywhere you want on the invoice.php

    The same thing can be done on the packingslip.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!

  8. #8
    Join Date
    May 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Adding Fax Number Field to Packing/Invoice

    Excellent. The code you posted was just what I needed. I have also been able to make other changes to the invoice.php file by expanding upon the example you provided.

    Thanks!

    Coffee donation is on the way.

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

    Default Re: Adding Fax Number Field to Packing/Invoice

    Glad this was able to help you out!

    Thanks for the support ... the Zen Cart Team greatly appreciates the donations so that we can continue to provide the software for you to run your store and the Free support forum ...
    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!

  10. #10
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: Adding Fax Number Field to Packing/Invoice

    Hello sorry but i triad to put the code in my orders.php (in admin section) and don’t work. Can you help me

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Adding Manufacturers_id to Invoice/packing Slip
    By NickyCarroll in forum Customization from the Admin
    Replies: 3
    Last Post: 25 Apr 2012, 10:44 PM
  2. 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
  3. Using "Fax Number" field as "Tax ID Number"
    By e81ny in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Aug 2009, 04:19 PM
  4. Adding client Fax number to confirmation email
    By JuanDBB in forum General Questions
    Replies: 2
    Last Post: 5 May 2009, 03:35 PM
  5. Item number on order, invoice & packing list
    By Tatay in forum Managing Customers and Orders
    Replies: 3
    Last Post: 12 Sep 2008, 06:04 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