Answer the question
In order to leave comments, you need to log in
How to convert product price in cart in mutator.php?
Hello!
Why is the cart price conversion that happens in mutator.php not visible in script.js? I do currency conversion in mutator
$result['BASKET_ITEM_RENDER_DATA'] = array();
foreach ($this->basketItems as $row)
{
$rowData = array(
'ID' => $row['ID'],
'PRODUCT_ID' => $row['PRODUCT_ID'],
'NAME' => isset($row['~NAME']) ? $row['~NAME'] : $row['NAME'],
'FULL_PRICE' => $row['FULL_PRICE'],
);
$rowData["FULL_PRICE"] = CCurrencyRates::ConvertCurrency($rowData["FULL_PRICE"], 'RUB', "USD");
$result['BASKET_ITEM_RENDER_DATA'][] = $rowData;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question