Skip to content

Commit 0c50f45

Browse files
ENGCOM-5419: Fix missing attribute_id condition from filter #23444
- Merge Pull Request #23444 from mattijv/magento2:2.3-develop - Merged commits: 1. 4adee3b
2 parents c3f29ce + 4adee3b commit 0c50f45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ private function addAttributeToFilterAllStores(Attribute $attributeModel, array
8484
$entity = $this->getEntity();
8585
$fKey = 'e.' . $this->getEntityPkName($entity);
8686
$pKey = $tableName . '.' . $this->getEntityPkName($entity);
87+
$attributeId = $attributeModel->getAttributeId();
8788
$condition = "({$pKey} = {$fKey}) AND ("
8889
. $this->_getConditionSql("{$tableName}.value", $condition)
90+
. ') AND ('
91+
. $this->_getConditionSql("{$tableName}.attribute_id", $attributeId)
8992
. ')';
9093
$selectExistsInAllStores = $this->getConnection()->select()->from($tableName);
9194
$this->getSelect()->exists($selectExistsInAllStores, $condition);

0 commit comments

Comments
 (0)