Hi all!
Does anyone have an idea, how to achieve that:
I want to display the payment method name, description and info in the order confirmation e-mail.
But: The only data I have in the order details object is the virtuemart_paymentmethod_id.
Thank you very much for any useful hint!
Kind regards,
Gerald
Hello all!
Seems as this would be a bit difficult...
I found out, there is also a field paymentName in the order details object, containing HTML code for payment method name and description (@VM team: a bit dirty hugh? ;) ).
Out of this HTML code I extracted the payment method name.
Also dirty - but it works for me :)
Any cleaner suggestions are very welcome!
Best regards,
Gerald
Hello,
Also I have the same problem.
Do you mind indicate how you solved?
Hi!
$tmp = $this->orderDetails['paymentName']; //contains string '<span class="vmpayment_name">Name</span><span class="vmpayment_description">Description</span>
$startpos = strpos($tmp,">") + 1;
$stoppos = strpos($tmp,"<",$startpos);
echo substr($tmp,$startpos,$stoppos - $startpos);
Very dirty though... ;)
Kind regards,
Gerald
Quote from: gba on April 15, 2015, 11:24:20 AM
Any cleaner suggestions are very welcome!
Kind regards,
Gerald
In VM3.0.18 ( IMHO many vers before) the full info is in the email
Hello GJC
You are right, the full info is in the e-mail. But breaking it apart and getting the string vmCartPaymentLogo, payment_name, payment_description and payment_info You have to add something like that gba suggests.
Just printing out $this->orderDetails['paymentName'] gives the whole shebang. Omitting or rearranging is impossible without breaking the tagged html string apart.
If You have a better idea extracting the data, please suggest :)
regards
Jörgen @ Kreativ Fotografi
yes.. true .. the whole thing is simply stored in the DB order
perhaps to make it easier just over ride the protected function renderPluginName ($plugin) in what ever payment you use then u can control how the name etc is made up and stored