0

I want to override the form container in import section of admin. here is my config.xml :

<global>
     <blocks>
         <editimport>
             <class>Company_Editimport_Block</class>
         </editimport>
         <adminhtml>
             <rewrite>
                 <import_edit>Company_Editimport_Block_Adminhtml_Import_Edit</import_edit>
             </rewrite>
         </adminhtml>
     </blocks>
 </global>

and also in Company/Editimport/Block/Adminhtml/Import/Edit.php I have:

 class Company_Editimport_Block_Adminhtml_Import_Edit extends
 Mage_ImportExport_Block_Adminhtml_Import_Edit {
     public function getHeaderText()
     { // changing the header of page
         return Mage::helper('importexport')->__('check if it changes');
     }
 }

It does not work, I checked all things for thousand times, What am I missing here?

1 Answer 1

0

You will most likely need to override the container class (Mage_Adminhtml_Block_Widget_Form_Container) itself, and be sure to define a unique block name or else it won't initiate, see:

You can also try to use an observer instead of rewriting, there is an event: adminhtml_widget_container_html_before in the container class you could also observe as a cleaner approach.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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