1

I am adding new logic to Affiliate module from MageStore. I want add MassAction for enabling/disabling coupons code in accounts. But when I add method _prepareMassaction, I have error when try disable coupon:

Uncaught ReferenceError: couponGrid_massactionJsObject is not defined is not defined
1
  • are you able to add what's in your _prepareMassaction
    – rob3000
    Commented Nov 3, 2015 at 8:39

2 Answers 2

2

Add below in Grid block of your module where you are facing the issue.

 protected function getAdditionalJavascript() {
       return 'window.couponGrid_massactionJsObject = couponGrid_massactionJsObject;';
//'window.{gridId}_massactionJsObject = {gridId}_massactionJsObject;';
    }
1

I found solution after reading
Mass action in widgets

I created custom class and override Mage_Adminhtml_Block_Widget_Grid_Massaction and changed method getJavaScript(). I removed var and it started work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.