Код |
---|
$ELEMENT_ID = 392; $arFile = CFile::MakeFileArray($_SERVER["DOCUMENT_ROOT"]."/images/help.gif"); $arFile["MODULE_ID"] = "iblock"; $arFile["del"] = "Y"; $PROPERTY_VALUE["68"]["2033"] = $arFile; CIBlockElement::SetPropertyValueCode($ELEMENT_ID, "FILES", Array ("2033" => Array("VALUE"=>$arFile) ) ); //68 это id свойства, 2033 это id значения свойства, FILES символьный код множественного свойства типа файл |
Код |
---|
foreach ($product_found['PROPERTIES']['MORE_PHOTO']['PROPERTY_VALUE_ID'] as $property_value_id){ CIBlockElement::SetPropertyValueCode($product_found['ID'], "MORE_PHOTO", array($property_value_id => Array("del" => "Y") )); } |
Код |
---|
$PROPERTY_VALUE["68"]["2033"] = $arFile; |
Код |
---|
print_r($product_found['PROPERTIES']['MORE_PHOTO']); |
Код |
---|
$arFile = CFile::MakeFileArray($PHOTO_ID); $arFile["MODULE_ID"] = "iblock"; $arFile["del"] = "Y"; |
Цитата |
---|
Илья Шаляпин пишет:
Там создается или меняется переменная $PROPERTY_VALUE, но нигде не используется. |
Цитата |
---|
Евгений Малков пишет:
print_r($product_found['PROPERTIES']['MORE_PHOTO']); |
Код |
---|
Array ( [ID] => 860 [TIMESTAMP_X] => 2011-02-03 16:19:07 [IBLOCK_ID] => 10 [NAME] => Картинки [ACTIVE] => Y [SORT] => 30 [CODE] => MORE_PHOTO [DEFAULT_VALUE] => [PROPERTY_TYPE] => F [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => Y [XML_ID] => [FILE_TYPE] => jpg, gif, bmp, png, jpeg [MULTIPLE_CNT] => 1 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => N [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [USER_TYPE_SETTINGS] => [PROPERTY_VALUE_ID] => Array ( [0] => 114323 [1] => 114324 [2] => 114325 [3] => 114331 [4] => 114332 [5] => 114333 [6] => 114339 [7] => 114340 [8] => 114341 [9] => 114347 [10] => 114348 [11] => 114349 [12] => 114355 [13] => 114356 [14] => 114357 [15] => 114363 [16] => 114364 [17] => 114365 [18] => 114371 [19] => 114372 [20] => 114373 [21] => 114382 [22] => 114383 [23] => 114384 [24] => 114393 [25] => 114394 [26] => 114395 [27] => 114404 [28] => 114405 [29] => 114406 [30] => 114415 [31] => 114416 [32] => 114417 [33] => 114426 [34] => 114427 [35] => 114428 [36] => 114437 [37] => 114438 [38] => 114439 [39] => 114448 [40] => 114449 [41] => 114450 [42] => 114418 [43] => 114419 [44] => 114420 [45] => 114429 [46] => 114430 [47] => 114431 [48] => 114440 [49] => 114441 [50] => 114442 [51] => 114451 [52] => 114452 [53] => 114453 ) [VALUE] => Array ( [0] => 235 [1] => 236 [2] => 237 [3] => 240 [4] => 241 [5] => 242 &n |