From 4359f084bd23fa9fb33fc9232eb5b2365872a637 Mon Sep 17 00:00:00 2001
From: RenCurs <34103666+RenCurs@users.noreply.github.com>
Date: Tue, 22 Dec 2020 13:06:57 +0300
Subject: [PATCH] Add info about discount on order (#211)
---
.../controller/extension/module/retailcrm.php | 6 +++-
.../en-gb/extension/module/retailcrm.php | 5 +++
.../es-es/extension/module/retailcrm.php | 4 +++
.../ru-ru/extension/module/retailcrm.php | 4 +++
.../template/extension/module/retailcrm.tpl | 9 +++++
.../template/extension/module/retailcrm.twig | 9 +++++
.../extension/total/retailcrm_discount.php | 11 ++++++
.../library/retailcrm/lib/history/Order.php | 36 +++++++++++++++++++
.../lib/service/RetailcrmOrderConverter.php | 7 ++--
.../system/library/retailcrm/retailcrm.php | 6 ++++
10 files changed, 94 insertions(+), 3 deletions(-)
create mode 100644 src/upload/catalog/model/extension/total/retailcrm_discount.php
diff --git a/src/upload/admin/controller/extension/module/retailcrm.php b/src/upload/admin/controller/extension/module/retailcrm.php
index 1d52ad2..dbb3b4c 100644
--- a/src/upload/admin/controller/extension/module/retailcrm.php
+++ b/src/upload/admin/controller/extension/module/retailcrm.php
@@ -328,7 +328,11 @@ class ControllerExtensionModuleRetailcrm extends Controller
'text_lenght_label',
'corporate_enabled_label',
'entry_code',
- 'entry_status'
+ 'entry_status',
+ 'text_retailcrm_discount',
+ 'text_label_retailcrm_discount',
+ 'label_retailcrm_discount',
+ 'default_label_retailcrm_discount'
);
$_data = &$data;
diff --git a/src/upload/admin/language/en-gb/extension/module/retailcrm.php b/src/upload/admin/language/en-gb/extension/module/retailcrm.php
index e72e4c8..b2669d0 100644
--- a/src/upload/admin/language/en-gb/extension/module/retailcrm.php
+++ b/src/upload/admin/language/en-gb/extension/module/retailcrm.php
@@ -79,6 +79,11 @@ $_['text_status_changes'] = 'Record changes to the order history of Openc
$_['column_total'] = 'Total';
$_['product_summ'] = 'Sum';
+$_['text_retailcrm_discount'] = 'RetailCRM discount';
+$_['text_retailcrm_label_discount'] = 'Label of RetailCRM discount in section total of order';
+$_['default_retailcrm_label_discount'] = 'Discount in RetailCRM';
+
+
$_['article'] = 'Article';
$_['color'] = 'Color';
$_['weight'] = 'Weight';
diff --git a/src/upload/admin/language/es-es/extension/module/retailcrm.php b/src/upload/admin/language/es-es/extension/module/retailcrm.php
index 5842fd6..7710f94 100644
--- a/src/upload/admin/language/es-es/extension/module/retailcrm.php
+++ b/src/upload/admin/language/es-es/extension/module/retailcrm.php
@@ -79,6 +79,10 @@ $_['text_status_changes'] = 'Registrar los cambios en el historial de ped
$_['column_total'] = 'Total';
$_['product_summ'] = 'Importe';
+$_['text_retailcrm_discount'] = 'RetailCRM descuento';
+$_['text_retailcrm_label_discount'] = 'Etiqueta de descuento de RetailCRM en la sección total del pedido';
+$_['default_retailcrm_label_discount'] = 'Descuento en RetailCRM';
+
$_['article'] = 'Artículo';
$_['color'] = 'Color';
$_['weight'] = 'Peso';
diff --git a/src/upload/admin/language/ru-ru/extension/module/retailcrm.php b/src/upload/admin/language/ru-ru/extension/module/retailcrm.php
index bed9017..c50d7ff 100644
--- a/src/upload/admin/language/ru-ru/extension/module/retailcrm.php
+++ b/src/upload/admin/language/ru-ru/extension/module/retailcrm.php
@@ -79,6 +79,10 @@ $_['text_status_changes'] = 'Фиксировать изменения в
$_['column_total'] = 'Итого';
$_['product_summ'] = 'Сумма';
+$_['text_retailcrm_discount'] = 'Скидка RetailCRM';
+$_['text_retailcrm_label_discount'] = 'Подпись для скидки, установленной в RetailCRM, в итоговой секции заказа';
+$_['default_retailcrm_label_discount'] = 'Скидка в RetailCRM';
+
$_['article'] = 'Артикул';
$_['color'] = 'Цвет';
$_['weight'] = 'Вес';
diff --git a/src/upload/admin/view/template/extension/module/retailcrm.tpl b/src/upload/admin/view/template/extension/module/retailcrm.tpl
index 7567eef..ad866e4 100644
--- a/src/upload/admin/view/template/extension/module/retailcrm.tpl
+++ b/src/upload/admin/view/template/extension/module/retailcrm.tpl
@@ -213,6 +213,15 @@
+
+