0

This is my xml:

<global>
    <blocks>
        <mynamespace_mymodule>
            <class>Mynamespace_Mymodule_Block</class>
        </mynamespace_mymodule>
        <adminhtml>
            <rewrite>
                <customer_edit_tab_view_accordion>Mynamespace_Mymodule_Block_Adminhtml_Customer_Edit_Tab_View_Accordion</customer_edit_tab_view_accordion>
            </rewrite>
        </adminhtml>
    </blocks>

This is the php code:

class Mynamespace_Mymodule_Block_Adminhtml_Customer_Edit_Tab_View_Accordion extends Mage_Adminhtml_Block_Customer_Edit_Tab_View_Accordion
{
    protected function _prepareLayout()
    {
        echo 1;
        exit();
    }
}

What did I missed ?

0

You have to keep below xml. Try below code,

<global>
    <blocks>
        <mynamespacemymodule>
            <class>Mynamespace_Mymodule_Block</class>
        </mynamespacemymodule>
        <adminhtml>
            <rewrite>
                <customer_edit_tab_view_accordion>Mynamespace_Mymodule_Block_Adminhtml_Customer_Edit_Tab_View_Accordion</customer_edit_tab_view_accordion>
            </rewrite>
        </adminhtml>
    </blocks>
</global>
  • thx for the reply, I did you modification, but still nothing. :( – Attila Naghi Aug 30 '16 at 13:41
  • have you change mymodule only inside blocks – Rakesh Jesadiya Aug 30 '16 at 13:44
  • yes , only inside the <blocks> – Attila Naghi Aug 30 '16 at 13:46
0

You don't need the mynamespace_mymodule node:

<global>
    <blocks>
        <adminhtml>
            <rewrite>
                <customer_edit_tab_view_accordion>Mynamespace_Mymodule_Block_Adminhtml_Customer_Edit_Tab_View_Accordion</customer_edit_tab_view_accordion>
            </rewrite>
        </adminhtml>
    </blocks>

Also make sure your code is in the folder structure dictated by the class name, i.e., it should be in Mynamespace/Mymodule/Block/Adminhtml/Customer/Edit/Tab/View/Accordion.php

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.