News:

Looking for documentation? Take a look on our wiki

Main Menu

change title vminvoice.pdf

Started by Blazinoo, February 05, 2013, 16:15:06 PM

Previous topic - Next topic

Blazinoo

Hi,

pls can anyone here tell me how to change title of the vm-created invoice PDF sent over email?
right now it has name 'vminvoice_number.pdf'
i would like change it into 'otherlanguage_number.pdf"... but where i can do that?

thx in advance

Blazinoo


reinhold

File components/com_virtuemart/controllers/invoice.php, line 89:
          $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vminvoice_'.$invoiceNumber.'.pdf');

Blazinoo

Quote from: reinhold on February 06, 2013, 01:00:34 AM
File components/com_virtuemart/controllers/invoice.php, line 89:
          $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vminvoice_'.$invoiceNumber.'.pdf');

Hello Reinhold,

thx a lot. it works :)

kind regards
Blazinoo

Djirko

Quote from: reinhold on February 06, 2013, 01:00:34 AM
File components/com_virtuemart/controllers/invoice.php, line 89:
          $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vminvoice_'.$invoiceNumber.'.pdf');
Is it possible $invoiceNumber change with $orderNumber?

reinhold

#4
Quote from: Djirko on April 26, 2013, 13:06:16 PM
Quote from: reinhold on February 06, 2013, 01:00:34 AM
File components/com_virtuemart/controllers/invoice.php, line 89:
          $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vminvoice_'.$invoiceNumber.'.pdf');
Is it possible $invoiceNumber change with $orderNumber?

Yes, simply use $orderDetails['details']['BT']->order_number instead of $invoiceNumber...

lacek_eshop

hello,
please help me
i have same problem. i need rename title in file .pdf.

i have VM3.0.9 and J.2.5.28
and i have this code in invoice.php (line 225)
//$path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vm'.$layout.'_'.$invoiceNumber.'.pdf');
$path .= shopFunctionsF::getInvoiceName($invoiceNumber, $layout).'.pdf';


after editing code

//$path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vm'.$layout.'_'.$invoiceNumber.'.pdf');
$path .= shopFunctionsF::getInvoiceName($this->orderDetails['details']['BT']->order_number, $layout).'.pdf';


generated title only vminvoice_.pdf ??? ???


you do not know what I'm doing wrong?

and please know where I changed vninvoice a different text?

thank you

lacek


lacek_eshop

it displays the invoice number in the title ::)
I had a mistake in$this->orderDetails['details']['BT']->order_number, $layout


good code$orderDetails['details']['BT']->order_number. in $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vm'.$layout.'_'.$orderDetails['details']['BT']->order_number.'.pdf');

lacek_eshop

this solution at least "for mee"

invoice.php Line 224 >>    $path .= 'Faktura_' . $orderDetails['details']['BT']->order_number . '.pdf';  instead  $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vm'.$layout.'_'.$orderDetails['details']['BT']->order_number.'.pdf');