Post by Melown » Thu Jul 13, 2017 7:22 am

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.

Newbie

Posts

Joined
Fri Jul 07, 2017 10:06 pm

Post by Johnathan » Thu Jul 13, 2017 11:05 pm

Try using only a single line in the <search> tag. Multiple lines can mess that tag up.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Hackej » Fri Jul 21, 2017 12:43 am

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

New member

Posts

Joined
Fri May 27, 2011 1:47 pm

Post by jaynarayan » Fri Sep 01, 2017 7:58 pm

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?

Newbie

Posts

Joined
Thu Aug 31, 2017 3:38 pm

Post by Johnathan » Fri Sep 01, 2017 10:34 pm

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

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 9 guests