I have taken over a site that has around 20 VQMOD running and about another 10 OCMOD inside the system folder.
From some comments I read on another thread, placing the OCMOD inside the system folder makes it run in debug mode. This alters the execution order somehow and generates some output to a log file.
I had a look at the log file and don't fully understand it but get the gist that it is showing me what is being modified.
There are a ton of small bugs on the site and some mods just not working. From what I can see my predecessor had made fixes direct to the cache files. The OCMODS do not have a VQMOD version and most of the VQMODs are undocumented custom code (most without any description whatsoever).
I need some advice on how to approach this project.
I also have a few specific questions, if you can help me with any of them I would be grateful:
1. What happens when VQMOD & OCMOD both want to modify the same file?
2. Can this many VQMOD & OCMOD exist together and work properly or do I need to convert all the VQMOD to OCMOD?
3. Is there any articles or documentation that cover debugging ocmod/vqmod conflicts?
Many thanks. Your guidance is greatly appreciated.
From some comments I read on another thread, placing the OCMOD inside the system folder makes it run in debug mode. This alters the execution order somehow and generates some output to a log file.
I had a look at the log file and don't fully understand it but get the gist that it is showing me what is being modified.
There are a ton of small bugs on the site and some mods just not working. From what I can see my predecessor had made fixes direct to the cache files. The OCMODS do not have a VQMOD version and most of the VQMODs are undocumented custom code (most without any description whatsoever).
I need some advice on how to approach this project.
I also have a few specific questions, if you can help me with any of them I would be grateful:
1. What happens when VQMOD & OCMOD both want to modify the same file?
2. Can this many VQMOD & OCMOD exist together and work properly or do I need to convert all the VQMOD to OCMOD?
3. Is there any articles or documentation that cover debugging ocmod/vqmod conflicts?
Many thanks. Your guidance is greatly appreciated.
What happens when VQMOD & OCMOD both want to modify the same file
It's not the File, it's the File Content, what makes the difference. And if a Line in a file exists, serving as
ANCHOR / TAG for an OcMod/VqMod Extension, to hack into the Action, by example:
<search><![CDATA[if (isset($this->request->post['keyword'])) {]]></search>
and if such a Line has been changed/modified, by a FIRST interacting Extension, this Line may no longer be
found, in it's exact writing, when the second VqMod is called, to do it's Job within the same File.
But then, the second VqMOD would just not function.
Still, it possibly could, if it's Filename is changed, by example, from vqmod_do_something.xml to:
do-something.vqmod.xml , because the D comes before the V, when a system is searching
trough the range of VqMods. Especially, if one of them both ONLY USES this ANCHOR, to ADD something,
either below or above the SOURCE CODE ANCHOR LINE or CONTENT, and thereby does not CHANGE
this Anchor Content Line itself.
OcMod's work 'basically' the same, but OcMod's are NOT placed, as file, in a COMMON Subdirectory,
but placed into the DB, as OcMod File Content. And combined with OC Source Files, related, their
CHANGES exist, in the FINAL OUTPUT Cache Files, within their originally declared Subs the Modification
Section, just about, as final Output VqMod Files exist in the VqCache Section, but all together, and the
Place, where they interacted, is part of their Filename, to enable to Server, to make 'em work them in
the right Place as File, by example:
vq2-admin_controller_catalog_attribute.php
vq2-catalog_controller_account_account.php
So, on a real System, if one uses OcMod and VqMod, at first, the OcMod Output Section Files are created,
and then, by USE of those files and the VqMod FIles related, the really FINAL VqMod Output Files are created.
Basically at least, because, since the famous INTEGRATED VQMOD for OC-2 exists, everything has changed
a little again. TO THE BETTER, to admit, because NOW, even the VqMod Content/Changes will be saved in
the MODIFICATION Section final output Files, and this will speed up the entire procedure, in a much more
professional way., because it was actually just a time-consuming task, to have 2 OUTPUT Templates, and so
just repeat, was already has been done...
Just to give you a very short and basic explanation. If you want to handle such in a proper way, you either need
to learn about, or then get someone, already famliar with such.
Good Luck
Ernie
---
a few of a whole range of infos, and a search engine exists, called GOOGLE, to find all kinds of things!
viewtopic.php?f=183&t=156866
https://multimerch.com/blog/modifying-o ... -vs-ocmod/
viewtopic.php?f=183&t=165175
viewtopic.php?f=190&t=143242
viewtopic.php?f=24&t=131995
viewtopic.php?f=22&t=128115#p506639
https://github.com/search?utf8=%E2%9C%93&q=VqMod
http://cartadvisor.com/blog/2013/04/24/ ... qmod-file/
http://www.opencart.com/index.php?route ... n_id=19501
It's not the File, it's the File Content, what makes the difference. And if a Line in a file exists, serving as
ANCHOR / TAG for an OcMod/VqMod Extension, to hack into the Action, by example:
<search><![CDATA[if (isset($this->request->post['keyword'])) {]]></search>
and if such a Line has been changed/modified, by a FIRST interacting Extension, this Line may no longer be
found, in it's exact writing, when the second VqMod is called, to do it's Job within the same File.
But then, the second VqMOD would just not function.
Still, it possibly could, if it's Filename is changed, by example, from vqmod_do_something.xml to:
do-something.vqmod.xml , because the D comes before the V, when a system is searching
trough the range of VqMods. Especially, if one of them both ONLY USES this ANCHOR, to ADD something,
either below or above the SOURCE CODE ANCHOR LINE or CONTENT, and thereby does not CHANGE
this Anchor Content Line itself.
OcMod's work 'basically' the same, but OcMod's are NOT placed, as file, in a COMMON Subdirectory,
but placed into the DB, as OcMod File Content. And combined with OC Source Files, related, their
CHANGES exist, in the FINAL OUTPUT Cache Files, within their originally declared Subs the Modification
Section, just about, as final Output VqMod Files exist in the VqCache Section, but all together, and the
Place, where they interacted, is part of their Filename, to enable to Server, to make 'em work them in
the right Place as File, by example:
vq2-admin_controller_catalog_attribute.php
vq2-catalog_controller_account_account.php
So, on a real System, if one uses OcMod and VqMod, at first, the OcMod Output Section Files are created,
and then, by USE of those files and the VqMod FIles related, the really FINAL VqMod Output Files are created.
Basically at least, because, since the famous INTEGRATED VQMOD for OC-2 exists, everything has changed
a little again. TO THE BETTER, to admit, because NOW, even the VqMod Content/Changes will be saved in
the MODIFICATION Section final output Files, and this will speed up the entire procedure, in a much more
professional way., because it was actually just a time-consuming task, to have 2 OUTPUT Templates, and so
just repeat, was already has been done...
Just to give you a very short and basic explanation. If you want to handle such in a proper way, you either need
to learn about, or then get someone, already famliar with such.
Good Luck

Ernie
---
a few of a whole range of infos, and a search engine exists, called GOOGLE, to find all kinds of things!

viewtopic.php?f=183&t=156866
https://multimerch.com/blog/modifying-o ... -vs-ocmod/
viewtopic.php?f=183&t=165175
viewtopic.php?f=190&t=143242
viewtopic.php?f=24&t=131995
viewtopic.php?f=22&t=128115#p506639
https://github.com/search?utf8=%E2%9C%93&q=VqMod
http://cartadvisor.com/blog/2013/04/24/ ... qmod-file/
http://www.opencart.com/index.php?route ... n_id=19501
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Ernie,
That was an amazing reply, thank you!
So from what you said my understanding is that the OCMOD process runs first and creates file in system cache. Then the VQMOD process runs and will use the cached OCMOD file and then create the VQMOD cache file.
So during execution OpenCart checks VQMOD cache first, if a VQMOD cache file doesn't exist then it checks the OCMOD cache file, if that doesn't exist then it uses vanilla core file. VQMOD > OCMOD > Vanilla.
So really OCMOD & VQMOD can run fine together as long as the hook for the regex is not altered and there are no other conflicts with actual code modifications. And I can simplify the process of having to check two caches to see which file is being used by using the mdification extension you linked me to.
Did I understand that correctly?
Also, how does the OCMOD inside system folder work? I read it alters execution order but in what way?
I am trying to step through the code on a file that is being modified in several places and I am getting lost as so many files are being executed. I see the modification being made but by the final render it has disappeared.
Is there any good methodical approach to take for debugging conflicts?
Again, many thanks for your reply, I searched a lot in documentation and couldn't find the answers I needed.
That was an amazing reply, thank you!
So from what you said my understanding is that the OCMOD process runs first and creates file in system cache. Then the VQMOD process runs and will use the cached OCMOD file and then create the VQMOD cache file.
So during execution OpenCart checks VQMOD cache first, if a VQMOD cache file doesn't exist then it checks the OCMOD cache file, if that doesn't exist then it uses vanilla core file. VQMOD > OCMOD > Vanilla.
So really OCMOD & VQMOD can run fine together as long as the hook for the regex is not altered and there are no other conflicts with actual code modifications. And I can simplify the process of having to check two caches to see which file is being used by using the mdification extension you linked me to.
Did I understand that correctly?
Also, how does the OCMOD inside system folder work? I read it alters execution order but in what way?
I am trying to step through the code on a file that is being modified in several places and I am getting lost as so many files are being executed. I see the modification being made but by the final render it has disappeared.
Is there any good methodical approach to take for debugging conflicts?
Again, many thanks for your reply, I searched a lot in documentation and couldn't find the answers I needed.
well, to debug a system, several Tools exis, like this one, mentioned here:
viewtopic.php?f=190&t=172847
Or then, some VqModerators, VqMod Editors, VqMod Manager and so on,
exist, and in V.2, you have an OcMod Modification Log by default, where you can check and see,
if and where and NOT FOUND or ERROR messages exist.
In the shop/vqmod/logs/... Section is also an error log file, if one exists, because of some errors.
But without an known OC Version, anything is hard to guess...
Ernie
PS: Those Tools are mentioned on some of the Postings, linked on my first Post.
There is no shortcut, and no hurry, you won't be in time anyway...
viewtopic.php?f=190&t=172847
Or then, some VqModerators, VqMod Editors, VqMod Manager and so on,
exist, and in V.2, you have an OcMod Modification Log by default, where you can check and see,
if and where and NOT FOUND or ERROR messages exist.
In the shop/vqmod/logs/... Section is also an error log file, if one exists, because of some errors.
But without an known OC Version, anything is hard to guess...

Ernie
PS: Those Tools are mentioned on some of the Postings, linked on my first Post.
There is no shortcut, and no hurry, you won't be in time anyway...

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
By having an understanding client and charging hourly for your time I suspect!devguy wrote:I need some advice on how to approach this project.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Legendary Member
Who is online
Users browsing this forum: No registered users and 14 guests