diff --git a/vendor/magento/module-configurable-product/Plugin/CatalogWidget/Block/Product/ProductsListPlugin.php b/vendor/magento/module-configurable-product/Plugin/CatalogWidget/Block/Product/ProductsListPlugin.php index 782bce8772c7c..52164f6e5e051 100644 --- a/vendor/magento/module-configurable-product/Plugin/CatalogWidget/Block/Product/ProductsListPlugin.php +++ b/vendor/magento/module-configurable-product/Plugin/CatalogWidget/Block/Product/ProductsListPlugin.php @@ -1,9 +1,8 @@ resource->getConnection(); $productIds = $connection->fetchCol( $connection - ->select() - ->from(['e' => $this->resource->getTableName('catalog_product_entity')], ['link_table.parent_id']) - ->joinInner( - ['link_table' => $this->resource->getTableName('catalog_product_super_link')], - 'link_table.product_id = e.' . $linkField, - [] - ) - ->where('link_table.product_id IN (?)', $searchProducts) + ->select() + ->from( + ['e' => $this->resource->getTableName('catalog_product_entity')], + ['entity_table.entity_id'] + ) + ->joinInner( + ['link_table' => $this->resource->getTableName('catalog_product_super_link')], + 'link_table.product_id = e.entity_id', + [] + ) + ->joinInner( + ['entity_table' => $this->resource->getTableName('catalog_product_entity')], + 'entity_table.' . $linkField . ' = link_table.parent_id', + [] + ) + ->where('link_table.product_id IN (?)', $searchProducts) ); $configurableProductCollection = $this->productCollectionFactory->create();