Post by zrxraver » Mon Jul 03, 2023 7:01 pm

I wonder if there might be an "override engine" for opencart 4.

As a developer I am working on the events system and run into small things that are sometimes difficult. For example an adjustment in a twig template, now I do that with string search and replace and that works but is unnecessarily complicated.
Another example is that the before and after events fall short, it would be useful if you could also place events (=hook) halfway through the code.
I would like to do the latter with marginal changes to the source code.
I've tried vqmod for this and it works, but I think it's overkill for the little tweaks I need.
My starting point is to use the event system as much as possible, and at most very small changes in the source code itself.
So hence my question if there is an "override engine" in the works for OC4

Active Member

Posts

Joined
Fri Oct 30, 2009 5:36 am

Post by JNeuhoff » Mon Jul 03, 2023 10:10 pm

I was thinking about porting the override engine to make it work for OpenCart 4, but there hasn't been much of a demand for it. Anyway, you can use before/after event handlers for the most common controller and model methods. And it is even possible to modify the singleton library classes using decorator wrappers. So far I had no need for a VQmod-style modifications system.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by k2tec » Tue Jul 04, 2023 2:59 am

I thing this will be a faster step to jump to OC 4.x
I deliberately stayed with 3.0.x

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by zrxraver » Tue Jul 04, 2023 3:14 am

Thanks for your reply.
I hope you'll want to port the override engine to OC4, I think there's a need for that, certainly for me.

Active Member

Posts

Joined
Fri Oct 30, 2009 5:36 am

Post by d.andrian » Tue Apr 09, 2024 5:37 pm

JNeuhoff wrote:
Mon Jul 03, 2023 10:10 pm
I was thinking about porting the override engine to make it work for OpenCart 4, but there hasn't been much of a demand for it. Anyway, you can use before/after event handlers for the most common controller and model methods. And it is even possible to modify the singleton library classes using decorator wrappers. So far I had no need for a VQmod-style modifications system.
I'm really hoping that you actually develop the override engine for OC4. I would try it myself but i'm not at that level yet as a developer.

Newbie

Posts

Joined
Thu Dec 08, 2022 10:16 pm
Who is online

Users browsing this forum: No registered users and 1 guest