I want to override a method insert Totals of this file :-
How can I do that? Can anyone please guide?
I saw this post : Changing PDF appearance which is quite good but still can't understand which file to make, where to make etc... We have our custom module in which we can do the stuff but I can not understand which file to make & where to put to override abstract class method.
Can anyone please guide step by step implementation of this?
Here is the further update :- What I tried is : in my config.xml file I put this :-
<sales> <rewrite><order_pdf_invoice>Promotion_Multidiscount_Model_Sales_Order_Pdf_Invoice</order_pdf_invoice> </rewrite> </sales>
And I copied code/core/Mage/Sales/Model/Order/Pdf/Invoice.php in my module's folder that is code/local/Promotion/Multidiscount/Model/Sales/Order/Pdf/Invoice.php & I modified that particular function only & kept rest of the functions as it is but now this error coming when I go to Invoice of any order & click Print button.
Fatal error: Uncaught Error: Call to a member function getPdf() on boolean in /opt/lampp/htdocs/magento_store/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php:119 Stack trace: #0 /opt/lampp/htdocs/magento_store/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php(489): Mage_Adminhtml_Controller_Sales_Invoice->printAction() #1 /opt/lampp/htdocs/magento_store/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_Order_InvoiceController->printAction() #2 /opt/lampp/htdocs/magento_store/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('print') #3 /opt/lampp/htdocs/magento_store/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #4 /opt/lampp/htdocs/magento_store/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch() #5 /opt/lampp/htdocs/magento_store/app/Mage.php(683): Mage in /opt/lampp/htdocs/magento_store/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php on line 119
Url is like this :- http://localhost/magento_store/index.php/admin/sales_order_invoice/print/invoice_id/43/key/be7b6b59159f5523398350f73d1236c2/