When a customer clicks print invoice in their account now it shows the (crappy styled) invoice on screen and a print dialog

I would prefer to not use this and instead when a user clicks the print invoice button, that a pdf is shown which can be saved or printed.

Is that possible?

  • Yes this is possible. And it is one feature FireGento_Pdf offers (beside the main feature to rewrite the pdf rendering engine, but this can be deactived) so have a look into this module – Fabian Blechschmidt Nov 28 '14 at 19:06
  • so i would need to use a module to show pdf's... it is not in magento by default? – carlo Nov 28 '14 at 19:16
  • Yes, either a module which exists or one you write yourself. I recommend to have your own module, FireGento_Pdf does a lot more than you need. Only pick the snippets you need. – Fabian Blechschmidt Dec 1 '14 at 8:59

There is no way with plain magento to prepare a download response by clicking the print invoice button.

You could overwrite the controller action in a custom module like this:

require Mage::getModuleDir('controllers','Mage_Sales') . DS . 'OrderController.php';

class Namespace_Module_Sales_OrderController extends Mage_Sales_OrderController{

     * Print Order Action
    public function printAction()
        if (!$this->_loadValidOrder()) {
         * your custom code for download pdf here

and in config.xml you need to populate the controller for mage sales:

                    <namespace_module before="Mage_Sales">Namespace_Module_Sales</namespace_module>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.