Author Topic: Unnecessary line break in standard payment plugin  (Read 1884 times)

sandomatyas

  • Jr. Member
  • **
  • Posts: 406
Unnecessary line break in standard payment plugin
« on: April 27, 2022, 11:19:41 AM »
When you use the standard payment plugin in the plgVmConfirmedOrder method there is a line:
$dbValues['payment_name'] = $this->renderPluginName ($method) . '<br />' . $method->payment_info;
It works well when you have payment_info but if you don't use it, you'll get an unnecessary <br /> after the plugin name
Could you please use this line break only if it's neccessary?

sandomatyas

  • Jr. Member
  • **
  • Posts: 406
Re: Unnecessary line break in standard payment plugin
« Reply #1 on: April 27, 2022, 11:25:57 AM »
Somehting like this
$dbValues['payment_name'] = $this->renderPluginName ($method);
if ( !empty($method->payment_info) ) $dbValues['payment_name'] .= '<br />' . $method->payment_info;

sandomatyas

  • Jr. Member
  • **
  • Posts: 406
Re: Unnecessary line break in standard payment plugin
« Reply #2 on: April 27, 2022, 16:05:40 PM »
Also the payment name has a span with class:
<span class="vmpayment_name">Pick up</span><br />payment_info
Could you please consider adding a class to payment_info as well?
Like:
<span class="vmpayment_name">Pick up</span><br /><span class="vmpayment_name">payment_info</span>
Maybe the <br /> could be also replaced with something css-based solution

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10626
  • VM4.0.232 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 4 on joomla 3
Re: Unnecessary line break in standard payment plugin
« Reply #3 on: April 30, 2022, 23:19:29 PM »
I hate and love to read stuff like that. Just browsing around, finding this, and .... yeh I have todo it directly. Otherwise it may get lost :-)
First is added.
But the second, I dont find the scoure.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/