Magento rewrite controllers Enterprise_ImportExport


Magento rewrite controllers Enterprise_ImportExport

All project I was joined are using rewrite block, model, helper or controllers. We need to change something, to add something new or to override something in core of Magento. Magento supported method way how to overwrite those these files.
And with Enterprise version, today I will demo rewrite a controllers: Enterprise_ImportExport_Adminhtml_Scheduled_OperationController



Step 1: create OperationController.php controller file with content:

class KhacTung_ImportExport_Scheduled_OperationController extends Enterprise_ImportExport_Adminhtml_Scheduled_OperationController
    //code custom here


Step 2: In etc/config.xml, init router and attribute before=”Enterprise_ImportExport_Adminhtml”

                        <KhacTung_ImportExport before="Enterprise_ImportExport_Adminhtml">KhacTung_ImportExport</KhacTung_ImportExport>


Last step, clear cache, reload and see result.


Thanks for watching!

Leave a Reply

Your email address will not be published. Required fields are marked *