[SOLVED] Insert the payment_method_name in PhocaInvoice

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
Wundertyros
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Jul 2010, 15:16

[SOLVED] Insert the payment_method_name in PhocaInvoice

Post by Wundertyros »

Hello,

I want wo insert the payment_method_name in PhocaInvoice.

Unfortunately, the payment_method_name is not stored in the "jos_vm_orders"-DB-table.

Does anybody know how to solve this problem?

Thanks!
Last edited by Wundertyros on 23 Jul 2010, 14:56, edited 1 time in total.
Wundertyros
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Jul 2010, 15:16

Re: Insert the payment_method_name in PhocaInvoice

Post by Wundertyros »

Now I have solved the problem.

Simply add the following code in delivery.pdf.php :

$dbpm = new ps_DB;
$q = "SELECT * FROM #__{vm}_payment_method, #__{vm}_order_payment WHERE #__{vm}_order_payment.order_id=' ".$d['order_id']." ' ";
$q .= "AND #__{vm}_payment_method.payment_method_id=#__{vm}_order_payment.payment_method_id";
$dbpm->query($q);
$dbpm->next_record();

$details_payment = $dbpm->f("payment_method_name");


PDF-Setting in delivery.pdf.php:

$header['details_payment'] = $details_payment;

In phoca.tcpdf.php simply insert:
(for example)

$this->Cell(80,4,$hD['details_payment'],0,0,'L');
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: [SOLVED] Insert the payment_method_name in PhocaInvoice

Post by Benno »

Ok.
Kind regards,
Benno
Post Reply