VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Biggreuda on March 10, 2012, 18:05:18 PM

Title: Payment Info included in payment name - and destroing all layouts
Post by: Biggreuda on March 10, 2012, 18:05:18 PM
Hi,

i've spend several hours on this problem now, but i just can't find the problem.
We did set up some payment methods, one of those is a simple bank transfer.
In the payment info are the details (Bank name, account number, etc) stored in a simple html-table layout.
When a customer now chooses this payment, the confirmation mail and all order-views are messed up.
I checked the given variables for those sites and i found out, that for some reason virtuemart just adds all information it can find to the name.

A var_dump showed me ["paymentName"]=> string(257) "ÜberweisungVorkasse per Überweisung<table class=...."

"Überweisung" ist the name, "Vorkasse per Überweisung" is the description and then the payment info is added.
That would be bad enought, but it also cuts the info at some point, so that a table and some rows are opened and never closed, so that all the layout after that is messed up.

Can anybody please tell me, where this crap is happening?
I've searched thousands of codelines now and I don't know where else to look :(
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: Biggreuda on April 21, 2012, 22:07:33 PM
Hi all,

is there really nobody else with that problem?
I've updated to 2.0.6 now (and I'm fixing the layout now to match), but this problem is still there.

In line 175 of the file my_template/html/com_virtuemart/invoice/invoice_items.php there is the following line:
<td align="right" class="pricePad" colspan="6"><?php echo $this->orderDetails['paymentName']  ?><td>
The output is not just the payment name, but also the short and the long description. How can i cut that to the Name (and maybe short-descripition)?

Today someone ordered some stuff and chose the bank transfer, he received the "destroyed" e-mail and i've disabled the cart-funktion now...

Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: eloysanchez on June 29, 2012, 12:09:48 PM
Hi,

Did you find a solution?
I have the same problem.

Thanks
Eloy
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: masonwebdesign on November 27, 2012, 09:18:36 AM
I realise this is old... but try this in your HTML email override

Around line 176 in /templates/<template name>/html/com_virtuemart/invoice/invoice_items.php make changes to the following

   <?php
$paymentNewName str_replace("span","div",$this->orderDetails['paymentName']);
$pieces explode("<br />"$paymentNewName);
?>

<tr>
<td align="right" class="pricePad" colspan="4"><?php  echo $pieces[0]; ?></td>
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: Djirko on April 23, 2013, 17:55:42 PM
Hi,
i know this thread is old, but maybe someone already have the solution for this? Im using latest virtuemart.
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: antonino78 on June 22, 2013, 17:49:46 PM
Hello,
I know this thread is old, but unfortunately I see that the solution has not been found yet.
Please you can have the name of the separate payment from the payment information?  :'(
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: alatak on June 27, 2013, 11:16:07 AM
Hello

I have tested, and for me it works...
Even with some strange character in the payment name.

I cannot remove the payment description from the payment name just like that , because some people use it to give some extra information (like bank acount), and they want to have it also in the emails, and order details.
What i can do is to add templating of the plugin payments.
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: antonino78 on June 27, 2013, 11:30:41 AM
Hello,
the problem is that the name of the payment is attached to the information of the payment.
So it would be more correct to choose to see the two together or separate.
Example in the invoice I would see only the name of the payment.
then insert a tag, for example: payment_name (for the name of the fee) and a paypant_info (for payment information).
Now this choice can not be done because the two things are connected.

I hope I explained myself because my English is not correct, and I apologize for that  :-[
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: alatak on June 27, 2013, 13:49:12 PM
Hello

If I add templating on the payments, then you can do what you want :)
Everybody needs something different.
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: antonino78 on June 27, 2013, 13:54:06 PM
I hope this will be done soon.  :)
thank you very much
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: antonino78 on July 17, 2013, 14:16:49 PM
We are new to this solution?
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: alamise on July 21, 2013, 13:13:48 PM
i have the same problem
invoice too long with payment desc
i made this code

<?php 
$paymentNewName str_replace("span","div",$this->orderDetails['paymentName']);
//$pieces = explode("<br />", $paymentNewName);
$pieces strstr($paymentNewName,"<br />",true);
echo $pieces;
// echo $this->orderDetails['paymentName']
  ?>


      
explode() is a array
            
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: antonino78 on July 24, 2013, 17:33:04 PM
Quote from: alamise on July 21, 2013, 13:13:48 PM
i have the same problem
invoice too long with payment desc
i made this code

<?php 
$paymentNewName str_replace("span","div",$this->orderDetails['paymentName']);
//$pieces = explode("<br />", $paymentNewName);
$pieces strstr($paymentNewName,"<br />",true);
echo $pieces;
// echo $this->orderDetails['paymentName']
  ?>


      
explode() is a array
            

Hello,
please explain to me how this code?
Where do I enter it?
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: pixelofficer on August 28, 2013, 18:14:57 PM
Same problem here... It's unbelievable. There no even single space between name and description!!! During checkout there is at least <span> tag which I can use, but not in the invoice. It looks weird :(
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: Maxim Pishnyak on August 28, 2013, 19:40:07 PM
Quote from: pixelofficer on August 28, 2013, 18:14:57 PM
Same problem here... It's unbelievable. There no even single space between name and description!!! During checkout there is at least <span> tag which I can use, but not in the invoice. It looks weird :(
So did you try solution mentioned in this thread or not?
Title: Re: Payment Info included in payment name - and destroing all layouts
Post by: jenkinhill on August 28, 2013, 23:28:11 PM
Or is this the issue as invoice is mentioned:
http://forum.virtuemart.net/index.php?topic=117866.msg399034#msg399034