Post by kombi » Sun Apr 12, 2015 1:02 am

While trying to get up to speed on the two different ways to add code changes to OPENCART. One being VQMOD and the other the new OCMOD. I did not find a lot of information on how OCMOD worked on the backend only the front GUI. Lots of information on VQMOD since it been around so long and vetted. So I want to share what I found out so you may not be in the same learning curve boat as I was. I am not going into how to install etc. Just basic file locations. "Share IT Knowledge"

Now for others who might get stuck after doing conflicting coding or uploading conflicting extensions via OCmod or VQMOD here is where the files livea in case you need to do a backend fix when the GUI is not available.

OCMOD Backend Locations
XML are stored in your OC database under the `oc_modification` table
Auto generated cache files are all in /system/modification folder.

VQMOD Backend Locations
when loaded the vqmod app creates a folder call /vqmod off root folder of your site.
XML are stored in /vqmod/xml
Auto generated cache files are all in /vqmod/vqcache



Great Extension that allows you not have to use FTP via the OCMOD GUI.
http://www.opencart.com/index.php?route ... load_id=37

I hope this helps some one...
Last edited by kombi on Sun Apr 12, 2015 1:24 am, edited 3 times in total.

New member

Posts

Joined
Thu Sep 06, 2012 5:03 am

Post by yodapt » Sun Apr 12, 2015 1:05 am

OCMod changes can be quicly tested if you place the xml file on the root of system folder, without undergoing the pain of reuploading the file and refreshing cache.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by kombi » Sun Apr 12, 2015 1:06 am

Thanks ... That is great to know!

New member

Posts

Joined
Thu Sep 06, 2012 5:03 am

Post by IP_CAM » Sun Apr 12, 2015 2:11 am

>> I hope this helps some one... <<
it really does, it saves time, whenever I need it to know! ;)
tks, Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kombi » Mon Apr 13, 2015 1:02 am

I prefer to help other developers who make extensions as well. I have seen too many awards and endorsements that seemed one sided. Much like the music awards in the states very one sided. So bottom line use any of them pick who you want to support. I thank you as well for all the great work you have done. Below just a few there a few more out their


OCMOD FTP FIX

karapuz
http://www.opencart.com/index.php?route ... load_id=37

iSense
http://www.opencart.com/index.php?route ... n_id=18892


OCMOD XML editors

Cl!cker
http://www.opencart.com/index.php?route ... cmod%20fix

iSense
http://www.opencart.com/index.php?route ... cmod%20fix

New member

Posts

Joined
Thu Sep 06, 2012 5:03 am

Post by michael2820 » Wed Dec 28, 2016 5:05 am

kombi wrote: OCMOD Backend Locations
XML are stored in your OC database under the `oc_modification` table
Auto generated cache files are all in /system/modification folder.

VQMOD Backend Locations
when loaded the vqmod app creates a folder call /vqmod off root folder of your site.
XML are stored in /vqmod/xml
Auto generated cache files are all in /vqmod/vqcache
Just what I was looking for, great, thanks

--- please reply only with verified data, that is: no 'I think', 'maybe' etc. ---


User avatar
Active Member

Posts

Joined
Sun May 15, 2011 8:16 pm
Location - Denmark ver. 2.1.0.2

Post by IP_CAM » Wed Dec 28, 2016 8:26 am

And just to complete this Topic, by use of the genious integrated VqMod, VqMod's can be installed like OcMod's, by Use of the Admin Extension Installer, then, the content of a VqMod is added to the DB the exactly same way as OcMod's.
---
But to make 'em work as regular VqMod, they could then either be placed in the
vqmod/xml/...
Sub, according to the Mod-Creator, or then, in the
system/... Sub, as shown on some images below.
I put the files into the
System/...
Sub, and not yet tried to leave/place 'em in the
VqMod/XML/...
Sub, just to mention this.
---
But in contrary to the 'regular' OC VqMod-System, the
vqmod/vqcache/...
Section seems not longer to be used, but VqMod-initiated Code-Changes
are seemengly made directly in/on the
system/storage/modification/.....
placed OcMod - generated Cached Output Page Files.
---
Sounds complicated ? Not really, just a little different from what we knew before. But if it works, as I think to understand, OC will be more efficient, because only one SET of Output-Files exist, and VqMod does not come last, like in the old vqmodded way, thereby creating another last 'final' Set of Output Files too. :D
---
Integrated VQmod for OpenCart 2
https://www.opencart.com/index.php?rout ... n_id=19501
---
Please note, VqMod's have to be retitled in most cases, in order contain the word .vqmod, like:
admin_ckeditor.vqmod.xml
in order to function with the integrated VqMod System.
---
And if they are CODED internally like OcMod's, integrated VqMod is able to handle them as well, as long as they also contain some VqMod-usable ID HEADER Content.
---
If such VqMod's are uploaded by use of the Admin OcMod Installer, it's believed, that they need to contain an individual
<name><![CDATA[Ernie - IP_CAM]]></name>
and
<code><![CDATA[move_product_title]]></code>
like HEADER LINE, to work.
---
Good Luck ! ;)
Ernie
PS: This Information may not be correct in FULL, it just, what I found out about, so far... :D

Attachments

add_additional_options_dr_mod.jpg

add_additional_options_dr_mod.jpg (77.21 KiB) Viewed 17991 times

vqmod_database_content.jpg

vqmod_database_content.jpg (88.71 KiB) Viewed 17991 times

Last edited by IP_CAM on Wed Dec 28, 2016 9:01 am, edited 2 times in total.

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by thekrotek » Wed Dec 28, 2016 9:00 am

I really, really, really, like the most developers I know, hate OCMod and think, that it has only added more problems rather then solved them. Previously we had just a VQMod and everybody was happy about it. Now we have:

- OCMod, which is a weaker and slightly modified version of VQMod, despised by most;
- official (old) VQmod, which works as we used to in OC 1.5;
- integrated VQMod, which combines OCMod and VQmod.

Why or why OpenCart should have THAT complicated installation procedure?

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by IP_CAM » Wed Dec 28, 2016 9:20 am

Well, our Master of the OC Universe decided on this, probably, to keep ALL RIGHTS, and so all options, to do with, whatever he likes. It's fully understandable, from the Business Point of View, I would have been acting in a similar way, thinking about the Future... ;)

Still, in contrary to other Stuff, like Openbay, or Amazon, OcMod is NOT a system-relevant Implementation, it can be switched off anytime, without doing any harm to anything else. This makes it easy for someone, to switch it off, not willing to have it as active Part of the System.

The MAIN Problem was, that OC-2, by default, was required to USE both Sampling/Caching Systems, if someone installed VqMod as well, but by use of the integrated VqMod, (also by use of the 'regular' VqMod v.2.6.x) even that is a no longer existing Problem, as it looks, one now may even use OcMod's as VqMods, by rewriting title names, like i.E.:
admin_ckeditor.ocmod.xml
to
admin_ckeditor.vqmod.xml
and upload/use (not by the installer) them as VqMod without any problems as well.

So, we still have the free choice ! :D
Ernie
------
Image

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by JNeuhoff » Wed Dec 28, 2016 7:01 pm

IP_CAM wrote: Please note, VqMod's have to be retitled in most cases, in order contain the word .vqmod, like:
admin_ckeditor.vqmod.xml
in order to function with the integrated VqMod System.
Just to clarify the file name extensions expected by the Integrated VQmod for individual XML files:

It's one of

system/*.ocmod.xml (for OCmod XML files)
system/*.vqmod.xml (for VQmod XML files)
vqmod/xml/*.xml (for VQmod XML files)

when uploaded via FTP to above mentioned folders.

And it's one of

*.ocmod.xml
*.vqmod.xml

when uploaded via the OpenCart extension installer to the database.

Also, don't use mixed uppercase/lowercase letters for folder names, NTFS (used by Windows) may be case-insensitive for read access, EXT3/EXT4 (used by Linux) isn't!

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Wed Dec 28, 2016 7:16 pm

thekrotek wrote: Why or why OpenCart should have THAT complicated installation procedure?
This all arose from the need for many 3rd party extensions to modify some of the OpenCart core controller, model, language, or template files.

In OpenCart 1.5.x the only way to do that was via Qphoria's original VQmod.

When OpenCart 2.x was released, it came with it's own built-in OCmod which was considered insufficient by many extension developers. Hence, the Integrated VQmod was created which combines VQmod and OCmod for OpenCart 2.x. Some time later, Qphoria's/Jay's VQmod was ported to OpenCart 2.x, too.

As regards modifying OpenCart core files, there are 4 basic ways to do that:
OCmod
VQmod
Override Engine
Events

I strongly recommend using Events or the Override Engine for modifying OpenCart core behaviour. Not all modifications can be done via Events, but from my experience in OpenCart 2.2.0.0 or later, about 50% of modifications could be written as OpenCart Events.

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by thekrotek » Thu Dec 29, 2016 3:26 am

JNeuhoff wrote:This all arose from the need for many 3rd party extensions to modify some of the OpenCart core controller, model, language, or template files. In OpenCart 1.5.x the only way to do that was via Qphoria's original VQmod.
I, of course, know the whole story. Still doesn't explain, why we STILL have the complex installation procedure. If would be much wiser to integrate your VQMod parser in OC engine. It would save tons of time and efforts for most customers. People often confused about installation process due to this "diversity" in installation methods.
JNeuhoff wrote:I strongly recommend using Events or the Override Engine for modifying OpenCart core behaviour. Not all modifications can be done via Events, but from my experience in OpenCart 2.2.0.0 or later, about 50% of modifications could be written as OpenCart Events.
I discovered OpenCart much more later, than Joomla, and later on I also discovered WordPress. For me OC events system is almost non-existent comparing to Joomla, let alone WordPress with its almost perfect action/filter hooks. Due to this I personally avoid OC events - too limited for my taste. Yet I extensively use events/actions/filters in Joomla and WordPress.

And I don't even want to mention, that event/action/filter system requires strong support and backward compatibility, which never even existed in OpenCart. WordPress still have some super old filter supported, even if they're just duplicates of new ones. Joomla changed some plugin events ONCE, when moved to 3.0! So thank you, but until this part is improved I will not use events myself. There's no guarantee, that in 2.5 they will not be completely replaced with "oc_filters" or even removed completely.

In my opinion VQMod is super great tool. It should've been integrated in OC 2.0 from the start instead of OCMod, which nobody likes anyway. Why invent the bicycle?

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by IP_CAM » Thu Dec 29, 2016 10:32 am

Why invent the bicycle?
because, frequent re-inventions revive the Market and so the Business. I know well, a former certified 2-wheel Mechanic, after the Mountain Bike Trend was 'born', the entire branch started to reflourish again, after a good decade of plain stagnation! I sold thousands... :D

It's a free choice market around OC, nothing more, Open Source, as it is called, so, why not just let the market decide ? And it would make very little sense, to 'present' a GIFT to Shop Users, all built-in, ready to start getting rich quick, without any idea, or clue, how something works.
One needs to learn, to at least basically understand Windows, even the cheapest Smart Phone, and one should learn to know a little about OC. And those, unwilling or unable to, just need to get a PRO. This is the way, it should work, exactly as it does in real Life, or then, every brainless Frog could eventually do, for what others invested a lot of time and brain. But this is strictly my personal opinion, the real market will select anyway... :laugh:
---
But to possibly make real OC2 Life at least a little easier for you, last night, I modified a nice little free OcMod, to also work with my Custom Test OC v.2.2.6. So, I at least have ONE PLACE, to see all my Errors, instead of switching into different places, to have them all. It will also show VqMod installations+Errors, at least, if used in combination with the integrated VqMod Extension, but I cannot test it in any other way or version... :D
I basically only changed in the DB Lines from SSL to TRUE, as I recall, to work with my Custom Multiseller Test OC v.2.2.6!
---
Take it as a little Gift, to calm down, there is nothing, we can do about, but take it or leave! :D
Ernie
---
Source used:
View all error logs on error logs Page, OCmod, free, OC v.2.0.0.0 - 2.0.2.0
https://www.opencart.com/index.php?rout ... n_id=22053
---
All error logs on one Page, OcMod, free, Modified Version for OC v.2.2.x
Filename: error_log_all_logs.ocmod.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name><![CDATA[Error log all logs]]></name>
<version><![CDATA[1.2.2 - OC_2.2.x]]></version>
<author><![CDATA[Quality Works - IP_CAM]]></author>
<code><![CDATA[oc22x_all_error_log]]></code>

<file path="admin/controller/tool/error_log.php">
<operation error="log">
<search><![CDATA[$file = DIR_LOGS . $this->config->get('config_error_filename');]]></search>
<add position="replace"><![CDATA[
	if (isset($this->request->get['log'])) {
		$file = DIR_LOGS . $this->request->get['log'];
		$data['selected'] = $this->request->get['log'];
		} else {
		$file = DIR_LOGS . $this->config->get('config_error_filename');
		$data['selected'] = $this->config->get('config_error_filename');
	}
]]></add>
</operation> 

<operation error="log">
<search><![CDATA[$data['text_confirm'] = $this->language->get('text_confirm');]]></search>
<add position="after"><![CDATA[
		$data['entry_log'] = $this->language->get('entry_log');
]]></add>
</operation> 

<operation error="log">
<search><![CDATA[$data['clear'] = $this->url->link('tool/error_log/clear', 'token=' . $this->session->data['token'], true);]]></search>
<add position="replace"><![CDATA[
		if (isset($this->request->get['log'])) { 
		$data['clear'] = $this->url->link('tool/error_log/clear', 'token=' . $this->session->data['token'] . '&log=' . $this->request->get['log'], true);
		} else {
		$data['clear'] = $this->url->link('tool/error_log/clear', 'token=' . $this->session->data['token'], true);
		}
		$data['url'] = $this->url->link('tool/error_log', 'token=' . $this->session->data['token'], true);
]]></add>
</operation>

<operation error="log">
<search><![CDATA[$data['log'] = '';]]></search>
<add position="after"><![CDATA[
		$data['files'] = array();
		foreach (glob(DIR_LOGS . '*.log') as $result) {
		$data['files'][] = $result;
		}
]]></add>
</operation>

<operation error="log">
<search><![CDATA[$this->response->redirect($this->url->link('tool/error_log', 'token=' . $this->session->data['token'], true));]]></search>
<add position="replace"><![CDATA[
		$this->response->redirect($this->url->link('tool/error_log', 'token=' . $this->session->data['token'] . '&log=' . basename($file), true));
]]></add>
</operation>
</file>

<file path="admin/language/*/tool/error_log.php">
<operation error="log">
<search><![CDATA[$_['text_list']        = 'Errors List';]]></search>
<add position="after"><![CDATA[
		// Entry
		$_['entry_log']        = 'Select log:';
]]></add>
</operation>
</file>

<file path="admin/view/template/tool/error_log.tpl">
<operation error="log">
<search><![CDATA[<textarea wrap="off" rows="15" readonly class="form-control"><?php echo $log; ?></textarea>]]></search>
<add position="replace"><![CDATA[
		<form class="form-horizontal">
		<div class="form-group">
		<label class="col-sm-2 control-label" for="input-log"><?php echo $entry_log; ?></label>
		<div class="col-sm-10">
		<select name="log" id="input-log" class="form-control">
		<?php foreach ($files as $file) { ?>
		<?php if ($selected == basename($file)) { ?>
		<option value="<?php echo basename($file); ?>" selected="selected"><?php echo basename($file); ?></option>
		<?php } else { ?>
		<option value="<?php echo basename($file); ?>"><?php echo basename($file); ?></option>
		<?php } ?>
		<?php } ?>
		</select>
		</div>
		</div>
		<div class="form-group">
		<div class="col-sm-12">
		<textarea wrap="off" rows="15" readonly="readonly" class="form-control"><?php echo htmlspecialchars($log); ?></textarea>
		</div>
		</div>
		</form>
]]></add>
</operation>

<operation error="log">
<search><![CDATA[<?php echo $footer; ?>]]></search>
<add position="before"><![CDATA[
	<script type="text/javascript"><!--
		$('#input-log').on('change', function() {
		var url = '<?php echo htmlspecialchars_decode($url); ?>&log=' + $('#input-log').val();
		$(location).attr('href', url);
		});
	//--></script>
]]></add>
</operation>
</file>
</modification>

Attachments

oc2_multi_error_log.jpg

OpenCart 'Error log all logs' Extension built for OC v.2.2.x - oc2_multi_error_log.jpg (88.53 KiB) Viewed 17920 times


I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Thu Dec 29, 2016 12:28 pm

And as long as we have the genious VqMod Coder JNeuhoff on this Topic:
After testing, I found out, the the LOG OcMod Extension shown above would be
capable by default, to display the daily VqMod Error message Files, and their content,
we used to understand so well, in the enhanced (Error) Log Page Display Selections. The
only need would be, to link an integrated VqMod error-log-file in it's good old familiar
form again, new into the
/shop/system/storage/logs/...
Section, and all important File Errors could be found/seen in one Place, and in a detailled
and so easy to understand Form, when it comes VqMod-related problems. It's hard
enough already to find those regading OcMods, by placing them with all other info into the
'general' install log crab.

Just an idea, to possibly enhance vqmod comfort and usabillity... ;)
Ernie

Attachments

vqmod_error_file_log_handling.jpg

detailled VqMod Error messages on screen - vqmod_error_file_log_handling.jpg (106.61 KiB) Viewed 17917 times


I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by guidone » Fri Jan 20, 2017 3:37 pm

Hi,

vQmod errors are easy to find for me in the log file, but i don't understand how to track errors in the ocmod log file.
I also installed the free extension from iSense ( https://www.opencart.com/index.php?rout ... n_id=22296 ) and sometime it finds some errors in the ocmod log but reading the log i don't understand where is the error, could you help me or give me an example?

PS: i checked if you install an ocmod extension with an error in a file path for example, differently from vQmod, the error is not reported in ocmod log file

User avatar
New member

Posts

Joined
Thu Mar 28, 2013 7:39 pm

Post by guntis.e » Fri Oct 06, 2017 11:42 am

I am running OC 3.0.1.2 and the system/storage/modification is empty despite the fact that at least one modification is installed and running. Is it just me or something is changed with oc 3.x?

Guntis
ImagePartneris.net


New member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by tonkp » Sat Oct 07, 2017 12:49 pm


Newbie

Posts

Joined
Fri Sep 08, 2017 3:41 pm

Post by guntis.e » Sat Oct 07, 2017 2:57 pm

guntis.e wrote:
Fri Oct 06, 2017 11:42 am
I am running OC 3.0.1.2 and the system/storage/modification is empty despite the fact that at least one modification is installed and running. Is it just me or something is changed with oc 3.x?
I found the reason - i forgot that after installing Opencart the system/storage directory was moved outside the Opencart installation directory. If it was really moved, there wouldn't be this confusion ;)

Guntis
ImagePartneris.net


New member

Posts

Joined
Fri Jan 28, 2011 4:20 am
Who is online

Users browsing this forum: No registered users and 34 guests