Skip to content

Commit 991a54d

Browse files
committed
Issue 8392 fix improved
1 parent 207b160 commit 991a54d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@ public function getCollection(\Magento\Catalog\Model\Product $product, $type)
5353
$output[$item->getId()] = $converter->convert($item);
5454
}
5555
foreach ($output as $item) {
56-
$realoutput[$item["position"]] = $item;
56+
$itemPosition = $item["position"];
57+
if (!isset($realoutput[$itemposition])) {
58+
$realoutput[$itemPosition] = $item;
59+
}
60+
else {
61+
$newPosition = $itemPosition+1;
62+
$realoutput[$newPosition] = $item;
63+
}
5764
}
5865
ksort($realoutput);
5966
return $realoutput;

0 commit comments

Comments
 (0)