Skip to content

Instantly share code, notes, and snippets.

@Pum-purum
Created August 3, 2018 08:42
Show Gist options
  • Save Pum-purum/f071d4cc6d07e15356031297da4604bb to your computer and use it in GitHub Desktop.
Save Pum-purum/f071d4cc6d07e15356031297da4604bb to your computer and use it in GitHub Desktop.
Получение ID свойства типа список по его XML_ID
function getPropertyEnumIdByXmlId($iBlockID, $xmlId)
{
$property_enums = CIBlockPropertyEnum::GetList(Array(), Array("IBLOCK_ID" => $iBlockID, "XML_ID" => $xmlId));
if ($enum_fields = $property_enums->GetNext()) {
return $enum_fields["ID"];
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment