diff --git a/bitrix/php_interface/init.php b/bitrix/php_interface/init.php index 8229b40..575eff8 100644 --- a/bitrix/php_interface/init.php +++ b/bitrix/php_interface/init.php @@ -505,6 +505,8 @@ function OnBeforeIBlockElementUpdateHandler(&$arFields) else { $arFields['PROPERTY_VALUES'][$properties['ADVERTISING']] = ''; + $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = ''; + $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']] = ''; $arFields['ACTIVE'] = 'N'; } } @@ -512,8 +514,18 @@ function OnBeforeIBlockElementUpdateHandler(&$arFields) else { //очистка ЕРИР и образца - $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0]."" => [ 'VALUE' => '' ] ]; - $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']])[0]."" => [ 'VALUE' => '' ] ]; + if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])) + { + $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0]."" => [ 'VALUE' => '' ] ]; + } + if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']])) + { + $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']])[0]."" => [ 'VALUE' => '' ] ]; + } + if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']])) + { + $arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']])[0]."" => [ 'VALUE' => '' ] ]; + } } } } diff --git a/local/components/evolution/about.news.list/component.php b/local/components/evolution/about.news.list/component.php index 58a2b73..653af9f 100644 --- a/local/components/evolution/about.news.list/component.php +++ b/local/components/evolution/about.news.list/component.php @@ -21,7 +21,8 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true)))) { $arResult = []; $sort = Array("ACTIVE_FROM" => "DESC", "NAME" => "ASC"); - $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 6); + $filter = Array("IBLOCK_ID" => 6); + if(!isset($_GET['advertise'])) { $filter["ACTIVE"] = "Y"; } $options = Array("nPageSize" => isset($_GET['advertise']) ? 10000 : 4); $res = CIBlockElement::GetList($sort, $filter, false, $options); diff --git a/local/components/evolution/catalog.landing.promo.model/templates/.default/template.php b/local/components/evolution/catalog.landing.promo.model/templates/.default/template.php index d8b4f3e..1ab51d7 100644 --- a/local/components/evolution/catalog.landing.promo.model/templates/.default/template.php +++ b/local/components/evolution/catalog.landing.promo.model/templates/.default/template.php @@ -14,44 +14,46 @@ $this->setFrameMode(true); ?> if(count($arResult['MODELS']) > 0): ?> foreach($arResult['MODELS'] AS $model): ?> -
Стоимость авто
-- - = number_format($arResult['PROPERTIES']['PRICE_WITH_DISCOUNT']['VALUE'] > 0 ? $arResult['PROPERTIES']['PRICE_WITH_DISCOUNT']['VALUE'] : $arResult['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> ₽ - - -
-