Post by tgferreira » Mon Apr 20, 2015 5:07 pm

Hello everyone,

I found something that I cannot solve, so far.

In short I've created a custom field in the registration process (for VAT ID). In the database it is under the table Address with name custom_field. I would like to have it show on the invoice but so far I haven't had any sucess.

I've tried to add the following code to the file order.php under /admin/controller/sale/:

Line 2081 after the format of the address

Code: Select all

. "\n NIF  " . '{custom_field}'
After that in $find = array( I've added

Code: Select all

'{custom_field}'
And after that, in $replace = array(

Code: Select all

'custom_field' => $data['custom_field']

Where it says data I've also had address, order info, etc. On the print invoice page I've maganed, with the code above to have "NIF" to show after the address but nothing after that. On top of the page I get the following message
"Notice: Undefined index: custom_field in /home/elephoneeo/www/admin/controller/sale/order.php on line 2110"

I think my problem is that I don't know how to get the code to go to the table and get the value I want. I don't know how to do that.

Can any of you help me or point me in the right direction?
Thank you very much! :)

Newbie

Posts

Joined
Fri Mar 27, 2015 6:15 pm

Post by allenshea » Wed Oct 03, 2018 8:34 am

Have you solved the problem? I also need it to show on invoice. But no way to make it.

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm
Who is online

Users browsing this forum: No registered users and 18 guests