Skip to content

Commit 6f73126

Browse files
author
Andreas Schrammel
committed
✨ Add website- and storeview-code
Add website- and storeview-code in stores Admin-Grid.
1 parent 3dda470 commit 6f73126

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.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/*/editStore', ['store_id' => $row->getStoreId()]) .
2828
'">' .
2929
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
30-
'</a>';
30+
'</a><br />' .
31+
'(Code: ' . $row->getStoreCode() . ')';
3132
}
3233
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function render(\Magento\Framework\DataObject $row)
2424
$this->getUrl('adminhtml/*/editWebsite', ['website_id' => $row->getWebsiteId()]) .
2525
'">' .
2626
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
27-
'</a>';
27+
'</a><br />' .
28+
'(Code: ' . $row->getCode() . ')';
2829
}
2930
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function joinGroupAndStore()
142142
)->joinLeft(
143143
['store_table' => $this->getTable('store')],
144144
'group_table.group_id = store_table.group_id',
145-
['store_id' => 'store_id', 'store_title' => 'name']
145+
['store_id' => 'store_id', 'store_title' => 'name', 'store_code' => 'code']
146146
);
147147
$this->addOrder('group_table.name', \Magento\Framework\DB\Select::SQL_ASC) // store name
148148
->addOrder(

0 commit comments

Comments
 (0)