Skip to content

Commit a3b5a18

Browse files
committed
Fix for #8392
1 parent 1507bb1 commit a3b5a18

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/code/Magento/Catalog/Model/ProductLink/CollectionProvider.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,14 @@ public function getCollection(\Magento\Catalog\Model\Product $product, $type)
4848
$products = $this->providers[$type]->getLinkedProducts($product);
4949
$converter = $this->converterPool->getConverter($type);
5050
$output = [];
51+
$realoutput = [];
5152
foreach ($products as $item) {
5253
$output[$item->getId()] = $converter->convert($item);
5354
}
54-
return $output;
55+
foreach ($output as $item) {
56+
$realoutput[$item["position"]] = $item;
57+
}
58+
ksort($realoutput);
59+
return $realoutput;
5560
}
5661
}

0 commit comments

Comments
 (0)