File tree 1 file changed +5
-3
lines changed
app/code/Magento/Catalog/Model/Indexer/Product/Flat 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11
11
12
12
/**
13
13
* Class FlatTableBuilder
14
+ *
14
15
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
15
16
*/
16
17
class FlatTableBuilder
@@ -354,6 +355,7 @@ protected function _updateTemporaryTableByStoreValues(
354
355
//Update not simple attributes (eg. dropdown)
355
356
$ columnName = $ attributeCode . $ valueFieldSuffix ;
356
357
if (isset ($ flatColumns [$ columnName ])) {
358
+ $ columnValue = $ this ->_connection ->getIfNullSql ('ts.value ' , 't0.value ' );
357
359
$ select = $ this ->_connection ->select ();
358
360
$ select ->joinLeft (
359
361
['t0 ' => $ this ->_productIndexerHelper ->getTable ('eav_attribute_option_value ' )],
@@ -364,8 +366,8 @@ protected function _updateTemporaryTableByStoreValues(
364
366
'ts.option_id = et. ' . $ attributeCode . ' AND ts.store_id = ' . $ storeId ,
365
367
[]
366
368
)->columns (
367
- [$ columnName => $ this -> _connection -> getIfNullSql ( ' ts.value ' , ' t0.value ' ) ]
368
- )->where ($ attributeCode . ' IS NOT NULL ' );
369
+ [$ columnName => $ columnValue ]
370
+ )->where ($ columnValue . ' IS NOT NULL ' );
369
371
if (!empty ($ changedIds )) {
370
372
$ select ->where ($ this ->_connection ->quoteInto ('et.entity_id IN (?) ' , $ changedIds ));
371
373
}
@@ -389,7 +391,7 @@ protected function _getTemporaryTableName($tableName)
389
391
}
390
392
391
393
/**
392
- * Get MetadataPool
394
+ * Get metadata pool
393
395
*
394
396
* @return \Magento\Framework\EntityManager\MetadataPool
395
397
*/
You can’t perform that action at this time.
0 commit comments