Skip to content

Commit cb685d1

Browse files
Maksymilian Szydłohostep
Maksymilian Szydło
authored andcommitted
Fix generating product URL rewrites for anchor categories
(cherry picked from commit 63111ed)
1 parent 6df825a commit cb685d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function generate($storeId, Product $product, ObjectRegistry $productCate
6767
$anchorCategoryIds = $category->getAnchorsAbove();
6868
if ($anchorCategoryIds) {
6969
foreach ($anchorCategoryIds as $anchorCategoryId) {
70-
$anchorCategory = $this->categoryRepository->get($anchorCategoryId);
70+
$anchorCategory = $this->categoryRepository->get($anchorCategoryId, $storeId);
7171
if ((int)$anchorCategory->getParentId() === Category::TREE_ROOT_ID) {
7272
continue;
7373
}

0 commit comments

Comments
 (0)