Answer the question
In order to leave comments, you need to log in
Mass transfer of values from a property to a sales catalog?
Hello!
Perhaps someone knows how to transfer the value from the property of an element (product) to the property of the same element, but in the sales catalog.
You need to put down the Coefficient of the unit of measure. I sell packages in which a different number of meters. The number of meters is specified in the property of the element, and how to massively transfer the whole thing - who knows.
Answer the question
In order to leave comments, you need to log in
To set the coefficients of measurement units, you can use the d7 class
Bitrix\Catalog\MeasureRatioTable
Here are ways to work with orm entities
Make a getlist by elements. Select the element id and the value of your property in it. Then, using Bitrix\Catalog\MeasureRatioTable, set the values for your products.
(the product id in CCatalogProduct matches the infoblock element id)
If you need to somehow automate this whole process, write an event handler for changing the infoblock element. In it, do the same for the element that has been updated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question