@@ -306,42 +306,42 @@ public function getProductAttributes($storeId, array $productIds, array $attribu
306
306
$ tableName = $ this ->getTable ('catalog_product_entity_ ' . $ backendType );
307
307
$ selects [] = $ this ->connection ->select ()
308
308
->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
+ );
345
345
}
346
346
}
347
347
0 commit comments