Answer the question
In order to leave comments, you need to log in
Export of goods to Bitrix - how to display the values of the MORE_PHOTO property in one cell separated by commas?
I have an online store. On the product page, I want to display multiple images using MORE_PHOTO . But at the same time, so that when exporting and importing goods in EXCEL , several lines are not created for each product .
I solved the problem with importing goods to the site as follows:
Before this line in the php file /bitrix/modules/catalog/load_import/csv_new_run.php:
elseif ($arIBlockProperty[$cur_prop_id]["PROPERTY_TYPE"]=="F")
elseif ($arIBlockProperty[$cur_prop_id]["PROPERTY_TYPE"]=="F" && $arIBlockProperty[$cur_prop_id]["MULTIPLE"]=="Y")
{
$files = explode(',', $arRes[$i]);
$arFileFields = [];
foreach ($files as $file)
{
$file = trim($file);
if(preg_match("/^(ftp|ftps|http|https):\\/\\//", $file))
$file = CFile::MakeFileArray($file);
else
$file = CFile::MakeFileArray($io->GetPhysicalName($_SERVER["DOCUMENT_ROOT"].$PATH2IMAGE_FILES.'/'.$file));
$arFileFields[] = ['VALUE' => $file, 'DESCRIPTION' => ''];
}
$PROP[$cur_prop_id] = $arFileFields;
continue;
}
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