VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: Blazinoo on February 05, 2013, 16:15:06 PM

Title: change title vminvoice.pdf
Post by: Blazinoo on February 05, 2013, 16:15:06 PM
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

Title: Re: change title vminvoice.pdf
Post by: 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');
Title: Re: change title vminvoice.pdf
Post by: Blazinoo on February 06, 2013, 13:16:49 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');

Hello Reinhold,

thx a lot. it works :)

kind regards
Blazinoo
Title: Re: change title vminvoice.pdf
Post by: 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?
Title: Re: change title vminvoice.pdf
Post by: reinhold on April 26, 2013, 13:21:32 PM
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...
Title: Re: change title vminvoice.pdf
Post by: lacek_eshop on June 24, 2015, 08:56:43 AM
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

Title: Re: change title vminvoice.pdf
Post by: lacek_eshop on June 24, 2015, 10:44:27 AM
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');
Title: Re: change title vminvoice.pdf
Post by: lacek_eshop on June 25, 2015, 08:49:27 AM
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');