Question

im working on Magento 1.9.3
i'm trying to override the admin grid of a custom module.
The original module strucutre is:

Miravist
- Helpdesk
-- Block
--- Adminhtml
---- Ticket
----- Grid.php

original module config.xml

<blocks>
  <helpdesk>
    <class>Mirasvit_Helpdesk_Block</class>
  </helpdesk>
</blocks>

my module config.xml is

...
    <global>
        <blocks>
            <helpdesk>
                <rewrite>
                    <adminhtml_ticket_grid>MyCompany_Helpdesk_Block_Adminhtml_Ticket_Grid</adminhtml_ticket_grid>
                </rewrite>
            </helpdesk>
        </blocks>
...

For what i've found around it should works but it does not. Any help?

--EDIT--
what i'm trying to do is override protected function _prepareColumns() maybe is it the problem?

Was it helpful?

Solution

i have changed

MyCompany_Helpdesk_Block_Adminhtml_Ticket_Grid extends Mirasvit_Helpdesk_Block_Adminhtml_Ticket_Grid

with

MyCompany_Helpdesk_Block_Adminhtml_Ticket_Grid extends Mage_Adminhtml_Block_Widget_Grid

and now it works.

But in this way i had to override the whole class non just the protected function _prepareColumns()

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top