1

Trying to rewrite the "Product Review" (tab) grid inside customer edit page, below my code

my xml:

 <blocks>
          <adminhtml>
                <rewrite>
                      <review_grid>Myc_Adminhtml_Block_Review_Grid</review_grid>              
                </rewrite>
           </adminhtml>
 </blocks>

my extended class:

   class Myc_Adminhtml_Block_Review_Grid extends Mage_Adminhtml_Block_Review_Grid
    {

    public function __construct()
    {
        die('test');
        $this->setId('reviewcustomgrid');
        $this->setDefaultSort('created_at');
    }

    protected function _prepareCollection()
    {
       die('test');
       ......rest of collection code...

    }

is not rewriting the grid, i tried to put a die its always loading the Mage_Adminhtml_Block_Review_Grid.

is not the fist time i am doing rewrites, but this time i cant find the solution, there is something i am missing?

Thanks

UPDATE- Adminhtml is the module, i use this module to place all general rewrites. i have other blockS and modelS rewrites here

  • <blocks> in tag <global> ? – Alex Jul 3 '16 at 7:21
0

Mage_Adminhtml_Block_Review_Grid is the base class for two other block classes:

  1. Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Reviews - review grid in product tab
  2. Mage_Adminhtml_Block_Customer_Edit_Tab_Reviews - review grid in customer tab

So if you want to have your rewrite applied in all places, you need to rewrite these two classes as well.

  • It works! i thought i just had to edit the base class to edit the grid, really Thanks – Riccardo Rich Giacomelli Jul 14 '15 at 9:21
0

I think issue in

  <review_grid>Myc_Adminhtml_Block_Review_Grid</review_grid>   

After Myc modulename is missing

Myc_YOUR_MODULENAME_Block_Adminhtml_Review_Grid
  • Adminhtml is the module, i use this module to place all general rewrites. i have other block and model rewrites here – Riccardo Rich Giacomelli Jul 14 '15 at 9:03
  • in which place your are writing die? Can you show your whole file ? @RiccardoRichGiacomelli – Keyur Shah Jul 14 '15 at 9:08
  • see above, edited/updated my question – Riccardo Rich Giacomelli Jul 14 '15 at 9:13

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.