public function getHiddenProducts() { if (!($result = parent::getHiddenProducts())) { $result = Mage::app()->getRequest()->getParam('hidden_products'); } return $result; }
public function __construct($arguments = array()) { parent::__construct($arguments); $this->setDefaultSort('name'); $this->setUseAjax(true); }
public function getSelectedProducts() { parent::getSelectedProducts(); if ($selectedProducts = $this->getRequest()->getParam('selected_products_comma_separated', null)) { $selectedProducts = explode(',', $selectedProducts); $this->setSelectedProducts($selectedProducts); } return $this->_selectedProducts; }
/** * Prepare columns for products grid * * @return Mage_Adminhtml_Block_Widget_Grid */ protected function _prepareColumns() { if ($this->getUseMassaction()) { $this->addColumn('in_products', array('header_css_class' => 'a-center', 'type' => 'checkbox', 'name' => 'in_products', 'inline_css' => 'checkbox entities', 'field_name' => 'in_products', 'values' => $this->getSelectedProducts(), 'align' => 'center', 'index' => 'entity_id', 'use_index' => true)); } $this->addColumn('entity_id', array('header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60px', 'index' => 'entity_id')); $this->addColumn('chooser_sku', array('header' => Mage::helper('catalog')->__('SKU'), 'name' => 'chooser_sku', 'width' => '80px', 'index' => 'sku')); $this->addColumn('chooser_name', array('header' => Mage::helper('catalog')->__('Product Name'), 'name' => 'chooser_name', 'index' => 'name')); return parent::_prepareColumns(); }