iam尝试在OpenCart Admin中进行一些修改,所以我创建了ocmod文件,但它不起作用! 当使用位置“之后”它取代代码!!和“后”不工作!
此代码
<modification>
<code>31111</code>
<name><![CDATA[<font color="#0000"><b> DK Setting Modification</font>]]></name>
<version><![CDATA[<b>1.0</b>]]></version>
<author><![CDATA[<font color="#CC0000"><b>abada henno</font>]]></author>
<link><![CDATA[http://abadahenno.com]]></link>
<file name="admin/language/english/common/menu.php">
<operation error="log">
<search ><![CDATA[// Text]]></search>
<add position="After"><![CDATA[
$_['text_dokan_menu'] = 'DK Setting';
]]></add>
</operation>
</file>
<file path="admin/controller/controller/common/menu.php">
<operation error="log">
<search><![CDATA[$this->load->language('common/menu');]]></search>
<add position="After"><![CDATA[
$data['text_dk_menu'] = $this->language->get('text_dk_menu');
]]></add>
</operation>
<operation error="log">
<search ><![CDATA[$data['home'] = $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL');]]></search>
<add position="After"><![CDATA[
$data['dk'] = $this->url->link('setting/dk', 'token=' . $this->session->data['token'], 'SSL');
]]></add>
</operation>
</file>
<file path="admin/view/template/common/menu.tpl">
<operation error="log">
<search><![CDATA[
<li><a href="<?php echo $setting; ?>"><?php echo $text_setting; ?></a></li>
]]></search>
<add position="After"><![CDATA[
<li><a href="<?php echo $dk; ?>"> <?php echo $text_dk_menu; ?> </a></li>
]]></add>
</operation>
</file>
</modification>
位置“后”不工作总是“替换”!
我的代码上有什么错误
<li><a href="<b>Notice</b>: Undefined variable: dk in <b>/home/vagrant/Code/dk/system/modification/admin/view/template/common/menu.tpl</b> on line <b>116</b>"> <b>Notice</b>: Undefined variable: text_dk_menu in <b>/home/vagrant/Code/dk/system/modification/admin/view/template/common/menu.tpl</b> on line <b>116</b> </a></li>