Results 1 to 8 of 8
  1. #1
    Join Date
    May 2009
    Posts
    155
    Plugin Contributions
    0

    Default How To Add New Fields to Invoice?

    Hi, I need to add an extra field to the customer invoice you can print off from Zencart Admin, does anyone know how I can do this? Its basically the ID# from ZC admin to get it to show on the invoice you can print in admin.

    Any help appreciated.

  2. #2
    Join Date
    May 2009
    Posts
    155
    Plugin Contributions
    0

    Default Re: How To Add New Fields to Invoice?

    Anyone?

    I have to change accounts system and for new one must have a unique account number for each customer and most obvious number to use is the zen id, but on new accounts system you can only search by the id number so it needs to show on the invoice thats printed off for me to enter all info into accounts package. Any help would be appreciated as I need to add this number manually to around 4000 records before I can change to new accounts system and dont want to start this long process until I know the zen ID number can be added to the invoice.

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

    Default Re: How To Add New Fields to Invoice?

    When you say zen ID are you meaning the zenid?

    The zenid is a session id and will never be the same again for anyone as once it times out it is gone ...

    The customers_id is unique to the customer and that remains the same for everything related to the customer ... perhaps that would be a better choice on what to use?
    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!

  4. #4
    Join Date
    May 2009
    Posts
    155
    Plugin Contributions
    0

    Default Re: How To Add New Fields to Invoice?

    Hi - yes its the unique customer ID created by zencart for each customer. I've added a screenshot from admin below showing the ID# I mean, currently the name, address, phone number etc shows on the invoice you can print from admin but not this ID number.


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

    Default Re: How To Add New Fields to Invoice?

    You can reference it on the invoice.php by using:
    $order->customer['id']
    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!

  6. #6
    Join Date
    May 2009
    Posts
    155
    Plugin Contributions
    0

    Default Re: How To Add New Fields to Invoice?

    OK - will see if I can get that done.
    Thanks again - been tearing my hair out trying to sort this
    Last edited by PudzPud; 7 Nov 2009 at 04:03 PM. Reason: changed text

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

    Default Re: How To Add New Fields to Invoice?

    If you peek in the orders.php class, you will see all of the built in arrays such as:
    Code:
          $this->info = array('currency' => $order->fields['currency'],
                              'currency_value' => $order->fields['currency_value'],
                              'payment_method' => $order->fields['payment_method'],
                              'payment_module_code' => $order->fields['payment_module_code'],
                              'shipping_method' => $order->fields['shipping_method'],
                              'shipping_module_code' => $order->fields['shipping_module_code'],
                              'coupon_code' => $order->fields['coupon_code'],
                              'cc_type' => $order->fields['cc_type'],
                              'cc_owner' => $order->fields['cc_owner'],
                              'cc_number' => $order->fields['cc_number'],
                              'cc_cvv' => $order->fields['cc_cvv'],
                              'cc_expires' => $order->fields['cc_expires'],
                              'date_purchased' => $order->fields['date_purchased'],
                              'orders_status' => $order->fields['orders_status'],
                              'total' => $order->fields['order_total'],
                              'tax' => $order->fields['order_tax'],
                              'last_modified' => $order->fields['last_modified'],
                              'ip_address' => $order->fields['ip_address']
                              );
    that indicates a call to:
    $order->info['payment_method']

    would give the payment method used ...

    or a call to:
    $order->info[orders_status']

    would give the orders_status ...

    If you look through the file, you will see the other calls that can be used and how the fields are referenced ...
    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 2009
    Posts
    155
    Plugin Contributions
    0

    Default Re: How To Add New Fields to Invoice?

    MWAH
    Thank you - I got it sorted - now to update 16,500 records on the accounts package ....

 

 

Similar Threads

  1. How To Add New Product Fields?
    By webego in forum Setting Up Categories, Products, Attributes
    Replies: 158
    Last Post: 18 Oct 2019, 04:19 PM
  2. How to add new fields?
    By chandroo007 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 1 Jun 2010, 03:13 PM
  3. How do I add new form fields on the registration page?
    By RawKarat in forum General Questions
    Replies: 1
    Last Post: 13 Dec 2009, 10:49 PM
  4. How to add labels to new fields
    By kappaluppa in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 3 Feb 2007, 07:16 PM
  5. How i can add new data fields to a Product
    By shreesoft in forum Customization from the Admin
    Replies: 4
    Last Post: 2 Oct 2006, 03:10 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