T
T
tester_toster2017-06-05 09:14:04
PHP
tester_toster, 2017-06-05 09:14:04

Should I use ocmod in opencart?

At work we use opencart in some projects, and the engine code can be edited using ocmod, but it just turns me out of it.
- Write via xml file
- the modifier is stored in the database
- the replacement works through regular expressions
- it is not possible to set the order of the modifiers
- it is possible that one modifier will change the code so that the second will start to give errors, and all this will need to be looked for
- there is no live debug , each time you need to re-upload the xml file, or re-upload xml for editing and verification, or edit the cache and then make changes to it by pulling out the corrected code from several files
- this is very time consuming
- the creators of the engine themselves have not yet rendered the main functionality that can be put into modifiers
- it is hard to see the whole picture of work
I really like the event system, but the creators of opencart don't think about it.
But in theory, all "true-coders" write through xml extensions, and it's more convenient for me to edit in files, since I have to make quite a lot of edits - complex changes are made that sometimes almost completely rewrite some method from the standard model (for example, a complex filter to order with a sorting system in categories), even without complex tasks in each project a lot of small functional changes are made in each project - making all these changes through ocmod is a waste of time, and each site has a unique design with unique functionality, which with the flexibility of opencart for non-standard solutions, there is no way to implement without editing the controllers and models of the opencart itself, and sometimes the kernel, otherwise the code starts to look like noodles. Example: the basket class lacks many necessary methods, there is no normal output through json, and even then,
How to proceed - to write through xml wasting time, or not to take a steam bath?
It is desirable - with arguments.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
ZardoZAntony, 2018-09-17
@ZardoZAntony

I will be brief and categorical, IMHO.
When to use ocmod:
1. The module or design will be replicated
2. You need compatibility support when updating (and that, you understand, can fall off even on a minor one). And 99% of customers never update the engine.
3. I just felt like it, because all coders on the forum do this (and they do it for the reason of point 1).
That's it, I don't see any other reason to use it.
Therefore, universal fixes for all clients in ocmod. The rest is direct editing (but we leave the comments).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question