Skip to content

Commit 1e5745d

Browse files
author
Andreas Schrammel
committed
👌 Add store code
Add store code in store admin grid.
1 parent 6f73126 commit 1e5745d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function render(\Magento\Framework\DataObject $row)
2727
$this->getUrl('adminhtml/*/editGroup', ['group_id' => $row->getGroupId()]) .
2828
'">' .
2929
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
30-
'</a>';
30+
'</a><br />'
31+
. '(Code: ' . $row->getGroupCode() . ')';
3132
}
3233
}

app/code/Magento/Store/Model/ResourceModel/Website/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function joinGroupAndStore()
138138
$this->getSelect()->joinLeft(
139139
['group_table' => $this->getTable('store_group')],
140140
'main_table.website_id = group_table.website_id',
141-
['group_id' => 'group_id', 'group_title' => 'name']
141+
['group_id' => 'group_id', 'group_title' => 'name', 'group_code' => 'code']
142142
)->joinLeft(
143143
['store_table' => $this->getTable('store')],
144144
'group_table.group_id = store_table.group_id',

0 commit comments

Comments
 (0)