Skip to content

Commit f32f4da

Browse files
committed
MAGETWO-44118: Doesn't found bundle product
1 parent 24abff1 commit f32f4da

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,25 +133,15 @@ private function processQueryWithField(FilterInterface $filter, $isNegation, $qu
133133
$value
134134
);
135135
} else {
136-
$table = $attribute->getBackendTable();
136+
$table = $this->resource->getTableName('catalog_product_index_eav_decimal');
137137
$select = $this->connection->select();
138-
$ifNullCondition = $this->connection->getIfNullSql('current_store.value', 'main_table.value');
139138

140139
$currentStoreId = $this->scopeResolver->getScope()->getId();
141140

142141
$select->from(['main_table' => $table], 'entity_id')
143-
->joinLeft(
144-
['current_store' => $table],
145-
'current_store.attribute_id = main_table.attribute_id AND current_store.store_id = '
146-
. $currentStoreId,
147-
null
148-
)
149-
->columns([$filter->getField() => $ifNullCondition])
150-
->where(
151-
'main_table.attribute_id = ?',
152-
$attribute->getAttributeId()
153-
)
154-
->where('main_table.store_id = ?', Store::DEFAULT_STORE_ID)
142+
->columns([$filter->getField() => 'main_table.value'])
143+
->where('main_table.attribute_id = ?', $attribute->getAttributeId())
144+
->where('main_table.store_id = ?', $currentStoreId)
155145
->having($query);
156146

157147
$resultQuery = 'search_index.entity_id IN (

0 commit comments

Comments
 (0)