By creating an /after event targeting your catalog/view/theme/<your_theme>/template/account/order.twig file.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Events in OC are a pretty good idea. Just one little problem, I can't find the right documentation for example, how like this OP query can be properly fulfilled. Could you help by example? Alternatively, can you point to the proper documentation with the examples, how this event on OP request can be done. I'm little bit confused how to properly implement particular code to the php or twig files using events instead the OCMOD. I have read a lot of @straightlight posts where are a lot of good examples of the code how to...straightlight wrote: ↑Sat Jan 23, 2021 1:05 amBy creating an /after event targeting your catalog/view/theme/<your_theme>/template/account/order.twig file.
I hope, that can help for others also.
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
If you need two controller files for each event...then you need a bunch of controller files for more events.
That's what I understood from here
https://stackoverflow.com/questions/517 ... -twig-file
Or, simply use the $this->load->controller to simplify the task when it comes to several controllers.xxvirusxx wrote: ↑Sat Jan 23, 2021 8:11 pmI thinks events are good for complex extensions/module and not just to find and replace something easy.
If you need two controller files for each event...then you need a bunch of controller files for more events.
That's what I understood from here
https://stackoverflow.com/questions/517 ... -twig-file
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Agreexxvirusxx wrote: ↑Sat Jan 23, 2021 8:11 pmI thinks events are good for complex extensions/module and not just to find and replace something easy.
If you need two controller files for each event...then you need a bunch of controller files for more events.
That's what I understood from here
https://stackoverflow.com/questions/517 ... -twig-file
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here

And if the OP don't like ocmod version can pay a developer for event version

LE. Admin controller should be like this
Code: Select all
<?php
class ControllerExtensionModuleSkuCustomer extends Controller {
public function install(){
$this->load->model('setting/event');
$this->model_setting_event->addEvent('sku_customer', ' catalog/view/theme/default/template/account/order/after', 'extension/module/sku_customer/showSkuCustomer');
}
public function uninstall(){
$this->load->model('setting/event');
$this->model_setting_event->deleteEventByCode('sku_customer');
}
}

So in the end to show SKU on customer order_info you need 3 files: admin controller, admin language, catalog controller.
The research that is already built-in would be in the catalog/controller/extension/advertise/google.php with the most details on how to use an /after event .xxvirusxx wrote: ↑Sat Jan 23, 2021 10:33 pmFor that, @straightlight can make the event version
And if the OP don't like ocmod version can pay a developer for event version
LE. Admin controller should be like thisFor catalog controller I need more researchCode: Select all
<?php class ControllerExtensionModuleSkuCustomer extends Controller { public function install(){ $this->load->model('setting/event'); $this->model_setting_event->addEvent('sku_customer', ' catalog/view/theme/default/template/account/order/after', 'extension/module/sku_customer/showSkuCustomer'); } public function uninstall(){ $this->load->model('setting/event'); $this->model_setting_event->deleteEventByCode('sku_customer'); } }
So in the end to show SKU on customer order_info you need 3 files: admin controller, admin language, catalog controller.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Tks for info.straightlight wrote: ↑Sat Jan 23, 2021 11:23 pmThe research that is already built-in would be in the catalog/controller/extension/advertise/google.php with the most details on how to use an /after event .
I am looking now.
Events again?!!!straightlight wrote: ↑Sat Jan 23, 2021 1:05 amBy creating an /after event targeting your catalog/view/theme/<your_theme>/template/account/order.twig file.
I guess sometimes when you're holding a hammer, everything looks like a nail

As others have said, OCMOD is best for this.
For quick, professional OpenCart support please email info@antropy.co.uk
That's also probably why OCMod has been removed from the master branch Paul.paulfeakins wrote: ↑Mon Jan 25, 2021 7:34 pmEvents again?!!!straightlight wrote: ↑Sat Jan 23, 2021 1:05 amBy creating an /after event targeting your catalog/view/theme/<your_theme>/template/account/order.twig file.
I guess sometimes when you're holding a hammer, everything looks like a nail![]()
As others have said, OCMOD is best for this.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
And in this way about 70% or maybe 90% of the modules will be flushed to the toilet, or they will have to be radically remadestraightlight wrote: ↑Tue Jan 26, 2021 9:49 pmThat's also probably why OCMod has been removed from the master branch Paul.paulfeakins wrote: ↑Mon Jan 25, 2021 7:34 pmEvents again?!!!straightlight wrote: ↑Sat Jan 23, 2021 1:05 amBy creating an /after event targeting your catalog/view/theme/<your_theme>/template/account/order.twig file.
I guess sometimes when you're holding a hammer, everything looks like a nail![]()
As others have said, OCMOD is best for this.
Please correct me if I'm wrong...
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
If not re-implemented, of course, that's exactly what's gonna happen as there are no correction to be made about this observation.kestas wrote: ↑Wed Jan 27, 2021 4:51 pmAnd in this way about 70% or maybe 90% of the modules will be flushed to the toilet, or they will have to be radically remadestraightlight wrote: ↑Tue Jan 26, 2021 9:49 pmThat's also probably why OCMod has been removed from the master branch Paul.paulfeakins wrote: ↑Mon Jan 25, 2021 7:34 pm
Events again?!!!
I guess sometimes when you're holding a hammer, everything looks like a nail![]()
As others have said, OCMOD is best for this.
Please correct me if I'm wrong...
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 13 guests