Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed May 12, 2023
1 parent 4da40b1 commit f8a125c
Showing 1 changed file with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ protected function _prepareCollection()
'position',
'product_id=entity_id',
'category_id=' . (int) $this->getRequest()->getParam('id', 0),
'left'
);
'left');
$collection->joinAttribute(
'status',
'catalog_product/status',
'entity_id',
null,
'inner'
);
$this->setCollection($collection);

if ($this->getCategory()->getProductsReadonly()) {
Expand Down Expand Up @@ -142,6 +148,36 @@ protected function _prepareColumns()
'editable' => !$this->getCategory()->getProductsReadonly()
//'renderer' => 'adminhtml/widget_grid_column_renderer_input'
]);
$this->addColumn('status', array(
'header' => Mage::helper('catalog')->__('Status'),
'width' => '70',
'index' => 'status',
'type' => 'options',
'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
));
$this->addColumn('action', array(
'header' => Mage::helper('catalog')->__('Action'),
'width' => '50px',
'type' => 'action',
'getter' => 'getId',
'actions' => array(
array(
'caption' => Mage::helper('catalog')->__('Edit'),
'id' => 'editlink',
'url' => array(
'base' => 'adminhtml/catalog_product/edit',
'params' => array(
'store' => $this->getRequest()->getParam('store'),
),
),
'field' => 'id',
'onclick' => 'popWin(this.href,\'_blank\',\'width=1024,height=750,resizable=1,scrollbars=1\');return false;'
),
),
'filter' => false,
'sortable' => false,
'index' => 'stores',
));

return parent::_prepareColumns();
}
Expand Down

0 comments on commit f8a125c

Please sign in to comment.