Page 1 of 1

[SOLVED] Insert the payment_method_name in PhocaInvoice

Posted: 21 Jul 2010, 19:54
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!

Re: Insert the payment_method_name in PhocaInvoice

Posted: 23 Jul 2010, 14:49
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');

Re: [SOLVED] Insert the payment_method_name in PhocaInvoice

Posted: 23 Jul 2010, 15:12
by Benno
Ok.
Kind regards,
Benno