Get the book
Old 6th November 2009, 11:44 AM   #1
PudzPud
New Zenner
 
Join Date: May 2009
Posts: 28
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.
PudzPud is offline   Reply With Quote
Old 7th November 2009, 11:43 AM   #2
PudzPud
New Zenner
 
Join Date: May 2009
Posts: 28
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.
PudzPud is offline   Reply With Quote
Old 7th November 2009, 03:12 PM   #3
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 50,238
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline   Reply With Quote
Old 7th November 2009, 03:47 PM   #4
PudzPud
New Zenner
 
Join Date: May 2009
Posts: 28
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.

PudzPud is offline   Reply With Quote
Old 7th November 2009, 04:02 PM   #5
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 50,238
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline   Reply With Quote
Old 7th November 2009, 04:02 PM   #6
PudzPud
New Zenner
 
Join Date: May 2009
Posts: 28
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; 7th November 2009 at 04:03 PM. Reason: changed text
PudzPud is offline   Reply With Quote
Old 7th November 2009, 04:56 PM   #7
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 50,238
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline   Reply With Quote
Old 15th November 2009, 03:50 PM   #8
PudzPud
New Zenner
 
Join Date: May 2009
Posts: 28
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 ....
PudzPud is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make orders.php Invoice button print invoice rather than display it dinki Contribution-Writing Guidelines 0 28th September 2009 04:28 PM
customer invoice not admin invoice broeder Customers and Orders 1 28th April 2009 12:28 AM
Looking to add print invoice and shipp invoice from admin---> orders r4fdud Upgrading from 1.3.x to 1.3.8 0 16th March 2009 12:21 AM
Client Invoice - problems customizing the popup-print-invoice addon LloydR All Other Contributions/Addons 4 6th August 2008 10:59 PM
Create Account - modify existing fields or add extra fields? sopretty General Questions 1 1st November 2006 08:01 PM


All times are GMT +1. The time now is 11:09 PM.

Learn tips, tricks & secrets for your Zen Cart™
Sign up for our FREE Newsletter

Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content and Graphics Copyright (c) 2006, 2007, 2008, 2009 Zen Ventures, LLC - all rights reserved
Get Zen Cart E-Commerce Shopping Cart at SourceForge.net. Fast, secure and Free Open Source software downloads