Hi,
working in oc 3.0.3.2 and php 7.4.33
It's a copy of the actual website with a template called nou and several extensions, but they don't really affect this particular modification.
I'm trying to add some extra fields in the delivery address (not billing address).
I've added the first field (as a test) in the delivery address for guest checkout.
Did a test order and I can see the extra field in my database - it's an extra phone number.
So far so good.
I'm now trying to display the extra phone number in the order, in the admin but I must be missing something.
I've edited the order.php for both the controller and model. As far as I can understand the way the delivery address is displayed is from the order.php in the controller - or not?
Any idea what file exactly I have to edit in order to display the extra field in the ordeR?
working in oc 3.0.3.2 and php 7.4.33
It's a copy of the actual website with a template called nou and several extensions, but they don't really affect this particular modification.
I'm trying to add some extra fields in the delivery address (not billing address).
I've added the first field (as a test) in the delivery address for guest checkout.
Did a test order and I can see the extra field in my database - it's an extra phone number.
So far so good.
I'm now trying to display the extra phone number in the order, in the admin but I must be missing something.
I've edited the order.php for both the controller and model. As far as I can understand the way the delivery address is displayed is from the order.php in the controller - or not?
Any idea what file exactly I have to edit in order to display the extra field in the ordeR?
Last edited by vourlismenos on Thu Jul 17, 2025 3:11 pm, edited 1 time in total.
The shipping address if formatted for display as at the link below.
https://github.com/opencart/opencart/bl ... #L870-L903
https://github.com/opencart/opencart/bl ... #L870-L903
yeap.... that's the part I've edited, and still nothing.
So I probably did something wrong.... I'll check again I suppose :/
*** EDIT ***
arghhh.... got it.... It was a typo.
I'm keeping the thread open to post the complete solution, when I'm done, for anyone interested
So I probably did something wrong.... I'll check again I suppose :/
*** EDIT ***
arghhh.... got it.... It was a typo.
I'm keeping the thread open to post the complete solution, when I'm done, for anyone interested
ok the order (as a guest) works great.
The extra field is added and displayed in the orders.
My issue now, is when I try to edit the order as an admin.
The extra field is displayed in the edit order form and the entry is there.
But if I save, it disappears. Any additions are not saved in the database.
I've edited so far, admin/view/template/sale/order_Form.twig - admin/model/order/order.php - admin/controller/sale/order.php.
Any other changes are saved, just not the new field.
I've read somewhere order changes go through the front edn: catalog/controller/api/order.php and catalog/model/checkout/order.php
So I've checked these files as well. Still nothing.
Am I missing some other process or should I go look for typos again

The extra field is added and displayed in the orders.
My issue now, is when I try to edit the order as an admin.
The extra field is displayed in the edit order form and the entry is there.
But if I save, it disappears. Any additions are not saved in the database.
I've edited so far, admin/view/template/sale/order_Form.twig - admin/model/order/order.php - admin/controller/sale/order.php.
Any other changes are saved, just not the new field.
I've read somewhere order changes go through the front edn: catalog/controller/api/order.php and catalog/model/checkout/order.php
So I've checked these files as well. Still nothing.
Am I missing some other process or should I go look for typos again


Opencart supports additional fields in the order and you don't have to rummage through the files additionally. The information should display automatically. But...if you really want it on the admin side for the order details sale/order.php -> info() and sale/order_info.twig
Tworzenie sklepów internetowych | Portfolio | Cennik | O mnie
It looks like you have removed all permissions for yourself. Check the permission column in phpmyadmin in user_group.
Tworzenie sklepów internetowych | Portfolio | Cennik | O mnie
The custom fields - for the address in my case - will appear in the billing address.
I just want to display an extra phone field in the shipping address (only). I can't do that through the custom fields.
The information in order_info.twig comes from admin/controller/sale/order.php - I've already fixed that. It was typo.
I have a different issue now, when I'm trying to edit the order through the admin.
I just want to display an extra phone field in the shipping address (only). I can't do that through the custom fields.
The information in order_info.twig comes from admin/controller/sale/order.php - I've already fixed that. It was typo.
I have a different issue now, when I'm trying to edit the order through the admin.
DesignCart wrote: ↑Thu Jul 17, 2025 7:20 pmOpencart supports additional fields in the order and you don't have to rummage through the files additionally. The information should display automatically. But...if you really want it on the admin side for the order details sale/order.php -> info() and sale/order_info.twig
The shipping address is saved to the session via api/shipping/address. This then get saved via api/order/edit.
Who is online
Users browsing this forum: Baidu [Spider] and 18 guests