Good evening. Tell me, please, how to do it. There is an array: $ prods
Array ( [21020] => 1050 [19671] => 1000 ) And cycle
$basketItem->setFields(array( 'PRODUCT_ID' => '', 'CUSTOM_PRICE' => 'Y', 'PRICE' => '', )); I can not understand how to transfer values from an array to $ basketItem.
Where PRODUCT_ID is 17215 and 21020 and PRICE is 3200 and 1050, respectively.
foreach($prods as $k=>$v)$basketItem->setFields(['PRODUCT_ID'=>$k, 'PRICE'=>$v]);- vp_arth