Page 2 of 2
Re: payment method in invoice
Posted: 06 Jan 2010, 00:26
by Tobiwankenobi
Hi,
try to change it on the backend, because it's stored in the database.
Components - Virtuemart - Store - List Payment Methods
Then change 'Cash on delivery' or add your new payment method.
Hope it helps...
Regards
Tobiwankenobi
Re: payment method in invoice
Posted: 06 Aug 2010, 17:27
by SamuTnT
Hi Guys.. i can't get this to work..what i've done is:
add
Code: Select all
$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();
in ps_delivery.php
then add
Code: Select all
$header['payment_method_name'] = $dbpm->p("payment_method_name");
in delivery.pdf.php
and in the end add
or
Code: Select all
$hD['dbpm']->p('payment_method_name')
...but nothing happens... what am i doing wrong??
Re: payment method in invoice
Posted: 07 Aug 2010, 12:23
by Jan
Hi, in the code, you have pasted here, there is no output code (no code which display something), so if you have not added some output then nothing will be displayed from your code.
Jan
Re: payment method in invoice
Posted: 01 Apr 2011, 11:33
by BW82299
I have to include the payment method too. But the solutions decribed before are not helpfull.
The variables should be changed in plugins/phocapdf/virtuemartpdfoutput.php, the invoice is generated in plugins/phocapdf/tmpl.invoice.php. Something like this: .JText::_('PLG_PHOCAPDF_VM_DELIVERY_PRINT_PAYMENT_METHOD_LBL').': </td><td width="35%">'.$a['payment_method_name'].'
But this code does not work, only PLG_PHOCAPDF_VM_DELIVERY_PRINT_PAYMENT_METHOD_LBL is shown in the .pdf.
The code $a['payment_method_name'] = sprintf("%08d", $dbb->payment_method_name); in the virtuemartpdfoutput.php results in 0000000.
The payment method is stored in the database `jos_vm_payment_method` payment_method_name. In my installation, delivery.pdf.php and phoca.tcpdf.php don´t exist.
Does anybody have an idea, where I´m wrong?
Re: payment method in invoice
Posted: 06 Jun 2011, 20:55
by SpaceJam
Hi
I also would like to include the payment_method in the invoice. I tried to call it in the virtuemartpdfoutput.php, but it doesn't work.
So maybe someone already has a solution for that problem?
Ok I found the solution. Just search in your virtuemartpdfoutput.php
Code: Select all
/*
$var = array('order_id' => $dbo->order_id);
$dbp = PhocaPDFVirtueMartHelper::dbQ('dbp', $var);
$a['payment_method'] = $dbp->payment_method_name;
*/
and decomment. Then call via $a['payment_method'] in your tmpl.invoice.php
Thanks in advance
Miriam
Re: payment method in invoice
Posted: 06 Jun 2011, 22:59
by Jan
Ok, thank you for the guide.
Jan
Re: payment method in invoice
Posted: 26 Jul 2011, 11:49
by adria17860
Hi
I tried the SpaceJam method
decomment this in virtuemartpdfoutput.php:
$var = array('order_id' => $dbo->order_id);
$dbp = PhocaPDFVirtueMartHelper::dbQ('dbp', $var);
$a['payment_method'] = $dbp->payment_method_name;
And call in tmpl.invoice.php:
'<td width="20%">'.JText::_('payment method').': </td><td width="35%">'. $a['payment_method'] .'</td>'
but doesn't show the payment_method
, please can you help me?