From 6855934cd8ef542220ac5b5cb41bf45f360c77a9 Mon Sep 17 00:00:00 2001 From: Valeriy Nayda Date: Tue, 27 Oct 2015 14:25:31 +0200 Subject: [PATCH] MAGETWO-44237: CategoryLinkManagementInterface->getAssignedProducts() does not work with flat tables --- app/code/Magento/Catalog/Model/CategoryLinkManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/CategoryLinkManagement.php b/app/code/Magento/Catalog/Model/CategoryLinkManagement.php index 482192f8d1b3f..d9c0f2798f732 100644 --- a/app/code/Magento/Catalog/Model/CategoryLinkManagement.php +++ b/app/code/Magento/Catalog/Model/CategoryLinkManagement.php @@ -45,7 +45,7 @@ public function getAssignedProducts($categoryId) $links = []; /** @var \Magento\Catalog\Model\Product $product */ - foreach ($products->getItems() as $productId => $product) { + foreach ($products->getItems() as $product) { /** @var \Magento\Catalog\Api\Data\CategoryProductLinkInterface $link */ $link = $this->productLinkFactory->create(); $link->setSku($product->getSku())