S
S
sagaton2021-11-08 12:10:53
1C-Bitrix
sagaton, 2021-11-08 12:10:53

How to set property value for all product categories?

There is an IB with a new property that has 3 values. How to add one property value to all product sections via API?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2021-11-08
@idruweb

1) getlist https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
2) setpropertyvaluesex https://dev.1c-bitrix.ru/api_help/iblock/classes/c...

S
sagaton, 2021-11-08
@sagaton

I'm trying to add a value for a property of this element, so
$ELEMENT_ID = 33; // element code
$PROPERTY_CODE = "Seasons"; // property code
$PROPERTY_VALUE = "Summer"; // property value
// Set a new value for the given property of the given element
CIBlockElement::SetPropertyValuesEx($ELEMENT_ID, 2, array($PROPERTY_CODE => $PROPERTY_VALUE));
But nothing works 61892b15d302f565383589.png
where I am, what I write wrong, please tell me.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question