Skip to content

Commit 0cd4271

Browse files
Pass StoreId to image collector
1 parent e5a9140 commit 0cd4271

File tree

1 file changed

+2
-3
lines changed
  • Service/ProductData/AttributeCollector/Data

1 file changed

+2
-3
lines changed

Service/ProductData/AttributeCollector/Data/Image.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ private function collectTypes(): array
129129
if (empty($this->entityIds)) {
130130
return [];
131131
}
132-
133132
$connection = $this->resource->getConnection();
134133
$eavTable = $this->resource->getTableName('eav_attribute');
135134
$cpevTable = $this->resource->getTableName('catalog_product_entity_varchar');
@@ -150,7 +149,7 @@ private function collectTypes(): array
150149

151150
$data = [];
152151
foreach ($connection->fetchAll($select) as $item) {
153-
$data[$item['entity_id']][$item['value']][] = $item['attribute_code'];
152+
$data[$item['entity_id']][$item['value']][$item['store_id']][] = $item['attribute_code'];
154153
}
155154

156155
return $data;
@@ -176,7 +175,7 @@ private function combineData(array $imagesData, array $typesData): array
176175
$result[$entityId][$storeId][$position] = [
177176
'file' => $this->getMediaUrl('catalog/product' . $imageValue),
178177
'position' => $position,
179-
'types' => $typesData[$entityId][$imageValue] ?? []
178+
'types' => $typesData[$entityId][$imageValue][$storeId] ?? []
180179
];
181180
}
182181

0 commit comments

Comments
 (0)