Should we bring OCMOD back? #12531
Replies: 37 comments 78 replies
-
yes is it the same idea as vqmod? |
Beta Was this translation helpful? Give feedback.
-
Yes, that would be awesome!! Because you can't do everything with just events. And it's so time-consuming to do debugging via events. |
Beta Was this translation helpful? Give feedback.
-
@danielkerr Events/modifications system definitely requires an upgrade. |
Beta Was this translation helpful? Give feedback.
-
I'm very new to OpenCart. This ocmod/vqmod techology is strange to me. Why people just not using diff + patch if core file change is needed ? |
Beta Was this translation helpful? Give feedback.
-
Ocmod must be in Opencart |
Beta Was this translation helpful? Give feedback.
-
No to OCMOD! But what's needed are more event triggers, especially for singleton library classes (cart, customer, currency, etc), and also for the loader class. For example, when a library class is loaded (instantiated) have an event trigger there which could also load subsequent decorator classes wrapping up the library class instance, containing some modifications for the methods. |
Beta Was this translation helpful? Give feedback.
-
I need to add some fields to my template like sku or ean |
Beta Was this translation helpful? Give feedback.
-
And this requires another DB query for each product to get the EAN? What happens if there are several modules here? Each module will create an additional DB query? |
Beta Was this translation helpful? Give feedback.
-
2 modules will be able to make changes to the template? |
Beta Was this translation helpful? Give feedback.
-
For all those (like me) fully unfamiliar with events, OcMod would/could be an easy Solution to all those fellows, eager to participate, but yet unable, to actively participate. |
Beta Was this translation helpful? Give feedback.
-
Yes, I am 100% in favor of returning OCMOD or a similar tool to Opencart 4 and all future versions. I find the idea interesting, but it would be necessary to analyze what would be the real improvement vs OCMOD traditional. Perhaps what is needed to improve OCMOD is having a native editor and that the theme editor works together with OCMOD and not disabling it. I made this topic a long time ago asking to keep OCMOD in Opencart 4 and it contains many reasons for this: #10883 The vQmod will come back strong in Opencart 4, that's why I think it's better to have native OCMOD or something like that in Opencart 4, even to maintain the biggest differential in the development that Opencart has vs other E-commerce platforms and that make it unique and higher. |
Beta Was this translation helpful? Give feedback.
-
What is one of the most outstanding and powerful tools in OC? OCMOD! I could understand Daniel's decision not to integrate OCMOD in its old form into OC4, but I still believe it was and continues to be a mistake. Which other shop system offers such a brilliant tool where you can customize your things at lightning speed with just one single tool as you need it? As far as I know, no other shopping system does. So why not retain an absolute usp? |
Beta Was this translation helpful? Give feedback.
-
fine. this is my todo list. release asap because of length since last one has been a while |
Beta Was this translation helpful? Give feedback.
-
OСMOD, there is a list of instructions for changes.
|
Beta Was this translation helpful? Give feedback.
-
100% as doing some things with events is incredibly difficult and sometimes almost impossible. |
Beta Was this translation helpful? Give feedback.
-
Really wondering why you have remove it at first place ! So needed tool !!! Finally concentrate to 4.x and clean all the bugs , bring back OCMOD and make it STABLE!!! Finally !! |
Beta Was this translation helpful? Give feedback.
-
ok ocmod is finished being added back. please test. |
Beta Was this translation helpful? Give feedback.
-
I removed it because it doesn't exist in any programming paradigm. although it might make sense writing to the extension directory |
Beta Was this translation helpful? Give feedback.
-
I still don't understand why people are so desperate for using the OCmod way of modifying core files. I hardly ever had a need for it. Using events, and on occasion the decorator design pattern was more than sufficient for me, even for more complicated extensions. |
Beta Was this translation helpful? Give feedback.
-
Well, most of our extensions haven't even been published yet on the OpenCart market place, but were ported to newer OpenCart versions nevertheless. On some of our customers' websites there are between 50 to 100 extensions, some of them quite complex, at times modifying the same OpenCart library class several times over. Proper event handlers, and decorators with object-oriented extensions are more robust than OCmod-based modifications IMHO. Interestingly enough, the latest master branch of OpenCart now has a proper factory class, something I had suggested ages ago, and which will make things easier. I still wish that OpenCart would use correct namespaces based on directory paths for extensions, as is the case with other programming languages. And OpenCart would still need a more robust extensions mechanism, including upgrade features. |
Beta Was this translation helpful? Give feedback.
-
Hello, please, what is the state of ocmod in the master branch, is it fully functional or are errors being fixed? |
Beta Was this translation helpful? Give feedback.
-
shou8ld be ready. i need to go through all the issues once i finish what im currently doing |
Beta Was this translation helpful? Give feedback.
-
I'm trying - as designed - to change core files as little as possible. We had a problem when prior developers used joomla early on and modified it extensively. The system can't be updated to newer versions of joomla (or at least would require as much work as starting from scratch - which is what I'm looking to do with something like opencart) But.... There are still some instances -- that are the fault of opencart developers -- as to why modifying core files with a modification system is still useful. Namely the lack of PSR compliance (or at least standardized php autoloading) through the use of the 'registry' of magic methods. The code becomes un-traceable in most IDEs and autofill suggestions don't work. Now with new AI autofill suggestions, this is becoming a much bigger thing. With some toying around, I found that some simple php @Property lines can handle a lot of the magic method obfuscation rather nicely for software like phpstorm and others. It's built into PHP, rather standardized and easy to use. (as in WHY AREN'T THE DEVS AT OPENCART USING IT!?!?!?) If opencart is going to insist on ignoring open standards for coding php and use their own proprietary magic-method registry, and if opencart is going to set up ways to use either events or third party addons like vqmod to change content on-the-fly, then they need to have some way to let developers that do use coding standards and the IDEs used by more than 90% of the php developer community. ( Which editor / IDE do you mostly use for PHP development? ) to make up for their shortcomings and 'fix' what they broke with their method of handling autoloading. |
Beta Was this translation helpful? Give feedback.
-
The OpenCart registry consists of only one instance, being referenced from different places and classes. It is an associative array of mostly singleton instances, such as cart, user, etc. |
Beta Was this translation helpful? Give feedback.
-
oh cool, then that explains the use of the registry and is smart. but why break psr4 and why not use the standard autoloading methodologies? |
Beta Was this translation helpful? Give feedback.
-
ocmod using database storage for xml was terrible to develop for, no source control and had to interface with the db to code live, i love vqmod |
Beta Was this translation helpful? Give feedback.
-
fine. we can have a ocmod xml folder and have the db just link to the files. |
Beta Was this translation helpful? Give feedback.
-
also the logging output was very difficult to use |
Beta Was this translation helpful? Give feedback.
-
also i did think the event idea was a good idea, and had its place, i just havent gotten around to learning about it yet |
Beta Was this translation helpful? Give feedback.
-
something that might be useful would be if in the admin panel for each xml/mod it gave a list of modified files and lines, and could even detect if different mods edit the same lines to warn of potential conflict |
Beta Was this translation helpful? Give feedback.
-
I can create a new type of ocmod that uses the generate files and keep them in the extension folder and then use events to override the the original files.
please let me know if its worth doing?
Beta Was this translation helpful? Give feedback.
All reactions