<?xml version="1.0" encoding="utf-8"?>
<modification>
 <name>OCMod Editor</name>
 <code>ocmod-editor</code>
 <version>3.0</version>
 <author>Opencartworks</author>
 <link>http://www.opencartworks.com</link>
 <file path="admin/controller/marketplace/modification.php">
 <operation>
 <search>
 <![CDATA[$data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);]]>
 </search>
 <add position="before">
 <![CDATA[$data['new'] = $this->url->link('extension/module/modification_editor', 'user_token=' . $this->session->data['user_token'] . $url, true);]]>
 </add>
 </operation>
 <operation>
 <search>
 <![CDATA[$data['modifications'][] = array(]]>
 </search>
 <add position="after">
 <![CDATA[
 'edit' => $this->url->link('extension/module/modification_editor', 'user_token=' . $this->session->data['user_token'] . '&modification_id=' . $result['modification_id'], true),
 'download' => $this->url->link('extension/module/modification_editor/download', 'user_token=' . $this->session->data['user_token'] . '&modification_id=' . $result['modification_id'], true),
 ]]>
 </add>
 </operation>
 <operation>
 <search>
 <![CDATA[$data['tab_log'] = $this->language->get('tab_log');]]>
 </search>
 <add position="after">
 <![CDATA[
 $this->load->language('extension/module/modification_editor');
 $data['button_new'] = $this->language->get('button_new');
 $data['button_edit'] = $this->language->get('button_edit');
 $data['button_download'] = $this->language->get('button_download');
 ]]>
 </add>
 </operation>
 <operation>
 <search index="1">
 <![CDATA[$this->response->redirect($this->url->link('marketplace/modification', 'user_token=' . $this->session->data['user_token'] . $url, true));]]>
 </search>
 <add position="replace">
 <![CDATA[
 if (isset($this->request->get['modification_editor'])) { 
 echo $this->session->data['success'];
 exit;
 } else {
 $this->response->redirect($this->url->link('extension/module/modification', 'user_token=' . $this->session->data['user_token'] . $url, true));
 }
 ]]>
 </add>
 </operation>
 </file>

 <file path="admin/view/template/marketplace/modification.twig">
 <operation>
 <search>
 <![CDATA[<div class="pull-right">]]>
 </search>
 <add position="after">
 <![CDATA[<a href="{{new}}" data-toggle="tooltip" title="{{button_new}}" class="btn btn-primary"><i class="fa fa-plus"></i></a>]]>
 </add>
 </operation>
 <operation>
 <search>
 <![CDATA[{% if not modification.enabled %}]]>
 </search>
 <add position="before">
 <![CDATA[
 <a href="{{modification.edit}}" data-toggle="tooltip" title="{{button_edit}}" class="btn btn-primary"><i class="fa fa-pencil"></i></a>
 <a href="{{modification.download}}" data-toggle="tooltip" title="{{button_download}}" class="btn btn-success"><i class="fa fa-cloud-download"></i></a>
 ]]>
 </add>
 </operation>
 </file>
</modification> 