I want to change the price of the order in the cart/checkout page. Let's say I have a product ABC with $100(USD) and I added that in cart. But after adding I want to change the currency to EUR and proceed with the checkout process. I tried to change the currency and amount in order like below:
$order = commerce_order_load(1234);
$amount = 100;
$order->commerce_order_total['und'][0]['amount'] = round($amount,2);
$order->commerce_order_total['und'][0]['currency_code'] = 'EUR';
$order->commerce_order_total['und'][0]['data']['components'][0]['price']['amount'] = round($amount,2);
$order->commerce_order_total['und'][0]['data']['components'][0]['price']['currency_code'] = 'EUR';
commerce_order_save($order);
But when I refresh the checkout or visit cart page, it's still in USD. So I need help in changing the currency of order based on user input in cart/checkout page or based on the field (currency) which admin has created for every product.