Answer the question
In order to leave comments, you need to log in
How to write data from cookie to bitrix order property (template sale.order.ajax)?
When a visitor goes to the site, I extract data from the utm tag or data about the site from which they went (if the tag is missing) and write it to cookies.
Next, in the sale.order.ajax template, you need to extract this data and write it to the UTM_SOURCE property so that it is saved in the admin panel when placing an order.
Please tell me how can I do this?
Answer the question
In order to leave comments, you need to log in
If still relevant:
1. for all types of payers you have created acc. string property
2. hang on the event of adding an order: for example, OnSaleOrderSavedHandler in d7.
3. in case if the order is new and there is a non-empty corresponding cookie, iterate over the properties from the getPropertyCollection, update the value as needed, do a save() of the order.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question