VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: alf1234 on June 12, 2012, 12:09:56 PM

Title: change the PDF invoice filename format
Post by: 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.
Title: Re: change the PDF invoice filename format
Post by: blackrat999 on September 23, 2012, 22:29:19 PM
me too !
Title: Re: change the PDF invoice filename format
Post by: jack19 on September 25, 2012, 17:30:44 PM
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
Title: Re: change the PDF invoice filename format
Post by: blackrat999 on September 25, 2012, 18:20:42 PM
Nice one that works great thanks
Title: Re: change the PDF invoice filename format
Post by: dorex on April 10, 2013, 16:21:51 PM
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
Title: Re: change the PDF invoice filename format
Post by: Uke on October 07, 2013, 23:18:17 PM
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!
Title: Re: change the PDF invoice filename format
Post by: Ints78 on November 06, 2013, 15:38:55 PM
Does anyone now knows how to change the pdf invoice filename on V2.0.24?
Title: Re: change the PDF invoice filename format
Post by: Ints78 on November 14, 2013, 10:54:29 AM
does anyone know?
Title: Re: change the PDF invoice filename format
Post by: ocean1 on November 27, 2013, 11:24:21 AM
Can the invoice filename also be made in multi language?