Post by odiumz » Tue Jul 19, 2022 5:28 am

Hi there, I'd like to do some changes in invoice - remove some fields, move 'Surname' below 'Name', not next to it etc. Which file I should edit to do that? I've found this file - admin/view/template/sale/order_invoice.twig, but I don't see these fields there, just 'order.payment_address' and 'order.shipping_address'.
Image
Last edited by odiumz on Sun Jul 24, 2022 10:06 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Mar 24, 2017 7:01 pm

Post by paulfeakins » Tue Jul 19, 2022 6:13 pm

You should look at the controller for that view.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by straightlight » Thu Jul 21, 2022 6:43 am

OC version. Once identified from the controller, creating an event trigger would be ideal if no extensions can already provide what you're looking for from the Marketplace already.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Thu Jul 21, 2022 4:26 pm

You can set the address format for each county. System-> Localisation -> Countries. Then edit a country and change the Address Format.

It's not so easy to change the default for all countries. It's in about 10 locations in 4 files.
admin/controller/sale/order.php
catalog\controller\account\address.php
account\order.php
catalog/controller/mail/order.php

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by straightlight » Thu Jul 21, 2022 7:19 pm

The opencart-3 repository uses the new address format feature.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by odiumz » Sun Jul 24, 2022 3:03 am

straightlight wrote:
Thu Jul 21, 2022 6:43 am
OC version. Once identified from the controller, creating an event trigger would be ideal if no extensions can already provide what you're looking for from the Marketplace already.
3.0.3.6
ADD Creative wrote:
Thu Jul 21, 2022 4:26 pm
You can set the address format for each county. System-> Localisation -> Countries. Then edit a country and change the Address Format.
It's not only the address I'd like to change. I need the surname to be in new line, and use 'Address line 2' for different purpose so it should be above all the address information.

Newbie

Posts

Joined
Fri Mar 24, 2017 7:01 pm

Post by ADD Creative » Sun Jul 24, 2022 4:00 am

You should be able to change all that.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by odiumz » Sun Jul 24, 2022 10:05 pm

This actually worked out just like I needed, thank you very much!

Newbie

Posts

Joined
Fri Mar 24, 2017 7:01 pm
Who is online

Users browsing this forum: No registered users and 20 guests