Skip to content

Commit 54ee440

Browse files
authored
store scope category merchandising based on store_id param (#1156)
1 parent aa9a1b7 commit 54ee440

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Model/Observer/Merchandising.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@ public function execute(Observer $observer)
3838

3939
$positions = json_decode($positions, true);
4040

41+
$storeId = $this->request->getParam('store_id');
42+
if ($storeId > 0) {
43+
$stores[] = $this->storeManager->getStore($storeId);
44+
} else {
45+
$stores = $this->storeManager->getStores();
46+
}
47+
4148
try {
42-
foreach ($this->storeManager->getStores() as $store) {
49+
foreach ($stores as $store) {
4350
if (!$store->getIsActive()) {
4451
continue;
4552
}

0 commit comments

Comments
 (0)