Skip to content

Commit 85bfec5

Browse files
committed
ACP2E-2964: [Cloud] URL update only for store_id=0
1 parent 290b6ef commit 85bfec5

File tree

1 file changed

+6
-9
lines changed
  • app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category

1 file changed

+6
-9
lines changed

app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category/Move.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,13 @@ public function afterChangeParent(
7373
$afterCategoryId
7474
) {
7575
$categoryStoreId = $category->getStoreId();
76-
foreach ($category->getStoreIds() as $storeId) {
77-
$category->setStoreId($categoryStoreId == $storeId ? $storeId : $categoryStoreId);
78-
$this->removeObsoleteUrlPathEntries($category);
79-
$this->updateCategoryUrlKeyForStore($category);
80-
$category->unsUrlPath();
81-
$category->setUrlPath($this->categoryUrlPathGenerator->getUrlPath($category));
82-
$category->getResource()->saveAttribute($category, 'url_path');
83-
$this->updateUrlPathForChildren($category);
84-
}
8576
$category->setStoreId($categoryStoreId);
77+
$this->removeObsoleteUrlPathEntries($category);
78+
$this->updateCategoryUrlKeyForStore($category);
79+
$category->unsUrlPath();
80+
$category->setUrlPath($this->categoryUrlPathGenerator->getUrlPath($category));
81+
$category->getResource()->saveAttribute($category, 'url_path');
82+
$this->updateUrlPathForChildren($category);
8683

8784
return $result;
8885
}

0 commit comments

Comments
 (0)