Author Topic: Currency code instead of currency name used in editing orders page in admin  (Read 415 times)

arcturus

  • Jr. Member
  • **
  • Posts: 111
  • VirtueMart Version: 3.6.10 10211
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.
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.15 and VM 3.6.10 10211 on PHP 7.3.9

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Currency code instead of currency name used in editing orders page in admin
« Reply #1 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

arcturus

  • Jr. Member
  • **
  • Posts: 111
  • VirtueMart Version: 3.6.10 10211
Re: Currency code instead of currency name used in editing orders page in admin
« Reply #2 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.
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.15 and VM 3.6.10 10211 on PHP 7.3.9