Skip to content

Commit ce2af16

Browse files
committed
MAGETWO-53305: [Staging] When update was applied Cross-Sells data are not displayed in the shopping cart
1 parent d21efbb commit ce2af16

File tree

1 file changed

+5
-3
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product

1 file changed

+5
-3
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,10 @@ private function getMetadataPool()
441441
*/
442442
private function joinProductsToLinks()
443443
{
444-
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
445-
$this->getSelect()
446-
->join(['cpe' => 'catalog_product_entity'], "links.product_id = cpe.$linkField", []);
444+
if ($this->_hasLinkFilter) {
445+
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
446+
$this->getSelect()
447+
->join(['cpe' => 'catalog_product_entity'], "links.product_id = cpe.$linkField", []);
448+
}
447449
}
448450
}

0 commit comments

Comments
 (0)