Skip to main content
added 691 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

The default head block in the backend is an instance of Mage_Adminhtml_Block_Page_Head (adminhtml/page_head). You need to override that also and add your method.
Even if Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head and you've overwritten Mage_Page_Block_Html_Head the block used in the backend still extends the original Magento class, and your methods is not present in it.
[EDIT]
Your blocks rewrite section should look like this:

<blocks>
    <page><!-- rewrite the frontend head block -->
        <rewrite>
            <html_head>Wsu_Storeutilities_Block_Html_Head</html_head>
        </rewrite>
    </page>
    <adminhtml><!-- rewrite admin head block -->
        <rewrite>
            <page_head>Wsu_Storeutilities_Block_Adminhtml_Page_Head</page_head>
        </rewrite>
    </adminhtml>
</blocks>

Then create the file Wsu/Storeutilities/Block/Adminhtml/Page/Head.php with this content:

<?php
class Wsu_Storeutilities_Block_Adminhtml_Page_Head extends Mage_Adminhtml_Block_Page_Head{
    //your methods here
}

The default head block in the backend is an instance of Mage_Adminhtml_Block_Page_Head (adminhtml/page_head). You need to override that also and add your method.
Even if Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head and you've overwritten Mage_Page_Block_Html_Head the block used in the backend still extends the original Magento class, and your methods is not present in it.

The default head block in the backend is an instance of Mage_Adminhtml_Block_Page_Head (adminhtml/page_head). You need to override that also and add your method.
Even if Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head and you've overwritten Mage_Page_Block_Html_Head the block used in the backend still extends the original Magento class, and your methods is not present in it.
[EDIT]
Your blocks rewrite section should look like this:

<blocks>
    <page><!-- rewrite the frontend head block -->
        <rewrite>
            <html_head>Wsu_Storeutilities_Block_Html_Head</html_head>
        </rewrite>
    </page>
    <adminhtml><!-- rewrite admin head block -->
        <rewrite>
            <page_head>Wsu_Storeutilities_Block_Adminhtml_Page_Head</page_head>
        </rewrite>
    </adminhtml>
</blocks>

Then create the file Wsu/Storeutilities/Block/Adminhtml/Page/Head.php with this content:

<?php
class Wsu_Storeutilities_Block_Adminhtml_Page_Head extends Mage_Adminhtml_Block_Page_Head{
    //your methods here
}
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

The default head block in the backend is an instance of Mage_Adminhtml_Block_Page_Head (adminhtml/page_head). You need to override that also and add your method.
Even if Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head and you've overwritten Mage_Page_Block_Html_Head the block used in the backend still extends the original Magento class, and your methods is not present in it.