我是opencart的新手。我想在管理面板的目录部分创建一个额外的字段。我制作了一个 ocmod 文件,它将找到一个具有特定 id 的 div,然后暂时添加一个 span。其实我想要一个文件上传按钮。
下面是我的 install.xml 代码
<?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>
zip 文件名为 catalogupload.ocmod.zip。
它对管理面板没有任何影响。
当我从存储中查看 ocmod.log 文件时,会显示以下内容,我对此一无所知。
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
----------------------------------------------------------------
请帮我解决一下这个。我在这里做错了什么?