protected function _prepareColumns() { if (Mage::getStoreConfig('ampgrid/additional/thumb')) { if (method_exists($this, "addColumnAfter")) { $this->addColumnAfter('thumb', array('header' => Mage::helper('catalog')->__('Thumbnail'), 'renderer' => 'ampgrid/adminhtml_catalog_product_grid_renderer_thumb', 'index' => 'thumbnail', 'sortable' => true, 'filter' => false, 'width' => 90), 'entity_id'); } else { // will add thumbnail column to be the first one $this->addColumn('thumb', array('header' => Mage::helper('catalog')->__('Thumbnail'), 'renderer' => 'ampgrid/adminhtml_catalog_product_grid_renderer_thumb', 'index' => 'thumbnail', 'sortable' => true, 'filter' => false, 'width' => 90)); } } parent::_prepareColumns(); if ($this->_gridAttributes->getSize() > 0) { Mage::helper('ampgrid')->attachGridColumns($this, $this->_gridAttributes, $this->_getStore()); } return Mage_Adminhtml_Block_Widget_Grid::_prepareColumns(); }
protected function _prepareColumns() { if (Mage::getStoreConfig('Iways_GridPlus/Category/AttrSetName')) { $sets = Mage::getResourceModel('eav/entity_attribute_set_collection')->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())->load()->toOptionHash(); $this->addColumnAfter('attr_set_name', array('header' => Mage::helper('catalog')->__('Attrib. Set Name'), 'width' => '100px', 'index' => 'attribute_set_id', 'type' => 'options', 'options' => $sets), 'sku'); } parent::_prepareColumns(); if (!Mage::getStoreConfig('Iways_GridPlus/Category/ID')) { $this->removeColumn('entity_id'); } if (!Mage::getStoreConfig('Iways_GridPlus/Category/Price')) { $this->removeColumn('price'); } if (!Mage::getStoreConfig('Iways_GridPlus/Category/Position')) { $this->removeColumn('position'); } }
protected function _prepareColumns() { parent::_prepareColumns(); $this->addColumn('edit', array('header' => Mage::helper('catalog')->__('Action'), 'width' => '80', 'filter' => false, 'sortable' => false, 'index' => 'entity_id', 'renderer' => 'productlink/renderer_category_productlink')); }