VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Coding Central => Topic started by: sandomatyas on April 27, 2022, 11:19:41 AM

Title: Unnecessary line break in standard payment plugin
Post by: sandomatyas 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?
Title: Re: Unnecessary line break in standard payment plugin
Post by: sandomatyas 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;
Title: Re: Unnecessary line break in standard payment plugin
Post by: sandomatyas 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
Title: Re: Unnecessary line break in standard payment plugin
Post by: Milbo 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.