News:

Looking for documentation? Take a look on our wiki

Main Menu

pdf document names

Started by cristina, May 22, 2012, 19:35:11 PM

Previous topic - Next topic

cristina

Hi,
each time you click on "invoice" in the order list you get a pdf document with the name "Joomla.pdf".
I would like to change this doc name to something more meaningful like "invoicexxxxxx.pdf".
Can someone tell me if it is possible?

Thank a lot
Cristina
VM 4.0.22 10864 - Joomla! 4.3.2 - php 8.0.27

Master_gray

Hi

Can you send a screenshot?
Did you change the name in the (shop) menu in VM,see if it works.

cristina

Hi,
I do not know what screen shot I should attach.
The page I'm referring to is the standard "orders" page of VM.
If you click on the "invoice" image of any order, it creates a pdf file and sends it to your browser.
If you use firefox on mac the result is that your browser will ask you to save a document with the name Joomla.pdf.
If you use firefox on a pc, it will open a popup with the pdf in it, and if you click the save it will prompt you to save a "index.pdf" document.
I would like to know if there is a way to gice the document a meaningful name.

Cristina
VM 4.0.22 10864 - Joomla! 4.3.2 - php 8.0.27

Master_gray

Hi there sorry for taking so long been busies,

Try going to "Global Configuration" in joomla and then "server" under mail settings change the "From name" see if it works and tell me please.
If it does not work i will see what i can do.

Best regards Master_gray.

Nimeshin

Hi all

did you manage to figure this out? i also want to change the  invoice pdf document name that gets attached to the email that is sent to the customer. Want to remove the "vm" part.

Thanks

dorex



Same problem here, and I see that there's no solution for it.
I did the following and didn't work.
Quote from: Master_gray on June 19, 2012, 14:13:20 PM
Try going to "Global Configuration" in joomla and then "server" under mail settings change the "From name" see if it works and tell me please.
If it does not work i will see what i can do.

Best regards Master_gray.

Please help.

Thank you
PHP 5.2.17 - Joomla 2.5.8 - Virtuemart 2.0.16


dorex

Quote from: Nimeshin on April 10, 2013, 08:37:48 AM
Hi

check solution here for pdf invoice renaming

http://forum.virtuemart.net/index.php?topic=103837.new;topicseen#new



Thank you for your quick response. I tried that, but it didn't work. 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.

PHP 5.2.17 - Joomla 2.5.8 - Virtuemart 2.0.16

sr9yar

for VM2 edit this line :
   $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vm'.$layout.'_'.$invoiceNumber.'.pdf');
   ta -da !!! ta -da !!! ta -da !!! ta -da !!! ta -da !!! ta -da !!! ta -da !!!