V
V
Victor2014-03-20 22:54:43
PHP
Victor, 2014-03-20 22:54:43

How to modify OpenCart controllers?

Hello.
Recently I started to deal with OpenCart and I just can’t figure out the following question: what strategy should I follow when I need to change the functionality of standard controllers? I figured out two things:
1. Use some vqMod, where you can change the code in PHP files "on the fly" using XML files. Doubtful pleasure.
2. Actually, edit the kernel files and cut to fit your needs. But what if you need to update the engine? The changes will fade away.
Or, maybe, somehow you can do without editing the source codes, limited only to templates. What do you do in such situations?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sasha, 2014-03-21
@madmages

If you need functionality that opencart doesn't provide out of the box then you don't need opencart. But if you think that you still need it, then you need the opencart core, which you already need to finish up yourself to the look that you need (and this implies that you don’t need opencart updates, unless you close critical moments, which you yourself can copy to yourself ). I myself have been working with opencart for 4 months in a row. A good developer tool, but an average store out of the box.

D
Dmitry Evgrafovich, 2014-03-21
@Tantacula

aloha.kiev.ua/Dorabotka-Opencart-Sozdaem-svoe.html - read it. There is no need to change the functionality of the kernel unless there is no other choice. It is enough to write your own class (it is possible on the basis of any existing module) and use it. It is better to use VQMod to make changes to the theme files (or the admin panel - in general, when you cannot do without changing the native files), and after the test, sew changes into the theme so as not to overload the server with unnecessary operations and not be afraid that the mods will begin to conflict with each other. friend.
In opencart, everything is done very conveniently, open some simple module, study it and you will understand everything - there is a visual code.

M
maxic, 2014-03-21
@maxic

You can "listen" to the registry and replace the called functions, but this is "aerobatics" already in programming for opencart, you need high qualifications and excellent knowledge of opencart
architecture

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question