Question

I am having some problems rewriting __construct() method in Mage_Adminhtml_Block_Customer_Edit

My config.xml is as follows:-

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Mymodule_Customisation>
            <version>0.0.1</version>
        </Mymodule_Customisation>
    </modules>

<global>
    <blocks>
     <customisation>
      <class>Mymodule_Customisation_Block</class>
     </customisation>
     <adminhtml>
       <rewrite>                   <Customer_Edit>Mymodule_Customisation_Block_Adminhtml_Customer_Edit</Customer_Edit>
                </rewrite>
     </adminhtml>
    </blocks>
  </global>
</config>

I have got the Edit.php method under app/code/local/Mymodule/Customisation/Block/Adminhtml/Customer/Edit.php

My Class looks like this

    class Mymodule_Customisation_Block_Adminhtml_Customer_Edit extends Mage_Adminhtml_Block_Customer_Edit
    {
        public function __construct()
        {}
}

What am I doing wrong?

Was it helpful?

Solution

Nabeel.Issue was in config.xml file rewrite code <Customer_Edit> should be <customer_edit>

<rewrite> 
              <customer_edit>Mymodule_Customisation_Block_Adminhtml_Customer_Edit</customer_edit>
 </rewrite>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top