Answer the question
In order to leave comments, you need to log in
How to add an image (or several) to the multiple property of a Bitrix infoblock if it already has several images?
Let's say the infoblock has a multiple property for storing images with the PHOTO character code.
When I just need to add a new element with images, I do something like this:
$photoIBadd[] = array();
$el = new CIBlockElement;
$photoPropIBadd[] = CFile::MakeFileArray("http://и_так_далее_путь_до_изображения.jpg");
$photoPropIBadd[] = CFile::MakeFileArray("http://и_так_далее_путь_до_изображения_ещё_одного.jpg");
$arLoadProductArray = Array(
"MODIFIED_BY" => $USER->GetID(),
"IBLOCK_SECTION_ID" => false,
"IBLOCK_ID" => 1,
"NAME" => $name,
"ACTIVE" => "Y",
"CODE" => $code,
"PROPERTY_VALUES" => array(
"PHOTO"=>$photoPropIBadd
)
);
$PRODUCT_ID = $el->Add($arLoadProductArray);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question