A
A
Alexander2016-12-10 14:49:30
1C-Bitrix
Alexander, 2016-12-10 14:49:30

How to update a record in the information block of trade offers on the OnSuccessCatalogImport1C event?

There is an online store where the catalog of goods and the catalog of trade offers are formed on the basis of data from 1C.
The xml data files themselves from 1C are saved in the site root / xml folder, images of trade offers are saved separately in the site root / upload / xml_pic / folder, each picture is saved in its own folder with the name: product_id_ color id _ picture number . But trade offers that get into Bitrix from 1C do not contain the path to the picture. Therefore, after loading the data from 1C, it became necessary to update the entries in the information block of trade offers and give them the path to their picture.
What is the best way to implement this, write a handler for the OnSuccessCatalogImport1C event, or is there another option?
Is it possible in the OnSuccessCatalogImport1C handler to get the IDs of only those trade offers that have been changed after the exchange with 1C, in order to update the pictures only for them and not for all records, which can be very many?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question