Skip to content

Commit

Permalink
Fallback to image without source if no sources are linked
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin-Magmodules committed Feb 28, 2024
1 parent 0d42ed7 commit 9fe70f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/ProductData/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private function addImageData(int $storeId, int $entityId, array &$productData):

ksort($imageData[$storeId]);
foreach ($imageData[$storeId] as $image) {
if (in_array($imageSource, $image['types'])) {
if (in_array($imageSource, $image['types']) || empty($productData['image'])) {
$productData['image'] = $image['file'];
}
}
Expand Down

0 comments on commit 9fe70f8

Please sign in to comment.