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
payment method in invoice
-
- Phoca Newbie
- Posts: 3
- Joined: 23 Mar 2009, 17:31
Re: payment method in invoice
Hi Guys.. i can't get this to work..what i've done is:
add
in ps_delivery.php
then add
in delivery.pdf.php
and in the end add
or
...but nothing happens... what am i doing wrong??
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();
then add
Code: Select all
$header['payment_method_name'] = $dbpm->p("payment_method_name");
and in the end add
Code: Select all
$hD['payment_method_name']
Code: Select all
$hD['dbpm']->p('payment_method_name')
- Jan
- Phoca Hero
- Posts: 48398
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: payment method in invoice
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 31 Mar 2011, 14:03
Re: payment method in invoice
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?
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?
-
- Phoca Newbie
- Posts: 2
- Joined: 06 Jun 2011, 20:53
Re: payment method in invoice
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
and decomment. Then call via $a['payment_method'] in your tmpl.invoice.php
Thanks in advance
Miriam
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;
*/
Thanks in advance
Miriam
- Jan
- Phoca Hero
- Posts: 48398
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: payment method in invoice
Ok, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 28 Jun 2011, 12:42
Re: payment method in invoice
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?
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?