Categories

vQmod

Дарья Миронова September 4, 2015
No votes yet.
Please wait...

vQmod (Virtual Quick Mod) is used to avoid changes in core files. We can make a separate XML file for this. In xml file we write a search/replace script. These script files are parsed on page load. The script code in xml is added to our core file code and stored on temp file. The temp file is executed as main file. Our original code is kept untouched. So we can get results with our new script without making any changes in core file.

vQmod is designed to work with any platform. It was initially designed in php using the OpenCart project, but it is not limited to OpenCart, nor is the concept limited to php. The class was designed to be generic enough to work with any platform. vQmod works on an assumption that the index.php calls other controller files to load the includes, or does the includes itself. This is aimed at controller based designs (MVC, CRUD, etc). vQmod is working on expanding from OpenCart to other platforms (phpbb, cmsmadesimple, etc).

Instead of making changes to the core files directly, the changes are created as xml search/replace script files. These script files are parsed during page load as each "source" core file is loaded with the "include" or "require" php functions. The source is then patched with the script file changes, and saved to a temp file. That temp file is then substituted for the original during execution. The original source file is never altered. This results in a "virtual" change to the core during execution without any actual modification to the core files.

The source is then cloned to a temp file and modifications read from an external script file are made to that temp file. The temp file is then substituted for the real file in the include path. Now the modification is in place while the original file has not actually been altered. Remove the script file and the original source is loaded.

Instead of modifying actual files to add custom modifications, source files are parsed "on-the-fly" right before any of the follow functions are called:

The source is then cloned to a temp file and modifications read from an external script file are made to that temp file. The temp file is then substituted for the real file in the include path. Now the modification is in place while the original file has not actually been altered. Remove the script file and the original source is loaded.

vQmod relies on a controller based system that has a series of files that are linked and extended. There are some files that cannot be used with vQmod:

  1. index.php – Since this is the main file of the site, it has to load vQmod first for it to work on other pages. So you can’t put the cart in front of the horse.

  2. Standalone files – Files that are just standalone and don’t extend or have no hierarchy will not work with vQmod. vQmod works by intercepting the "include" functions. So if file isn’t being included or required, then it cannot be vQmodded.

  3. css & js files – These files are rendered at the browser level, not at the server level, so vQmod has no effect on them.

Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

Comments are closed.