File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ public function addProductFilter($products)
220
220
$ products = [$ products ];
221
221
}
222
222
$ identifierField = $ this ->getMetadataPool ()->getMetadata (ProductInterface::class)->getIdentifierField ();
223
- $ this ->getSelect ()->where ("cpe .$ identifierField IN (?) " , $ products );
223
+ $ this ->getSelect ()->where ("product_entity_table .$ identifierField IN (?) " , $ products );
224
224
$ this ->_hasLinkFilter = true ;
225
225
}
226
226
@@ -442,9 +442,11 @@ private function getMetadataPool()
442
442
private function joinProductsToLinks ()
443
443
{
444
444
if ($ this ->_hasLinkFilter ) {
445
- $ linkField = $ this ->getMetadataPool ()->getMetadata (ProductInterface::class)->getLinkField ();
445
+ $ metaDataPool = $ this ->getMetadataPool ()->getMetadata (ProductInterface::class);
446
+ $ linkField = $ metaDataPool ->getLinkField ();
447
+ $ entityTable = $ metaDataPool ->getEntityTable ();
446
448
$ this ->getSelect ()
447
- ->join (['cpe ' => $ this -> getMainTable () ], "links.product_id = cpe . $ linkField " , []);
449
+ ->join (['product_entity_table ' => $ entityTable ], "links.product_id = product_entity_table . $ linkField " , []);
448
450
}
449
451
}
450
452
}
You can’t perform that action at this time.
0 commit comments