A
A
Artyom2018-02-16 20:09:04
1C-Bitrix
Artyom, 2018-02-16 20:09:04

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

2 answer(s)
Q
Q133, 2018-02-18
@pursu1t

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.

S
Sergey Epifanov, 2018-02-16
@kacheleff

Have a look at CSaleOrderPropsValue::Update

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question