如何在 Opencart Admin 的产品菜单下创建子菜单

How to Create Sub Menu under Product Menu in Opencart Admin

我正在尝试使用 VQMOD 在产品菜单下创建子菜单,但不幸的是我无法在管理中显示它。请参阅下面我使用 VQMOD 创建菜单的代码。

<modification>
    <id>Add a link</id>
    <version>1.5.4</version>
    <vqmver>0.1</vqmver>
    <author>Nagamani Naresh</author>

    <!-- edit header controller -->
    <file name="admin/controller/common/header.php">
    <!-- create link to your page -->   
        <operation error="log">
            <search position="after"><![CDATA[$this->data['setting'] = $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL');]]></search>
            <add><![CDATA[
            $this->data['hello_world'] = $this->url->link('custom/helloworld', 'token=' . $this->session->data['token'], 'SSL');
            ]]></add>
        </operation>
    <!-- / -->
    </file>

    <!-- edit header template -->
    <file name="admin/view/template/common/header.tpl">
    <!-- add link to your page -->  
        <operation error="log">

            <search position="before" offset="1"><![CDATA[<ul class="right">]]></search>
            <add><![CDATA[
            <li><a class="top">Your link</a>
                <ul>
                    <li><a href="<?=$hello_world;?>">Hello World</a></li>
                </ul>
            </li>
            ]]></add>
        </operation>
    <!-- / -->
    </file> 

</modification>

请分享您的建议。

对于 opencart 2。0.X 将此代码保存为 name.ocmod.xml 并从管理员上传

<?xml version="1.0" encoding="utf-8"?>
<modification>
<code>extra admin menu</code>
<name>test admin menu</name>
<version>2.0</version>
<author>codertj</author>
<link>codertj.com</link>

<!-- edit header controller -->
<file name="admin/controller/common/menu.php">
<!-- create link to your page -->   
    <operation error="log">
        <search><![CDATA[$data['setting'] = $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL');]]></search>
        <add position="after"><![CDATA[
        $data['hello_world'] = $this->url->link('custom/helloworld', 'token=' . $this->session->data['token'], 'SSL');
        ]]></add>
    </operation>
</file>

<!-- edit header template -->
<file name="admin/view/template/common/menu.tpl">
<!-- add link to your page -->  
    <operation error="log">
        <search><![CDATA[<li><a href="<?php echo $product; ?>"><?php echo $text_product; ?></a></li>]]></search>
        <add position="after"><![CDATA[
        <li><a href="<?php echo $hello_world;?>">Hello World</a></li>               
        ]]></add>
    </operation>    
</file>