Modification: Add To Admin Menu

Lots of extensions add to the opencart menu, here's an example modification for easy copy/paste:

- Opencart 2.3

Changes to menu follows user group permissions and less changes are required :)

<?xml version="1.0" encoding="utf-8"?>
<modification>
  <name>Foo</name>
  <code>foo</code>
  <version>1.0.0.1</version>
  <author>Opencart-Templates</author>
  <link>http://www.opencart-templates.co.uk</link>
  
 <file path="admin/controller/common/column_left.php">
    <operation>
        <search index="0"><![CDATA[if ($this->user->hasPermission('access', 'extension/extension')) {   ]]></search>
            <add position="before"><![CDATA[            if ($this->user->hasPermission('access', 'extension/foo')) {        
                $extension[] = array(
                    'name'     => $this->language->get('text_foo'),
                    'href'     => $this->url->link('extension/foo', 'token=' . $this->session->data['token'], true),
                    'children' => array()       
                );                  
            }   
        ]]></add>
    </operation>
  </file>
    
  <file path="admin/language/en-gb/common/column_left.php">
    <operation>
        <search index="0"><![CDATA[<?php]]></search>
        <add position="after"><![CDATA[$_['text_foo'] = 'Foo';]]></add>
    </operation>
  </file>
</modification>

- Pre Opencart 2.3

<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Foo</name>
  <code>foo</code>
  <version>1.0.0.1</version>
  <author>Opencart-Templates</author>
  <link>http://www.opencart-templates.co.uk</link>
  
  <file path="admin/language/english/common/menu.php">
    <operation>
      <search index="0"><![CDATA[<?php]]></search>
      <add position="after"><![CDATA[$_['text_foo'] = 'Foo';]]></add>
    </operation>
  </file>

  <file path="admin/controller/common/menu.php">
    <operation>
      <search index="0"><![CDATA[$data['text_review'] = $this->language->get('text_review');]]></search>
      <add position="after"><![CDATA[     $data['text_foo'] = $this->language->get('text_foo');]]></add>
</operation> <operation> <search index="0"><![CDATA[$data['review'] = $this->url->link('catalog/review', 'token=' . $this->session->data['token'], 'SSL');]]></search> <add position="after"><![CDATA[ $data['foo'] = $this->url->link('extension/foo', 'token=' . $this->session->data['token'], 'SSL');]]></add>
</operation> </file> <file path="admin/view/template/common/menu.tpl"> <operation> <search index="0"><![CDATA[<li><a href="<?php echo $review; ?>"><?php echo $text_review; ?></a></li>]]></search> <add position="before"><![CDATA[ <li><a href="<?php echo $foo; ?>"><?php echo $text_foo; ?></a></li>]]></add>
</operation> </file> </modification>

Featured

Professional Email Template - Advanced

Professional Email Template - Advanced

Responsive HTML Email template - not only will your emails look professional on all desktop computers, it will resize beautifully for viewing on mobile devices! The aim of this new extension was to build a configurable email template which can be ea

£22.50

Modifications Manager

Modifications Manager

Edit modifications (ocmod code) easily from the admin using a xml code editor. The xml ocmod is stored in the database table 'oc_modification' and can be hard to make changes... this extension solves this :) Add/edit modifications. CodeMirr

FREE

PDF Order Invoice

PDF Order Invoice

Attach PDF invoice to order update email or customer download from their account. Works well with Advanced Email Template

£10.00

Admin Order Status Updater

Admin Order Status Updater

Quickly and easily update orders with the same order status and auto populated message.Works very well with email template extension that handles parsing the shortcodes (e.g: {{ firstname }}) to real data. ..

£10.00