diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7dfe7939..ccb987f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 2020-04-27 v.5.3.1
+* Добавлена локализация свойств при генерации каталога
+
## 2020-04-23 v.5.3.0
* Добавлена поддержка корпоративных клиентов
diff --git a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php
index 740aa32f..d7349c9c 100644
--- a/intaro.retailcrm/classes/general/icml/RetailCrmICML.php
+++ b/intaro.retailcrm/classes/general/icml/RetailCrmICML.php
@@ -34,6 +34,7 @@ class RetailCrmICML
protected $isLogged = false;
protected $logFile = '/bitrix/catalog_export/i_crm_load_log.txt';
protected $fpLog;
+ protected $localizedIBlockProps;
protected $MODULE_ID = 'intaro.retailcrm';
protected $CRM_CATALOG_BASE_PRICE = 'catalog_base_price';
@@ -69,10 +70,11 @@ class RetailCrmICML
{
global $USER;
if (!isset($_SESSION["SESS_AUTH"]["USER_ID"]) || !$_SESSION["SESS_AUTH"]["USER_ID"]) {
- $USER = new CUser;
+ $USER = new CUser();
}
$this->isLogged = true;
+ $this->localizedIBlockProps = $this->getLocalizedIBlockProps();
$defaultSite = CSite::GetList($by = "def", $order = "desc", array('DEF' => 'Y'))->Fetch();
$this->encodingDefault = $defaultSite["CHARSET"];
@@ -647,7 +649,13 @@ class RetailCrmICML
if ($key === "manufacturer") {
$offer .= "" . $this->PrepareValue($arOffer['_PROP_' . $key]) . "\n";
} else {
- $offer .= '" . $this->PrepareValue($arOffer['_PROP_' . $key]) . "\n";
+ $name = $key;
+
+ if (isset($this->localizedIBlockProps[$key])) {
+ $name = $this->localizedIBlockProps[$key];
+ }
+
+ $offer .= '" . $this->PrepareValue($arOffer['_PROP_' . $key]) . "\n";
}
}
}
@@ -656,7 +664,13 @@ class RetailCrmICML
if ($key === "manufacturer") {
$offer .= "" . $this->PrepareValue($arOffer['_PROP_' . $key]) . "\n";
} else {
- $offer .= '" . $this->PrepareValue($arOffer['_PROP_' . $key]) . "\n";
+ $name = $key;
+
+ if (isset($this->localizedIBlockProps[$key])) {
+ $name = $this->localizedIBlockProps[$key];
+ }
+
+ $offer .= '" . $this->PrepareValue($arOffer['_PROP_' . $key]) . "\n";
}
}
}
@@ -713,4 +727,19 @@ class RetailCrmICML
return array();
}
+
+ private function getLocalizedIBlockProps()
+ {
+ return array(
+ "article" => GetMessage("PROPERTY_ARTICLE_HEADER_NAME"),
+ "manufacturer" => GetMessage("PROPERTY_MANUFACTURER_HEADER_NAME"),
+ "color" => GetMessage("PROPERTY_COLOR_HEADER_NAME"),
+ "size" => GetMessage("PROPERTY_SIZE_HEADER_NAME"),
+ "weight" => GetMessage("PROPERTY_WEIGHT_HEADER_NAME"),
+ "length" => GetMessage("PROPERTY_LENGTH_HEADER_NAME"),
+ "width" => GetMessage("PROPERTY_WIDTH_HEADER_NAME"),
+ "height" => GetMessage("PROPERTY_HEIGHT_HEADER_NAME"),
+ "picture" => GetMessage("PROPERTY_PICTURE_HEADER_NAME")
+ );
+ }
}
diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php
index b75766ee..794f15cf 100644
--- a/intaro.retailcrm/install/version.php
+++ b/intaro.retailcrm/install/version.php
@@ -1,5 +1,5 @@
$arModuleVersion = array(
- "VERSION" => "5.3.0",
- "VERSION_DATE" => "2020-04-23 16:00:00"
+ "VERSION" => "5.3.1",
+ "VERSION_DATE" => "2020-04-27 17:45:00"
);
diff --git a/intaro.retailcrm/lang/ru/classes/general/icml/RetailCrmICML.php b/intaro.retailcrm/lang/ru/classes/general/icml/RetailCrmICML.php
index e21acd04..6e6fe7f3 100644
--- a/intaro.retailcrm/lang/ru/classes/general/icml/RetailCrmICML.php
+++ b/intaro.retailcrm/lang/ru/classes/general/icml/RetailCrmICML.php
@@ -1,2 +1,11 @@
-<<<<<<< HEAD
- 0) :?>
-
-
-
-
-
- |
-
- >
-
-
- |
-
-
- >
- |
-
-
- |
-
-
- >
-
-
-
-
- |
-
-
- >
-
-
- |
-
-
- >
-
-
-
-
- |
-
-
- >
-
-
- |
-
-
-
- 0) :?>
-
-
-
-
-
- |
-
- >
-
-
-
-
- |
-
-
- >
- |
-
-
- |
-
-
- >
-
-
-
-
- |
-
-
- >
-
-
- |
-
-
- >
-
-
-
-
- |
-
-
- >
-
-
- |
-
-
-
-
-
-
+ |
>
+
-
-
- |
-
- >
-
-
- |
-
-
- >
- () |
-
-
- |
-
-
-
-
-
-
-
+
|
- >
-
-
+ |
>
+
+
+ |
+
+ |
+
@@ -1602,53 +1471,6 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
-
-
-
-
-
- |
-
-
- >
-
- ()
- |
-
- >
- |
-
-
- |
-
- >
- |
-
-
- |
-
-
-
-=======
->>>>>>> fix options
- >
-
-
-
-
- |
-
-
- >
-
-
- |
-
- |
-
-
-
-
Buttons(); ?>