Skip to content

Commit e87199e

Browse files
committed
Fix #13401 - Set sort order for stores same as for store views
1 parent 47bc47b commit e87199e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/Store/Block/Switcher.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,15 @@ public function getGroups()
170170

171171
if ($store) {
172172
$group->setHomeUrl($store->getHomeUrl());
173+
$group->setSortOrder($store->getSortOrder());
173174
$groups[] = $group;
174175
}
175176
}
177+
178+
usort($groups, static function ($itemA, $itemB) {
179+
return (int)$itemA->getSortOrder() <=> (int)$itemB->getSortOrder();
180+
});
181+
176182
$this->setData('groups', $groups);
177183
}
178184
return $this->getData('groups');

0 commit comments

Comments
 (0)