-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exchange module 1.6.4.1 for Opencart 2.3 only
- Loading branch information
1 parent
c82ea34
commit 131ce27
Showing
22 changed files
with
17,176 additions
and
812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<modification> | ||
<name>Exchange1C Module for OpenCart 2.3 (attribute)</name> | ||
<version>1.6.4.1_oc2.3_attribute</version> | ||
<id>OpenCart Exchange1C (attribute)</id> | ||
<author>KirilLoveVE</author> | ||
<link>https://github.com/KirilLoveVE/opencart2-exchange1c</link> | ||
<code>exchange1c-attribute</code> | ||
<!-- Атрибуты (начало) --> | ||
<file path="admin/language/ru-ru/catalog/attribute.php"> | ||
<operation> | ||
<search><![CDATA[// Column]]></search> | ||
<add position="before"><![CDATA[$_['column_guid'] = 'Ид (GUID)'; | ||
$_['column_type'] = 'Тип'; | ||
$_['column_version'] = 'Версия';]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[// Entry]]></search> | ||
<add position="before"><![CDATA[$_['entry_guid'] = 'Ид (GUID)'; | ||
$_['entry_type'] = 'Тип'; | ||
$_['entry_version'] = 'Версия';]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/controller/catalog/attribute.php"> | ||
<operation> | ||
<search><![CDATA[$data['column_sort_order'] = $this->language->get('column_sort_order');]]></search> | ||
<add position="before"><![CDATA[ $data['column_guid'] = $this->language->get('column_guid'); | ||
$data['column_type'] = $this->language->get('column_type'); | ||
$data['column_version'] = $this->language->get('column_version');]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA['sort_order' => $result['sort_order'],]]></search> | ||
<add position="before"><![CDATA[ 'guid' => $result['guid'], | ||
'type' => $result['type'], | ||
'version' => $result['version'],]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$data['attribute_groups'] = $this->model_catalog_attribute_group->getAttributeGroups();]]></search> | ||
<add position="before"><![CDATA[ $data['guid'] = empty($attribute_info['guid']) ? "" : $attribute_info['guid']; | ||
$data['type'] = empty($attribute_info['type']) ? "" : $attribute_info['type']; | ||
$data['version'] = empty($attribute_info['version']) ? "" : $attribute_info['version'];]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$data['entry_sort_order'] = $this->language->get('entry_sort_order');]]></search> | ||
<add position="before"><![CDATA[ $data['entry_guid'] = $this->language->get('entry_guid'); | ||
$data['entry_type'] = $this->language->get('entry_type'); | ||
$data['entry_version'] = $this->language->get('entry_version');]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/model/catalog/attribute.php"> | ||
<operation> | ||
<search><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "attribute SET attribute_group_id = '" . (int)$data['attribute_group_id'] . "', sort_order = '" . (int)$data['sort_order'] . "' WHERE attribute_id = '" . (int)$attribute_id . "'");]]></search> | ||
<add position="after"><![CDATA[ | ||
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "attribute_to_1c WHERE attribute_id = '" . (int)$attribute_id . "'"); | ||
if ($query->num_rows) { | ||
$this->db->query("UPDATE " . DB_PREFIX . "attribute_to_1c SET guid = '" . $this->db->escape($data['guid']) . "', type = '" . $data['type'] . "', version = '" . $data['version'] . "' WHERE attribute_id = '" . (int)$attribute_id . "'"); | ||
} else { | ||
$this->db->query("INSERT INTO " . DB_PREFIX . "attribute_to_1c SET guid = '" . $this->db->escape($data['guid']) . "', type = '" . $data['type'] . "', version = '" . $data['version'] . "' attribute_id = '" . (int)$attribute_id . "'"); | ||
} | ||
]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$sql = "SELECT *, (SELECT agd.name FROM " . DB_PREFIX . "attribute_group_description agd WHERE agd.attribute_group_id = a.attribute_group_id AND agd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS attribute_group FROM " . DB_PREFIX . "attribute a LEFT JOIN " . DB_PREFIX . "attribute_description ad ON (a.attribute_id = ad.attribute_id) WHERE ad.language_id = '" . (int)$this->config->get('config_language_id') . "'";]]></search> | ||
<add position="replace"><![CDATA[$sql = "SELECT *, (SELECT agd.name FROM " . DB_PREFIX . "attribute_group_description agd WHERE agd.attribute_group_id = a.attribute_group_id AND agd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS attribute_group, a.attribute_id FROM " . DB_PREFIX . "attribute a LEFT JOIN " . DB_PREFIX . "attribute_description ad ON (a.attribute_id = ad.attribute_id) LEFT JOIN " . DB_PREFIX . "attribute_to_1c a2c ON (a.attribute_id = a2c.attribute_id) WHERE ad.language_id = '" . (int)$this->config->get('config_language_id') . "'";]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "attribute a LEFT JOIN " . DB_PREFIX . "attribute_description ad ON (a.attribute_id = ad.attribute_id) WHERE a.attribute_id = '" . (int)$attribute_id . "' AND ad.language_id = '" . (int)$this->config->get('config_language_id') . "'");]]></search> | ||
<add position="replace"><![CDATA[$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "attribute a LEFT JOIN " . DB_PREFIX . "attribute_description ad ON (a.attribute_id = ad.attribute_id) LEFT JOIN " . DB_PREFIX . "attribute_to_1c a2c ON (a.attribute_id = a2c.attribute_id) WHERE a.attribute_id = '" . (int)$attribute_id . "' AND ad.language_id = '" . (int)$this->config->get('config_language_id') . "'");]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/view/template/catalog/attribute_list.tpl"> | ||
<operation> | ||
<search><![CDATA[<td class="text-right"><?php if ($sort == 'a.sort_order') { ?>]]></search> | ||
<add position="before"><![CDATA[ <td class="text-left"><?php echo $column_guid; ?></td> | ||
<td class="text-left"><?php echo $column_type; ?></td> | ||
<td class="text-left"><?php echo $column_version; ?></td>]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[<td class="text-right"><?php echo $attribute['sort_order']; ?></td>]]></search> | ||
<add position="before"><![CDATA[ <td class="text-left"><?php echo $attribute['guid']; ?></td> | ||
<td class="text-left"><?php echo $attribute['type']; ?></td> | ||
<td class="text-left"><?php echo $attribute['version']; ?></td>]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[<td class="text-center" colspan="5"><?php echo $text_no_results; ?></td>]]></search> | ||
<add position="replace"><![CDATA[<td class="text-center" colspan="8"><?php echo $text_no_results; ?></td>]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/view/template/catalog/attribute_form.tpl"> | ||
<operation> | ||
<search><![CDATA[<label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order; ?></label>]]></search> | ||
<add position="before" offset="1"><![CDATA[ <div class="form-group"> | ||
<label class="col-sm-2 control-label" for="input-guid"><?php echo $entry_guid; ?></label> | ||
<div class="col-sm-10"> | ||
<input type="text" name="guid" value="<?php echo $guid; ?>" placeholder="<?php echo $entry_guid; ?>" id="input-guid" class="form-control" /></div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-2 control-label" for="input-type"><?php echo $entry_type; ?></label> | ||
<div class="col-sm-10"> | ||
<input type="text" name="type" value="<?php echo $type; ?>" placeholder="<?php echo $entry_type; ?>" id="input-type" class="form-control" /></div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-2 control-label" for="input-version"><?php echo $entry_version; ?></label> | ||
<div class="col-sm-10"> | ||
<input type="text" name="version" value="<?php echo $version; ?>" placeholder="<?php echo $entry_version; ?>" id="input-version" class="form-control" /></div> | ||
</div>]]></add> | ||
</operation> | ||
</file> | ||
<!-- Атрибуты (конец) --> | ||
</modification> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<modification> | ||
<name>Exchange1C Module for OpenCart 2.3 (attribute_value)</name> | ||
<version>1.6.4.1_oc2.3_attribute_value</version> | ||
<id>OpenCart Exchange1C (attribute_value)</id> | ||
<author>KirilLoveVE</author> | ||
<link>https://github.com/KirilLoveVE/opencart2-exchange1c</link> | ||
<code>exchange1c-attribute_value</code> | ||
<file path="admin/view/template/catalog/attribute_form.tpl"> | ||
<operation> | ||
<search><![CDATA[<input type="text" name="sort_order" value="<?php echo $sort_order; ?>" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order" class="form-control" />]]></search> | ||
<add position="after" offset="2"><![CDATA[ <div class="form-group"> | ||
<div class="col-sm-10">Значения типа справочник</div> | ||
</div> | ||
<div class="table-responsive"> | ||
<table class="table table-bordered table-hover"> | ||
<thead> | ||
<tr> | ||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);"></td> | ||
<td class="text-left col-sm-7">Наименование</td> | ||
<td class="text-left col-sm-4">GUID</td> | ||
<td style="width: 30px;" class="text-right">Действие</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="text-center"><input type="checkbox" name="selected[]" value="15"><input type="hidden" name="shipping_code[]" value="flat.flat"></td> | ||
<td class="text-right">15йуц</td> | ||
<td class="text-left">4660be98-c533-11e2-8c5a-08edb9e71aa2</td> | ||
<td class="text-right"><a href="http://opencart2302.ptr-print.ru/admin/index.php?route=sale/order/edit&token=xOk3VXPT8zw5TH6Go55JoqMVEHVTEAsi&order_id=15" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="Редактировать"><i class="fa fa-pencil"></i></a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div>]]></add> | ||
</operation> | ||
</file> | ||
</modification> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<modification> | ||
<name>Exchange1C Module for OpenCart 2.3 (category)</name> | ||
<version>1.6.4.1_oc2.3_category</version> | ||
<id>OpenCart Exchange1C (category)</id> | ||
<author>KirilLoveVE</author> | ||
<link>https://github.com/KirilLoveVE/opencart2-exchange1c</link> | ||
<code>exchange1c-category</code> | ||
<file path="admin/language/en-gb/catalog/category.php"> | ||
<operation> | ||
<search><![CDATA[// Column]]></search> | ||
<add position="after"><![CDATA[$_['column_guid'] = 'GUID';]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[// Entry]]></search> | ||
<add position="after"><![CDATA[$_['entry_guid'] = 'GUID';]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/language/ru-ru/catalog/category.php"> | ||
<operation> | ||
<search><![CDATA[// Column]]></search> | ||
<add position="after"><![CDATA[$_['column_guid'] = 'GUID';]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[// Entry]]></search> | ||
<add position="after"><![CDATA[$_['entry_guid'] = 'GUID';]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/controller/catalog/category.php"> | ||
<operation> | ||
<search><![CDATA['sort_order' => $result['sort_order'],]]></search> | ||
<add position="before"><![CDATA[ 'guid' => $result['guid'],]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$data['column_sort_order'] = $this->language->get('column_sort_order');]]></search> | ||
<add position="before"><![CDATA[ $data['column_guid'] = $this->language->get('column_guid');]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$data['entry_sort_order'] = $this->language->get('entry_sort_order');]]></search> | ||
<add position="before"><![CDATA[ $data['entry_guid'] = $this->language->get('entry_guid');]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[$category_info = $this->model_catalog_category->getCategory($this->request->get['category_id']);]]></search> | ||
<add position="after"><![CDATA[ $data['guid'] = empty($category_info['guid']) ? "" : $category_info['guid'];]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/model/catalog/category.php"> | ||
<operation> | ||
<search><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "category SET parent_id = '" . (int)$data['parent_id'] . "', `top` = '" . (isset($data['top']) ? (int)$data['top'] : 0) . "', `column` = '" . (int)$data['column'] . "', sort_order = '" . (int)$data['sort_order'] . "', status = '" . (int)$data['status'] . "', date_modified = NOW() WHERE category_id = '" . (int)$category_id . "'");]]></search> | ||
<add position="after"><![CDATA[ | ||
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category_to_1c WHERE category_id = '" . (int)$category_id . "'"); | ||
if ($query->num_rows) { | ||
$this->db->query("UPDATE " . DB_PREFIX . "category_to_1c SET guid = '" . $this->db->escape($data['guid']) . "' WHERE category_id = '" . (int)$category_id . "'"); | ||
} else { | ||
$this->db->query("INSERT INTO " . DB_PREFIX . "category_to_1c SET guid = '" . $this->db->escape($data['guid']) . "', category_id = '" . (int)$category_id . "'"); | ||
} | ||
]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[AS keyword FROM " . DB_PREFIX . "category]]></search> | ||
<add position="replace"><![CDATA[AS keyword, c2c.guid FROM " . DB_PREFIX . "category]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[(c.category_id = cd2.category_id) WHERE c.category_id]]></search> | ||
<add position="replace"><![CDATA[(c.category_id = cd2.category_id) LEFT JOIN " . DB_PREFIX . "category_to_1c c2c ON (c.category_id = c2c.category_id) WHERE c.category_id]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[AS name, c1.parent_id, c1.sort_order]]></search> | ||
<add position="replace"><![CDATA[AS name, c1.parent_id, c1.sort_order, c2c.guid]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[(cp.category_id = cd2.category_id) WHERE cd1.language_id]]></search> | ||
<add position="replace"><![CDATA[(cp.category_id = cd2.category_id) LEFT JOIN " . DB_PREFIX . "category_to_1c c2c ON (c1.category_id = c2c.category_id) WHERE cd1.language_id]]></add> | ||
</operation> | ||
<operation> | ||
<search error="skip"><![CDATA[AS children FROM " . DB_PREFIX . "category c]]></search> | ||
<add position="replace"><![CDATA[AS children, c2c.guid FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_to_1c c2c ON (c.category_id = c2c.category_id)]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/view/template/catalog/category_list.tpl"> | ||
<operation> | ||
<search><![CDATA[<td class="text-right"><?php if ($sort == 'sort_order') { ?>]]></search> | ||
<add position="before"><![CDATA[ <td class="text-left"><?php echo $column_guid; ?></td>]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[<td class="text-right"><?php echo $category['sort_order']; ?></td>]]></search> | ||
<add position="before"><![CDATA[ <td class="text-left"><?php echo $category['guid']; ?></td>]]></add> | ||
</operation> | ||
<operation> | ||
<search><![CDATA[<td class="text-center" colspan="4"><?php echo $text_no_results; ?></td>]]></search> | ||
<add position="replace"><![CDATA[<td class="text-center" colspan="5"><?php echo $text_no_results; ?></td>]]></add> | ||
</operation> | ||
</file> | ||
|
||
<file path="admin/view/template/catalog/category_form.tpl"> | ||
<operation> | ||
<search><![CDATA[<label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order; ?></label>]]></search> | ||
<add position="before" offset="1"><![CDATA[ <div class="form-group"> | ||
<label class="col-sm-2 control-label" for="input-guid"><?php echo $entry_guid; ?></label> | ||
<div class="col-sm-10"> | ||
<input type="text" name="guid" value="<?php echo $guid; ?>" placeholder="<?php echo $entry_guid; ?>" id="input-guid" class="form-control" /></div> | ||
</div>]]></add> | ||
</operation> | ||
</file> | ||
</modification> |
Oops, something went wrong.