Currency code instead of currency name used in editing orders page in admin

Started by man.of.earth, September 13, 2019, 13:37:44 PM

Previous topic - Next topic

man.of.earth

Hello,
I noticed that on the admin order edit page (standard payment plugin) it is used the currency code instead of currency name (the latter is more humanly readable):

if ($paymentTable->email_currency) {
$html .= $this->getHtmlRowBE ('STANDARD_EMAIL_CURRENCY', $paymentTable->email_currency );
}

can be replaced for
if ($paymentTable->email_currency) {
$html .= $this->getHtmlRowBE ('STANDARD_EMAIL_CURRENCY', $paymentTable->payment_currency );
}

in /plugins/vmpayment/standard/standard.php, lines 217-219

Later edit: this is wrong; see edits in the following messages.

Milbo

The email currency is always the same as the payment currency? I doubt that. Paypal has a special option, you see anything in currency x, but you pay in y.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

man.of.earth

Right, they can be different, indeed.
However, what I meant was to express the currency as its name, rather than its code.
For example, for euros, it shows
Email Currency 47

The solution could be
$html .= $this->getHtmlRowBE ('STANDARD_EMAIL_CURRENCY', shopFunctions::getCurrencyByID($paymentTable->email_currency, 'currency_code_3') );
in line 218.

After this modification, it shows
Email Currency EUR
which is humanly readable.