5

I am making a custom grid for my extension and I wish to change the default error message that is being displayed when we select any massaction but we donot select any checkbox.

enter image description here

3

In the _prepareMassaction method of your grid block add this line:

$this->getMassactionBlock()
     ->setErrorText(
         Mage::helper('core')->jsQuoteEscape(
             Mage::helper('your_helper_alias')->__('Your message here')
         )
     );
4
  • Man!! how you find this stuff quickly – Bhupendra Jadeja Jul 30 '15 at 9:12
  • 1
    @Bhupendra. I had to do the same thing some time ago. – Marius Jul 30 '15 at 9:21
  • 1
    So where did you find it ... i tried to find it on google and core but i found it in abstract class. so i thought you have some magic trick :D – Bhupendra Jadeja Jul 30 '15 at 9:40
  • 2
    @Bhupendra. Look for the default text in the core files. You will find it here. This means you can access it from the mass action block. And in any grid block your can access the mass action block with $this->getMassactionBlock(). There is already a call to that block to _prepareMassaction, so I thought it can be placed in there. – Marius Jul 30 '15 at 11:03

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.