Post by ru-lefthanded » Tue Jan 07, 2025 1:22 am

Testing OC4.0.2.3
Have copied over a version of the invoice.twig file that drives our current OC3 invoice & it's working well on OC4 - but there's a glitch.
Have used Language Editor to change extension/opencart/total/sub_total to change the checkout text from "Sub-Total" to "Sub-Total (excluding VAT)" - hoped this would also change the same text on the invoice but it hasn't :(
What file do I need to edit / what do I need to add to the invoice.twig file to change the invoice sub total text as above? - cant find any other suitable place to edit on language editor or any other file that I can edit to make this change.
Ideally would also like to add "(excluding VAT)" after the name of the shipping method on the invoice but that's not essential
Please dont say dont use it / wait for 4.1!! - for reasons too complex for here, need to move forward on the OC4 site!
Thanks in advance

New member

Posts

Joined
Tue Sep 03, 2013 3:39 am

Post by IP_CAM » Tue Jan 07, 2025 1:57 am

Well, the latest OC v.4.1.0.0 Release is already here:
https://github.com/opencart/opencart/tree/master

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by khnaz35 » Tue Jan 07, 2025 2:26 pm

You change Sub-Total to Sub-Total?

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member
Online

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by softmonke » Tue Jan 07, 2025 3:59 pm

All the order totals are stored under the "order_total" table in the database. Therefore, since you mentioned you've already changed the "Sub-Total" text, it will only affect orders that are placed after the change. Orders placed before the change will not be affected since the order total title texts are stored in the database.

You will have to update the text directly in the database for sub-total.

Perhaps you can run an SQL query like:

Code: Select all

UPDATE oc_order_total SET title = 'Sub-Total (excluding VAT)' WHERE `code` = 'sub_total'
or in PHP

Code: Select all

$this->db->query("UPDATE " . DB_PREFIX . "order_total SET title = 'Sub-Total (excluding VAT)' WHERE code = 'sub_total'");
This is assuming that your database prefix is "oc_".


khnaz35 wrote:
Tue Jan 07, 2025 2:26 pm
You change Sub-Total to Sub-Total?
I believe they mentioned that they changed it from "Sub-Total" to "Sub-Total (excluding VAT)".

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by ru-lefthanded » Tue Jan 07, 2025 7:10 pm

Thank you softmonke - solved the issue :) - have updated subject accordingly
Appreciate your prompt help

New member

Posts

Joined
Tue Sep 03, 2013 3:39 am
Who is online

Users browsing this forum: No registered users and 7 guests