我想在 OpenCart 中添加一个子菜单,在管理区域的目录菜单下。过去我们使用 ocmod 或 vqmod 来执行此操作,ocmod 的示例如下:
<?xml version="1.0" encoding="utf-8"?>
<modification>
<code>submenu5</code>
<name>submenu5</name>
<version>2.3</version>
<author>codertj</author>
<link>codertj.com</link>
<!-- edit header controller -->
<file path="admin/controller/common/column_left.php">
<!-- create link to your page -->
<operation error="log">
<search><![CDATA[if ($this->user->hasPermission('access', 'catalog/product')) {]]></search>
<add position="before"><![CDATA[
if ($this->user->hasPermission('access', 'catalog/product')) {
$catalog[] = array(
'name' => $this->language->get('text_hello_world'),
'href' => $this->url->link('report/helloworld', 'token=' . $this->session->data['token'], true),
'children' => array()
);
}
]]></add>
</operation>
</file>
<!-- edit header template -->
<file path="admin/language/en-gb/common/column_left.php">
<operation error="log">
<search><![CDATA[$_['text_product']]]></search>
<add position="before"><![CDATA[
$_['text_hello_world'] = 'Hello World';
]]></add>
</operation>
</file>
</modification>
现在 opencart 使用事件系统,但我找不到将此 ocmod 转换为事件的解决方案!