Bitrix - Установка свойства инфоблока
Войти

Bitrix - Установка свойства инфоблока

Bitrix - Установить свойство
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php 

foreach($arResult['OFFERS'] as $offer){    
    
  
$groups CIBlockElement::GetElementGroups(
      
$offer['PROPERTY_CML2_LINK_VALUE']
  );
        
        
$arr = Array($arr_id);
        while(
$arr $groups->Fetch()){
            
$section_id $arr["ID"];
        }    
        
        
CIBlockElement::SetPropertyValues(
           
$offer['ID'],
           
22,
           
$section_id,
           
"SECTION"
        
);
        
    }

?>
Теги:
php