58 public function setItemData($basketCode, &$productData, &$item)
60 if ($basketCode != $productData[
"BASKET_CODE"])
61 $productData[
"BASKET_CODE"] = $item->getBasketCode();
63 if(isset($productData[
"OFFER_ID"]) && intval($productData[
"OFFER_ID"]) > 0)
64 $productData[
"PRODUCT_ID"] = $productData[
"OFFER_ID"];
66 $itemFields = array_intersect_key($productData, array_flip($item::getAvailableFields()));
68 if(isset($itemFields[
"MEASURE_CODE"]) && $itemFields[
"MEASURE_CODE"] <>
'')
70 $measures = $this->builder->getCatalogMeasures();
72 if(isset($measures[$itemFields[
"MEASURE_CODE"]]) && $measures[$itemFields[
"MEASURE_CODE"]] <>
'')
73 $itemFields[
"MEASURE_NAME"] = $measures[$itemFields[
"MEASURE_CODE"]];
78 if(!empty($productData[
"PROVIDER_DATA"]) && !$this->builder->isNeedUpdateNewProductPrice() && CheckSerializedData($productData[
"PROVIDER_DATA"]))
80 $providerData = unserialize($productData[
"PROVIDER_DATA"], [
'allowed_classes' =>
false]);
83 if (is_array($providerData) && !empty($providerData))
85 $this->builder->sendProductCachedDataToProvider($item, $this->builder->getOrder(), $providerData);
88 if(!empty($productData[
"SET_ITEMS_DATA"]) && CheckSerializedData($productData[
"SET_ITEMS_DATA"]))
89 $productData[
"SET_ITEMS"] = unserialize($productData[
"SET_ITEMS_DATA"], [
'allowed_classes' =>
false]);
91 $this->builder->setBasketItemFields($item, $itemFields);