News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Change in Invoice.php to change pdf title

Started by rishabhchd19, March 30, 2017, 02:06:12 AM

Previous topic - Next topic

rishabhchd19

I have changed

      $path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'order'.$layout.'_'.$invoiceNumber.'.pdf');
      //$path .= shopFunctionsF::getInvoiceName($invoiceNumber, $layout).'.pdf';

Before it was:

      //$path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'order'.$layout.'_'.$invoiceNumber.'.pdf');
      $path .= shopFunctionsF::getInvoiceName($invoiceNumber, $layout).'.pdf';

why it was put to comment $path .= shopFunctionsF::getInvoiceName($invoiceNumber, $layout).'.pdf';  ?
The changes i have made gonna make problems? What was the reason behind making first line as a comment?

If i keep the first line under comment, then how can I change title of pdf from VMINVOICE to ORDERINVOICE with the second line?


alatak

Hello

Do an overwrite of the key COM_VIRTUEMART_FILEPREFIX_INVOICE , and it should work without having to hack the code which is a very bad idea.

rishabhchd19

Quote from: alatak on March 30, 2017, 11:06:23 AM
Hello

Do an overwrite of the key COM_VIRTUEMART_FILEPREFIX_INVOICE , and it should work without having to hack the code which is a very bad idea.

sorry no idea how to overwrite keys. I am a beginner.

rishabhchd19

Quote from: rishabhchd19 on March 30, 2017, 23:13:15 PM
Quote from: alatak on March 30, 2017, 11:06:23 AM
Hello

Do an overwrite of the key COM_VIRTUEMART_FILEPREFIX_INVOICE , and it should work without having to hack the code which is a very bad idea.

sorry no idea how to overwrite keys. I am a beginner.


I have done it. Thanks

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rishabhchd19

Overriding making change when Invoice download from Admin panel, at frontend when customer receives email of pdf invoice ni changes reflected..name remain same as 'vminvoice'