From 6cb01b5bd97ccfb835f05dff37788247a70a8b71 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 23 May 2024 09:08:39 +0200 Subject: [PATCH 1/2] add action edit column to simple products in grouped grid --- .../Catalog/Product/Edit/Tab/Super/Group.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php index 119f238f2c3..b8671daf17c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php @@ -173,6 +173,31 @@ protected function _prepareColumns() 'edit_only' => !$this->_getProduct()->getId(), 'filter_condition_callback' => [$this, '_addLinkModelFilterCallback'] ]); + + $this->addColumn('action', [ + 'header' => Mage::helper('catalog')->__('Action'), + 'width' => '50px', + 'type' => 'action', + 'getter' => 'getId', + 'actions' => [ + [ + 'caption' => Mage::helper('catalog')->__('Edit'), + 'id' => 'editlink', + 'field' => 'id', + 'onclick' => "popWin(this.href,'win','width=1000,height=700,resizable=1,scrollbars=1');return false;", + 'url' => [ + 'base' => 'adminhtml/catalog_product/edit', + 'params' => [ + 'store' => $this->getRequest()->getParam('store'), + 'popup' => 1 + ], + ], + ], + ], + 'filter' => false, + 'sortable' => false, + 'index' => 'stores', + ]); return parent::_prepareColumns(); } From 1095a590589b70dfc85eb9a3bfa382bf64ff7282 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 23 May 2024 09:22:01 +0200 Subject: [PATCH 2/2] fix phpcs --- .../Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php index b8671daf17c..67b4d2ff2d9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php @@ -173,7 +173,7 @@ protected function _prepareColumns() 'edit_only' => !$this->_getProduct()->getId(), 'filter_condition_callback' => [$this, '_addLinkModelFilterCallback'] ]); - + $this->addColumn('action', [ 'header' => Mage::helper('catalog')->__('Action'), 'width' => '50px',