Skip to content

Instantly share code, notes, and snippets.

@vporoshok
Last active August 29, 2015 14:13
Show Gist options
  • Save vporoshok/a0ef8c70662ff9bd6ae6 to your computer and use it in GitHub Desktop.
Save vporoshok/a0ef8c70662ff9bd6ae6 to your computer and use it in GitHub Desktop.
mass update iblock elements
<?php
CModule::IncludeModule('iblock');
$rsElements = CIBlockElement::GetList([
'NAME' => 'DESC'
], [
'IBLOCK_ID' => 13,
'SECTION_ID' => 80
]);
$element = new CIBlockElement;
while ($el = $rsElements->GetNext()) {
$res = $element->SetPropertyValuesEx($el['ID'], $el['IBLOCK_ID'], [
'YES_OR_NOT' => 3
]);
printf("%-11s => %-12s %s\n", $el['NAME'], $n_name, $res);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment