File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
app/code/Magento/Catalog/Model/Indexer/Product/Flat Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -306,10 +306,11 @@ protected function _fillTemporaryTable(
306
306
foreach ($ columnsList as $ columnName => $ attribute ) {
307
307
$ countTableName = 't ' . $ iterationNum ++;
308
308
$ joinCondition = sprintf (
309
- 'e.%3$s = %1$s.%3$s AND %1$s.attribute_id = %2$d AND %1$s.store_id = 0 ' ,
309
+ 'e.%3$s = %1$s.%3$s AND %1$s.attribute_id = %2$d AND ( %1$s.store_id = %4$d OR %1$s.store_id = 0) ' ,
310
310
$ countTableName ,
311
311
$ attribute ->getId (),
312
- $ metadata ->getLinkField ()
312
+ $ metadata ->getLinkField (),
313
+ $ storeId
313
314
);
314
315
315
316
$ select ->joinLeft (
@@ -323,9 +324,10 @@ protected function _fillTemporaryTable(
323
324
$ columnValueName = $ attributeCode . $ valueFieldSuffix ;
324
325
if (isset ($ flatColumns [$ columnValueName ])) {
325
326
$ valueJoinCondition = sprintf (
326
- 'e.%1$s = %2$s.option_id AND %2$s.store_id = 0 ' ,
327
+ 'e.%1$s = %2$s.option_id AND ( %2$s.store_id = %3$d OR %2$s.store_id = 0) ' ,
327
328
$ attributeCode ,
328
- $ countTableName
329
+ $ countTableName ,
330
+ $ storeId
329
331
);
330
332
$ selectValue ->joinLeft (
331
333
[
You can’t perform that action at this time.
0 commit comments