News:

Support the VirtueMart project and become a member

Main Menu

change the PDF invoice filename format

Started by alf1234, June 12, 2012, 12:09:56 PM

Previous topic - Next topic

alf1234

Hi,

how do i change the first part of the PDF filename that is prefixed to the invoice numbers on the filenames?
eg:

vminvoice_xxxxxxxxxxxxxxxx.pdf

i want to have change "vminvoice_" to something else, or remove it completely and just have the invoice number.

thanks.


jack19

Quote from: alf1234 on June 12, 2012, 12:09:56 PM
Hi,

how do i change the first part of the PDF filename that is prefixed to the invoice numbers on the filenames?
eg:

vminvoice_xxxxxxxxxxxxxxxx.pdf

i want to have change "vminvoice_" to something else, or remove it completely and just have the invoice number.

thanks.
Hi,
file components/com_virtuemart/controller/invoice.php line 88
like:
path .= vminvoice_'.$invoiceNumber.'.pdf';
changes as you want e.g.
$path .= 'Fattura_'.$invoiceNumber.'.pdf';
Rgds
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

blackrat999


dorex

Hi,

I've encountered the same problem. My invoices are named "joomla.pdf".    I tried the following:

Quote from: jack19 on September 25, 2012, 17:30:44 PM
Hi,
file components/com_virtuemart/controller/invoice.php line 88
like:
path .= vminvoice_'.$invoiceNumber.'.pdf';
changes as you want e.g.
$path .= 'Fattura_'.$invoiceNumber.'.pdf';
Rgds

but it didn't work for me. I think it's because of the whitespaces in my invoice number:  e.g. "Serie DOC-2013 No. 0001"

I think in the file:  /components/com_virtuemart/controllers/invoice.php

I should alter the following line somehow to remove the whitespaces from the invoice number, before using it to name the pdf file:

$path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vminvoice_'.$invoiceNumber.'.pdf');

Can anyone help me with this one?

Thank you in advance.

PS:  I've found another post regarding this issue, but the solution there didn't work either:  http://forum.virtuemart.net/index.php?topic=102979.msg386181#msg386181
PHP 5.2.17 - Joomla 2.5.8 - Virtuemart 2.0.16

Uke

Hello!

Does someone know how to change the pdf invoice filename on V2.0.24? I could not find out where the filename is set because the code has changed in the new version.

Thanks!

Ints78

Does anyone now knows how to change the pdf invoice filename on V2.0.24?


ocean1

Can the invoice filename also be made in multi language?