Skip to content

Commit 4c783cb

Browse files
committed
MAGETWO-71398: Attribute values on store view level not searchable
- Indent function call correctly;
1 parent 8134908 commit 4c783cb

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -306,42 +306,42 @@ public function getProductAttributes($storeId, array $productIds, array $attribu
306306
$tableName = $this->getTable('catalog_product_entity_' . $backendType);
307307
$selects[] = $this->connection->select()
308308
->from(
309-
['cpe' => $this->getTable('catalog_product_entity')],
310-
[]
311-
)->joinInner(
312-
['cea' => $this->getTable('catalog_eav_attribute')],
313-
'',
314-
[]
315-
)->joinLeft(
316-
['cpe_type' => $tableName],
317-
$this->connection->quoteInto(
318-
'cpe. ' . $linkField . ' = cpe_type.' . $linkField . ' AND cpe_type.store_id = ? '
319-
. 'AND cea.attribute_id = cpe_type.attribute_id',
320-
$storeId
321-
),
322-
[]
323-
)->joinLeft(
324-
['cpe_type_default' => $tableName],
325-
'cpe.' . $linkField . ' = cpe_type_default.' . $linkField
326-
. ' AND cpe_type_default.store_id = 0'
327-
. ' AND cea.attribute_id = cpe_type_default.attribute_id',
328-
[]
329-
)->where(
330-
'cea.attribute_id IN (?)',
331-
$attributeIds
332-
)->where(
333-
'cpe.' . $linkField . ' IN (?)',
334-
array_keys($productLinkFieldsToEntityIdMap)
335-
)->where(
336-
'cpe_type.attribute_id IS NOT NULL OR cpe_type_default.attribute_id IS NOT NULL',
337-
array_keys($productLinkFieldsToEntityIdMap)
338-
)->columns(
339-
[
340-
$linkField => 'cpe.' . $linkField,
341-
'attribute_id' => 'cea.attribute_id',
342-
'value' => $this->unifyField($ifStoreValue, $backendType)
343-
]
344-
);
309+
['cpe' => $this->getTable('catalog_product_entity')],
310+
[]
311+
)->joinInner(
312+
['cea' => $this->getTable('catalog_eav_attribute')],
313+
'',
314+
[]
315+
)->joinLeft(
316+
['cpe_type' => $tableName],
317+
$this->connection->quoteInto(
318+
'cpe. ' . $linkField . ' = cpe_type.' . $linkField . ' AND cpe_type.store_id = ? '
319+
. 'AND cea.attribute_id = cpe_type.attribute_id',
320+
$storeId
321+
),
322+
[]
323+
)->joinLeft(
324+
['cpe_type_default' => $tableName],
325+
'cpe.' . $linkField . ' = cpe_type_default.' . $linkField
326+
. ' AND cpe_type_default.store_id = 0'
327+
. ' AND cea.attribute_id = cpe_type_default.attribute_id',
328+
[]
329+
)->where(
330+
'cea.attribute_id IN (?)',
331+
$attributeIds
332+
)->where(
333+
'cpe.' . $linkField . ' IN (?)',
334+
array_keys($productLinkFieldsToEntityIdMap)
335+
)->where(
336+
'cpe_type.attribute_id IS NOT NULL OR cpe_type_default.attribute_id IS NOT NULL',
337+
array_keys($productLinkFieldsToEntityIdMap)
338+
)->columns(
339+
[
340+
$linkField => 'cpe.' . $linkField,
341+
'attribute_id' => 'cea.attribute_id',
342+
'value' => $this->unifyField($ifStoreValue, $backendType)
343+
]
344+
);
345345
}
346346
}
347347

0 commit comments

Comments
 (0)