I want to convert product price from the current currency to base currency.
For Example, if the product price is 5000 INR. I want to convert 5000 INR to USD.
I don't know which core function will be best used for. Can anyone give me examples? Any function which is used for convert price to current to base and base to current?
Purpose: I am adding a product to cart programmatically, if a current currency is USD then it's working properly but if I switch currency as INR, added product price convert INR amount to USD. So I want to convert INR amount to USD.