-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overwrite \Mage_Adminhtml_Sales_OrderController::pdfinvoicesAction to include custom invoice name #215
Comments
sure, that it is for :-) |
Vielen Dank. :-( |
Under Configuration->SALES->PDF Print-outs->Invoice "Filename Export Pattern" |
Sales -> Orders -> Order No. 123456 -> Invoice. Everything perfect. Thanks !! Sales -> Orders -> SELECT visble order no. 12345 and select actions "Print": does not work. Here comes invoice2015-02-15_16-10-02.pdf Is there a solution? |
I think this controller is not yet overwritten. This needs to be done by someone. You can use https://github.com/firegento/firegento-pdf/blob/development/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php as a starting point. |
I have 3 Controller overwritten. |
Do you overwrite |
This ist the code from InvoiceController.php: _initInvoice(); if ($invoiceId = $this->getRequest()->getParam('invoice_id')) { if ($invoice = Mage::getModel('sales/order_invoice') ->load($invoiceId) ) { $pdf = Mage::getModel('sales/order_pdf_invoice') ->getPdf(array($invoice)); $this->_prepareDownloadResponse( Mage::helper('firegento_pdf') ->getExportFilename('invoice', $invoice), $pdf->render(), 'application/pdf' ); } } else { $this->_forward('noRoute'); } } } |
What do you mean by this? |
Yo write: "Do you overwrite \Mage_Adminhtml_Sales_OrderController::pdfinvoicesAction ? " What do you mean by this? |
This is the controller action which handles the pdf printing in the order view. I don't know why, but it seems, that our module isn't overwriting this action yet. So what you want is not available as feature yet (imho). To implement this feature, someone needs to overwrite this controller action, we will. When we find some time. If you need it earlier, either you do it or find some one who does it :-) Of course we are both @sprankhub and me for hire ;-) |
Ok. Thanks for the work. |
The problem is that the placeholders ({{invoice_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}}) are not applicable if there is more than one document. Hence, I vote for a new configuration field like "Filename Export Pattern for Multiple Documents". |
Thanks for the information. Question: An Extension for Print Order Confirmation documents. Is it possible to integrate it? |
I do not exactly know what you mean. But I can tell you that there is another issue #200 which handles the order PDFs. |
extended filename patterns, fixes #215
Hi.
How and where can I change the file name:
From invoice to RECHNUNG or shipment to VERSAND?
Can I use the customer name to add to the file name?
thanks
The text was updated successfully, but these errors were encountered: