outlet.ee Posted July 20, 2012 Share Posted July 20, 2012 (edited) How would you change the pdf invoice filename from order_id.pdf to invoice_number.pdf? I had a look at the tabs/adminorders.php but my knowledge is not enough for this so I messed everything up. Any ideas? Edited October 27, 2012 by outlet.ee (see edit history) Link to comment Share on other sites More sharing options...
fernandokerber Posted July 20, 2012 Share Posted July 20, 2012 (edited) Hi! Try to modify the PDF.php in Classes folder. Look for this code: return $pdf->Output(sprintf('%06d', self::$order->id).'.pdf', $mode); } /** * Product table with references, quantities... */ function ProdReturnTab() { global $ecotax; $header = array( array(self::l('Description'), 'L'), array(self::l('Reference'), 'L'), array(self::l('Qty'), 'C') and find this line (at the top of the code): return $pdf->Output(sprintf('%06d', self::$order->id).'.pdf', $mode); This line generate the invoice filename. Here you can view the documentation of the FPDF: http://www.fpdf.org/en/doc/output.htm Good Dev. EDIT: Remember to make a backup before anything... Edited July 20, 2012 by fernandokerber (see edit history) Link to comment Share on other sites More sharing options...
outlet.ee Posted October 27, 2012 Author Share Posted October 27, 2012 Thank you. It works! I just noticed the reply 3 months later accidentally. There used to be an email when there was a new reply to my posts but that seems not to be working any longer. Link to comment Share on other sites More sharing options...
samuel89 Posted January 3, 2014 Share Posted January 3, 2014 (edited) Sorry to bring this up.. Has it changed for PS 1.5.6? I can't seem to find any lines described here. Thanks. EDIT: For those who can't find it and using latest PS, it is in classes/pdf/HTMLTemplateInvoice.php. Cheers Edited January 3, 2014 by samuel89 (see edit history) Link to comment Share on other sites More sharing options...
hosteleriex Posted March 26, 2014 Share Posted March 26, 2014 Thank you. It works! I just noticed the reply 3 months later accidentally. There used to be an email when there was a new reply to my posts but that seems not to be working any longer. can you tell me as it has? "order->id" you change it by? Link to comment Share on other sites More sharing options...
muneebk Posted May 23, 2018 Share Posted May 23, 2018 how can i change the invoice name to the customer's name? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now