Go to System - Configuration - Currency setup and change what you need there. You might need to do that in the store views if you have them or make it a website configuration.
And in allowed currencies add any currency you want to support (i suspect it is only USD).
Also remember to add the currency exchange rate in System - Manage currencies - Rates.
When you feel like 'the calculation is wrong', it always helps to look at the source code. When I look at \Magento\Directory\Model\Currency::convert()
(this is the inner method that \Magento\Directory\Helper\Data::currencyConvert()
uses), I see something interesting:
public function convert($price, $toCurrency = null)
{
if ($toCurrency === null) {
return $price;
} elseif ($rate = $this->getRate($toCurrency)) {
return $price * $rate;
}
This means that it converts the price to the rate that is set in the $toCurrency
. In your example your convert EUR to USD. I guess the rate of USD is 1.00, so when you're converting 14 USD * 1.00, you get 13.99 (I guess this is due to how floating numbers work?).
How to solve this? Well, you have your base price in USD, and you know that EUR has a rate of 0.75, so if you have code that fetches the base price of your product, loads the EUR rate and multiplies it with that you might be set to go. For example:
$basePrice = $product->getPrice();
$currency = $currencyFactory->create()->load('EUR');
$eurPrice = $currency->convert($basePrice, 'EUR');
Haven't tested it yet so I'm not sure if it works, only following the code. But perhaps it helps you finding your solution.
Best Answer
This happens by default - you have a base currency on which everything is configured and setup (product prices etc) and the other currencies the prices for which are calculated based on the current currency rate between the base. When an order is put through figures are stored against the order for all prices in both base and sale currency.