Ocmod not showing any changes in opencart 3

1k Views Asked by At

I am a newbie to opencart. I want to create an extra field in catalog section of admin panel. I have made an ocmod file which will find a div with specific id and after that adds a span for now. Actually I wanted an file upload button.

Below is my install.xml code

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Catalogupload</name>
    <version>1.0</version>
    <author>Rishi</author>
    <link>https://www.sarvadaa.com</link>
    <code>Upload catalog file</code>
    <file path="admin/view/template/catalog/information_form.twig">
        <operation>
            <search><![CDATA[
            <div class="tab-pane" id="tab-seo">
            ]]></search>
            <add position="before"><![CDATA[<span id="rishi">Hello</span>]]></add>
        </operation>
    </file>
</modification>

The zip file name is catalogupload.ocmod.zip.

It isn't showing any effect on admin panel.

When I look at the ocmod.log file from storage the below shows up which I dont have any idea of.

2021-06-02 6:16:25 - MOD: Modification Default

FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69

FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168

FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59

FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73

FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18

FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
NOT FOUND - OPERATIONS ABORTED!
----------------------------------------------------------------
MOD: Catalogupload

FILE: admin/view/template/catalog/information_form.twig
CODE: <div class="tab-pane" id="tab-seo">
LINE: 132
----------------------------------------------------------------
MOD: OCMOD Downloader

FILE: admin/controller/marketplace/modification.php
CODE: n enable(
LINE: 550
CODE: 'modification_id' => $result['modification_id'],
LINE: 715

FILE: admin/view/template/marketplace/modification.twig
CODE: if not modification.enabled
LINE: 96
----------------------------------------------------------------

Please help me with this. What i am doing wrong here?

1

There are 1 best solutions below

0
On

If you use the OpenCart 3.0.3.6 there is a bug to the modification.xml file.

You can install the free extension to fix this bug as well https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=40216

This will solve the problem.