0

iam trying make some modification in OpenCart Admin so i created ocmod file but it doesn`t working ! when using position "After" it replaced code !! and "After" not working !

this code

 <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>

position "After" not working always "Replace" !

what error on my code

<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>
shadyyx
  • 15,825
  • 6
  • 60
  • 95
abada henno
  • 750
  • 6
  • 15
  • 1
    **1.** Edit you question, please, and use correct English. `i` referring to you is `I`, `iam` probably should be `I am`, etc. **2.** Are you sure you should be using capitalized `After` and not `after`? **3.** Stick with vQmod (which is working) rather than this pathetic replacement trial (OCMod). Comrades from OC have to work on lot of improvements. – shadyyx Nov 04 '14 at 08:20
  • After or after please check documentation https://github.com/opencart/opencart/wiki/Modification-System i tried both not working ! – abada henno Nov 07 '14 at 00:30

0 Answers0