Skip to content

Commit

Permalink
Обновлено до версии 1.6.3.8
Browse files Browse the repository at this point in the history
В заказах еще могут встречаться ошибки, работы над ошибками ведутся
  • Loading branch information
KirilLoveVE committed May 12, 2017
1 parent dd9f261 commit c82ea34
Show file tree
Hide file tree
Showing 10 changed files with 789 additions and 223 deletions.
34 changes: 30 additions & 4 deletions install.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
<modification>
<name>Exchange Module for OpenCart 2.x</name>
<version>1.6.3.3</version>
<name>Exchange Module for OpenCart 2.1</name>
<version>1.6.3</version>
<id>OpenCart Exchange</id>
<author>KirilLoveVE</author>
<link>https://github.com/KirilLoveVE/opencart2-exchange1c</link>
<code>exchange1c</code>
<file path="admin/controller/common/menu.php">
<operation>
<search><![CDATA[$data['text_option'] = $this->language->get('text_option');]]></search>
<add position="after"><![CDATA[$data['text_warehouse'] = $this->language->get('text_warehouse');]]></add>
</operation>
<operation>
<search><![CDATA[$data['module'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL');]]></search>
<add position="after"><![CDATA[$data['exchange1c'] = $this->url->link('module/exchange1c', 'token=' . $this->session->data['token'], 'SSL');]]></add>
</operation>
<operation>
<search><![CDATA[$data['option'] = $this->url->link('catalog/option', 'token=' . $this->session->data['token'], 'SSL');]]></search>
<add position="after"><![CDATA[$data['warehouse'] = $this->url->link('catalog/warehouse', 'token=' . $this->session->data['token'], 'SSL');]]></add>
</operation>
</file>

<file path="admin/view/template/common/menu.tpl">
<operation>
<search><![CDATA[<li><a href="<?php echo $modification; ?>"><?php echo $text_modification; ?></a></li>]]></search>
<add position="after"><![CDATA[<li><a href="<?php echo $exchange1c; ?>">Exchange 1C 8.x</a></li>]]></add>
<add position="after"><![CDATA[ <li><a href="<?php echo $exchange1c; ?>">Exchange 1C 8.x</a></li>]]></add>
</operation>
<operation>
<search><![CDATA[<li><a href="<?php echo $option; ?>"><?php echo $text_option; ?></a></li>]]></search>
<add position="after"><![CDATA[ <li><a href="<?php echo $warehouse; ?>"><?php echo $text_warehouse; ?></a></li>]]></add>
</operation>
</file>

<file path="admin/language/russian/common/menu.php">
<operation>
<search><![CDATA[$_['text_option'] = 'Опции';]]></search>
<add position="after"><![CDATA[$_['text_warehouse'] = 'Склады';]]></add>
</operation>
</file>

<file path="admin/language/english/common/menu.php">
<operation>
<search><![CDATA[$_['text_option'] = 'Options';]]></search>
<add position="after"><![CDATA[$_['text_warehouse'] = 'Warehouses';]]></add>
</operation>
</file>

<file path="system/library/image.php">
<file path="system/library/image.php">
<operation>
<search><![CDATA[$mime = $this->info['mime'];]]></search>
<add position="replace"><![CDATA[$info = getimagesize($image);
Expand Down
129 changes: 129 additions & 0 deletions upload/admin/controller/catalog/warehouse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?php
class ControllerCatalogWarehouse extends Controller {
private $error = array();

public function index() {
$this->language->load('catalog/warehouse');

$this->document->setTitle($this->language->get('heading_title'));

$this->load->model('catalog/warehouse');

$this->getList();
}

protected function getList() {

$url = '';

if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}

if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}

if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}

$data['add'] = $this->url->link('catalog/warehouse/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
$data['delete'] = $this->url->link('catalog/warehouse/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');

$data['warehouses'] = array();

$results = $this->model_catalog_warehouse->getWarehouses();

foreach ($results as $result) {
$data['warehouses'][] = array(
'warehouse_id' => $result['warehouse_id'],
'name' => $result['name'],
'guid' => $result['guid'],
'edit' => $this->url->link('catalog/warehouse/edit', 'token=' . $this->session->data['token'] . '&warehouse_id=' . $result['warehouse_id'] . $url, 'SSL')
);
}

$data['heading_title'] = $this->language->get('heading_title');

$data['text_no_results'] = $this->language->get('text_no_results');
$data['text_confirm'] = $this->language->get('text_confirm');

$data['text_list'] = $this->language->get('text_list');
$data['column_name'] = $this->language->get('column_name');
$data['column_guid'] = $this->language->get('column_guid');
$data['column_action'] = $this->language->get('column_action');

$data['button_add'] = $this->language->get('button_add');
$data['button_edit'] = $this->language->get('button_edit');
$data['button_delete'] = $this->language->get('button_delete');

if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}

$url = '';

if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL')
);

$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/warehouse', 'token=' . $this->session->data['token'] . $url, 'SSL')
);

$data['heading_title'] = $this->language->get('heading_title');

if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}

if (isset($this->session->data['success'])) {
$data['success'] = $this->session->data['success'];

unset($this->session->data['success']);
} else {
$data['success'] = '';
}

if (isset($this->request->post['selected'])) {
$data['selected'] = (array)$this->request->post['selected'];
} else {
$data['selected'] = array();
}

$url = '';

if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}

$pagination = new Pagination();
$pagination->page = $page;
$pagination->limit = $this->config->get('config_limit_admin');
$pagination->url = $this->url->link('catalog/warehouse', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');

$data['pagination'] = $pagination->render();

$data['results'] = sprintf($this->language->get('text_pagination'), 0, ((($page - 1) * $this->config->get('config_limit_admin')) + $this->config->get('config_limit_admin')), 1, $this->config->get('config_limit_admin'));

$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');

$this->response->setOutput($this->load->view('catalog/warehouse_list.tpl', $data));
}

}

0 comments on commit c82ea34

Please sign in to comment.