I have a magento module that I am developing to import products into magento. I have a grid in which the user can select their products and import them (mass action). If the user has products already imported into the list, they are displayed in the grid, but the user should not select it (check the product box) to avoid re-importing the product.
My question is: how can I add a condition for the visibility of bulk action flags?
Here is my Grid _prepareMassaction:
protected function _prepareMassaction()
{
$this->setMassactionIdField('sku');
$this->getMassactionBlock()->setFormFieldName('import');
$this->getMassactionBlock()->setUseSelectAll(false);
$this->getMassactionBlock()->addItem('import', array(
'label' => Mage::helper('import')->__('Import'),
'url' => $this->getUrl('*/*/massImport'),
'confirm' => Mage::helper('import')->__('Are you sure?')
));
return $this;
}
Any help to anyone?
source
share