Page 1 of 1

OC3 - My ocmod not showing in Modifications List

Posted: Thu Jul 13, 2017 7:22 am
by Melown
Hello to Everyone,

I'm trying to learn how to make ocmod file for OpenCart v3.0.1.2 but after uploading it does not appear in Mods List nor did it modify any page. The code below does not include the lines for modding other files because they are basically the same.

*****************************************
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Hide Tax Info</name>
<version>1.0</version>
<author>Melown</author>
<code>hide-tax-info</code>

<file path="catalog/view/theme/default/template/extension/module/bestseller.twig">
<operation>
<search>
{% if product.tax %}
<span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
</search>
<add position="replace">
{% if product.tax %}
<span class="price-tax" style="display:none;">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
</add>
</operation>
</file>

<file path="catalog/view/theme/default/template/extension/module/featured.twig">
<operation>
<search>
{% if product.tax %}
<span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
</search>
<add position="replace">
{% if product.tax %}
<span class="price-tax" style="display:none;">{{ text_tax }} {{ product.tax }}</span>
{% endif %}
</add>
</operation>
</file>

</modification>
*****************************************

What am I missing?

For testing I deleted the affected lines and they worked so pretty much I suspect the problem has to do with the correct format for ocmod xml. Please help.

Thank you.

Re: OC3 - My ocmod not showing in Modifications List

Posted: Thu Jul 13, 2017 11:05 pm
by Johnathan
Try using only a single line in the <search> tag. Multiple lines can mess that tag up.

Re: OC3 - My ocmod not showing in Modifications List

Posted: Fri Jul 21, 2017 12:43 am
by Hackej
Hi

I have the same/ a similar problem.

I am using an old mod that has worked prevoiusly without problem (in OC 2), so now I have just changed name to install.xml, and generated a zip-file with the xml-file and an empty Upload folder and named the zip-file <name>.ocmod.zip.

It installs okey and is listed in installed extensions but is not visible in modification list and is not used/analysed according to modification log file.
So what might be the problem?

Even if the format of the xml-file is wrong it should be listed in as a modification and included in the log file etc, right?

Did you get yors fixed in any way?

BR
/Hackej

Re: OC3 - My ocmod not showing in Modifications List

Posted: Fri Sep 01, 2017 7:58 pm
by jaynarayan
I have the same problem. I am using the exact coed as shown in this official document from git hub , but it is not working.
Zip file uploded successfully but the modification not listed out even after refreshing.
https://github.com/opencart/opencart/wi ... ion-System

Does anyone have solution?

Re: OC3 - My ocmod not showing in Modifications List

Posted: Fri Sep 01, 2017 10:34 pm
by Johnathan
Make sure the ocMod file is called "install.xml" and is outside the "upload" folder, as specified in the format instructions:

https://github.com/opencart/opencart/wi ... -structure