Mulitcurrency for Ubercart 3 (Drupal 7)

Question: Does any solutions for Ubercart 3 (drupal 7) exist (like Drupal Ubercart: multi-currency? ) or tips for better realisation of such thing?

Answer: As one of solutions, i find and use this: in ubercart/store/uc_store.module add new define, for example

define('RUR',0.33);

where 0.33 — is difference between default currency and new currency (RUR). rur/dollar = 0.33 and in uc_currency_format function add this:


global $language;
if ($language->language=='ru') {
$sign = '$';
$thou = ',';
$dec = '.';
$value = $value / RUR;
$sign_after = FALSE;
};

And full function:


function uc_currency_format($value, $sign = NULL,
$thou = NULL, $dec = NULL) {
if ($value === NULL) {
return NULL;
}

$output = '';

$sign_after = variable_get('uc_sign_after_amount', FALSE);
$prec = variable_get('uc_currency_prec', 2);
if (is_null($sign)) {
$sign = variable_get('uc_currency_sign', '$');
}
if (is_null($thou)) {
$thou = variable_get('uc_currency_thou', ',');
}
if (is_null($dec)) {
$dec = variable_get('uc_currency_dec', '.');
};

// If the value is significantly less than the
//minimum precision, zero it.
if ($prec > 0 && round(abs($value), $prec + 1) $value = 0;
}

global $language;
if ($language->language=='ru') {
$sign = '$';
$thou = ',';
$dec = '.';
$value = $value / RUR;
$sign_after = FALSE;
};

// Force the price to a positive value and
// add a negative sign if necessary.
if ($value $value = abs($value);
$output .= '-';
}

// Add the currency sign first if specified.
if ($sign && !$sign_after) {
$output .= $sign;
}

// Format the number, like 1234.567 => 1,234.57
$output .= number_format($value, $prec, $dec, $thou);

// Add the currency sign last if specified.
if ($sign && $sign_after) {
$output .= $sign;
};

if ($value=='0') {
$output = t('free');
};
return $output;
}