Look at the function currentConvert()
the price should be an float
replace $price=10;
with $price=10.00;
/**
* Convert currency
*
* @param float $amount
* @param string $from
* @param string $to
* @return float
*/
public function currencyConvert($amount, $from, $to = null)
{
if (empty($this->_currencyCache[$from])) {
$this->_currencyCache[$from] = Mage::getModel('directory/currency')->load($from);
}
if (is_null($to)) {
$to = Mage::app()->getStore()->getCurrentCurrencyCode();
}
$converted = $this->_currencyCache[$from]->convert($amount, $to);
return $converted;
}
Edit:
Go to System>Configuration>Currency Setup
and make sure the currencies you are using are selected in the Allowed Currencies setting.
Nb: Your error means that the convert method cannot find a rate !