Skip to content

Commit 7752280

Browse files
RachanaRachana
authored andcommitted
BUG#AC-7014:elated, upsell and crosssell products query position correctly saved in
1 parent a047c76 commit 7752280

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/RelatedProductGraphQl/Model/DataProvider/RelatedProductDataProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ public function getRelations(array $products, int $linkType): array
119119
$collection->addFieldToFilter('product_id', ['in' => array_keys($productsByActualIds)]);
120120
$collection->addLinkTypeIdFilter();
121121

122+
$collection->addProductIdFilter();
123+
$collection->joinAttributes();
124+
$collection->setOrder('position', 'ASC');
122125
//Prepare map
123126
$map = [];
124127
/** @var Link $item */

0 commit comments

Comments
 (0)