Question

I have added a mass action using the following:

<?php

class Module_Groupfeatures_Block_Catalog_Product_Grid extends Mage_Adminhtml_Block_Catalog_Product_Grid
{

    protected function _prepareMassaction()
    {
        parent::_prepareMassaction();

        $groups = $this->helper('customer')->getGroups()->toOptionArray(); 
        $this->getMassactionBlock()->addItem('groupfeatures_setGroupPrice', array(
                'label' => Mage::helper('catalog')->__('Apply Group Price'),
                'url' => $this->getUrl('*/applyprice/inbulk', array('_current' => true)),
                //'confirm' => $this->__("It is recommended that product indexing be disabled before continue"),
                'additional' => array(
                    'visibility' => array(
                        'name' => 'groupfeatures_Selectedgroup',
                        'type' => 'select',
                        'class' => 'required-entry',
                        'label' => Mage::helper('customer')->__('Group'),
                        'values' => $groups
                    ),
                    'additional'=>array(
                        'name' => 'groupfeatures_priceToApply',
                        'type' => 'text',
                        'class' => 'validate-number required-entry',
                        'required' => true,
                        'label' => Mage::helper('customer')->__('Group Price'),
                        'value' => ""

                    )
                )
            )
        );

    }
}

This outputs:

Custom Admin Product Grid Actions

When I select products and submit I can get the product IDs using $this->getRequest()->getParams(); but I am unable to get the custom action values by dumping ...->getParams().

Was it helpful?

Solution

You tried below code

Mage::app()->getRequest()->getParam('param1');

"param1" - request parameter

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