parent
00ce153d4d
commit
45d48ea82c
6 changed files with 10 additions and 13 deletions
|
@ -37,9 +37,8 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/retailcrm/exp
|
|||
$hlblockList[$hlblockArr["TABLE_NAME"]] = $hlblockArr;
|
||||
}
|
||||
}
|
||||
$settingService = SettingsService::getInstance([], '');
|
||||
$iblockProperties = $settingService->actrualPropList;
|
||||
|
||||
$settingService = SettingsService::getInstance([], '');
|
||||
$iblockPropertySku = [];
|
||||
$iblockPropertySkuHl = [];
|
||||
$iblockPropertyUnitSku = [];
|
||||
|
@ -47,7 +46,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/retailcrm/exp
|
|||
$iblockPropertyProductHl = [];
|
||||
$iblockPropertyUnitProduct = [];
|
||||
|
||||
foreach ($iblockProperties as $prop => $text) {
|
||||
foreach (array_keys($settingService->actrualPropList) as $prop) {
|
||||
$skuUnitProps = ('iblockPropertyUnitSku_' . $prop);
|
||||
$skuUnitProps = $$skuUnitProps;
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ __IncludeLang(GetLangFileName(
|
|||
$basePriceId = RetailcrmConfigProvider::getCrmBasePrice($_REQUEST['PROFILE_ID']);
|
||||
$priceTypes = $settingsService->priceTypes;
|
||||
$iblockFieldsName = $settingsService->getIblockFieldsNames();
|
||||
$iblockPropertiesHint = $settingsService->getHintProps();
|
||||
$units = $settingsService->getUnitsNames();
|
||||
$hintUnit = $settingsService->getHintUnit();
|
||||
|
||||
|
@ -63,7 +62,6 @@ if (($ACTION === 'EXPORT' || $ACTION === 'EXPORT_EDIT' || $ACTION === 'EXPORT_CO
|
|||
$SETUP_FILE_NAME = $settingsService->setupFileName;
|
||||
$SETUP_PROFILE_NAME = $settingsService->setupProfileName;
|
||||
|
||||
$iblockProperties = $settingsService->actrualPropList;
|
||||
$loadPurchasePrice = $settingsService->loadPurchasePrice;
|
||||
$iblockExport = $settingsService->iblockExport;
|
||||
$loadNonActivity = $settingsService->loadNonActivity;
|
||||
|
@ -568,7 +566,7 @@ if ($STEP === 1) {
|
|||
<input type="hidden" name="STEP" value="<?=$STEP + 1?>">
|
||||
<input type="hidden" name="SETUP_FIELDS_LIST" value="<?=
|
||||
$settingsService->getSetupFieldsString(
|
||||
$iblockProperties ?? [],
|
||||
array_keys($settingsService->actrualPropList) ?? [],
|
||||
$hlblockModule === true,
|
||||
$hlBlockList ?? []
|
||||
)
|
||||
|
|
|
@ -238,7 +238,7 @@ trait InstallerTrait
|
|||
|
||||
CheckDirPath($path);
|
||||
|
||||
$file = new \Bitrix\Main\IO\File($path . 'addProperty.txt', $siteId = null);
|
||||
$file = new \Bitrix\Main\IO\File($path . 'icml_property_retailcrm.txt', $siteId = null);
|
||||
|
||||
if (!$file->isExists()) {
|
||||
$file->putContents("");
|
||||
|
|
|
@ -265,7 +265,7 @@ class SettingsService
|
|||
global $APPLICATION;
|
||||
|
||||
$result = [];
|
||||
$text = $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . "/local/addProperty.txt");
|
||||
$text = $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . "/local/icml_property_retailcrm.txt");
|
||||
|
||||
if ($text === false) {
|
||||
return $result;
|
||||
|
@ -365,7 +365,7 @@ class SettingsService
|
|||
|
||||
public function setProps(): void
|
||||
{
|
||||
foreach ($this->actrualPropList as $prop => $text) {
|
||||
foreach (array_keys($this->actrualPropList) as $prop) {
|
||||
$this->setProperties($this->iblockPropertySku, 'iblockPropertySku_' . $prop);
|
||||
$this->setProperties($this->iblockPropertyUnitSku, 'iblockPropertyUnitSku_' . $prop);
|
||||
$this->setProperties($this->iblockPropertyProduct, 'iblockPropertyProduct_' . $prop);
|
||||
|
@ -441,7 +441,7 @@ class SettingsService
|
|||
{
|
||||
$values = 'loadPurchasePrice,SETUP_FILE_NAME,iblockExport,maxOffersValue,loadNonActivity';
|
||||
|
||||
foreach ($iblockProperties as $val => $text) {
|
||||
foreach ($iblockProperties as $val) {
|
||||
$values .= ',iblockPropertySku_' . $val
|
||||
. ',iblockPropertyUnitSku_' . $val
|
||||
. ',iblockPropertyProduct_' . $val
|
||||
|
@ -601,7 +601,7 @@ class SettingsService
|
|||
$props = [];
|
||||
|
||||
if (isset($oldValues[$iblockId])) {
|
||||
foreach ($this->actrualPropList as $prop => $text) {
|
||||
foreach (array_keys($this->actrualPropList) as $prop) {
|
||||
$fullKey = $keyGroup . '_' . $prop;
|
||||
$props[$prop] = $oldValues[$iblockId][$fullKey];
|
||||
}
|
||||
|
|
|
@ -1213,7 +1213,7 @@ function createCustomPropertyFile()
|
|||
|
||||
CheckDirPath($path);
|
||||
|
||||
$file = new \Bitrix\Main\IO\File($path . 'addProperty.txt', $siteId = null);
|
||||
$file = new \Bitrix\Main\IO\File($path . 'icml_property_retailcrm.txt', $siteId = null);
|
||||
|
||||
if (!$file->isExists()) {
|
||||
$file->putContents("");
|
||||
|
|
|
@ -23,7 +23,7 @@ class SettingServiceTest extends \BitrixTestCase
|
|||
|
||||
CheckDirPath($path);
|
||||
|
||||
$file = new \Bitrix\Main\IO\File($path . '/addProperty.txt', $siteId = null);
|
||||
$file = new \Bitrix\Main\IO\File($path . '/icml_property_retailcrm.txt', $siteId = null);
|
||||
|
||||
$file->putContents("property1 = test prop \n property2 = test prop 2");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue