V
V
Volodya Gann2016-11-14 15:09:45
Programming
Volodya Gann, 2016-11-14 15:09:45

What code (method, function) to automatically activate the product property in Bitrix? Place the code in result_modifier?

How can a product property be automatically activated in Bitrix? The product has a "promotion" property. It is necessary that for all products on the site that fall under the condition, this property is activated.
I tried to automatically activate this property using the CIBlockProperty::Update and CIBlockElement::SetPropertyValues ​​methods. The property values ​​were changed, but the "Promotion" checkbox was not displayed on the product, and the checkbox was not active. How can this problem be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Saifullin, 2016-11-17
@nocfer

the CIBlockElement::SetPropertyValues ​​method should have worked.
What did you mean by
First, try to test the code on one product as in the example (change it to your own property)
https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
Under what condition do you want to activate the "Promotion" checkbox?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question