Skip to content

Commit 1395ece

Browse files
ENGCOM-3906: Fix generating product URL rewrites for anchor categories #14344
2 parents dbb41dc + 19c391c commit 1395ece

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
@@ -61,7 +61,7 @@ public function generate($storeId, Product $product, ObjectRegistry $productCate
6161
$anchorCategoryIds = $category->getAnchorsAbove();
6262
if ($anchorCategoryIds) {
6363
foreach ($anchorCategoryIds as $anchorCategoryId) {
64-
$anchorCategory = $this->categoryRepository->get($anchorCategoryId);
64+
$anchorCategory = $this->categoryRepository->get($anchorCategoryId, $storeId);
6565
$urls[] = $this->urlRewriteFactory->create()
6666
->setEntityType(ProductUrlRewriteGenerator::ENTITY_TYPE)
6767
->setEntityId($product->getId())

0 commit comments

Comments
 (0)