VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: arcturus on September 13, 2019, 13:37:44 pm

Title: Currency code instead of currency name used in editing orders page in admin
Post by: arcturus on September 13, 2019, 13:37:44 pm
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):

Code: [Select]
if ($paymentTable->email_currency) {
$html .= $this->getHtmlRowBE ('STANDARD_EMAIL_CURRENCY', $paymentTable->email_currency );
}
can be replaced for
Code: [Select]
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.
Title: Re: Currency code instead of currency name used in editing orders page in admin
Post by: Milbo on September 16, 2019, 15:01:52 pm
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.
Title: Re: Currency code instead of currency name used in editing orders page in admin
Post by: arcturus on September 16, 2019, 19:31:31 pm
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
Code: [Select]
Email Currency 47
The solution could be
Code: [Select]
$html .= $this->getHtmlRowBE ('STANDARD_EMAIL_CURRENCY', shopFunctions::getCurrencyByID($paymentTable->email_currency, 'currency_code_3') );in line 218.

After this modification, it shows
Code: [Select]
Email Currency EURwhich is humanly readable.