From 2710a9725adea245cd351c25c592c7af90a3bd40 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Tue, 2 Sep 2025 18:17:51 +0300 Subject: [PATCH] =?utf8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5?= =?utf8?q?=D0=BC=20=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=84=D0=BE=D1=82?= =?utf8?q?=D0=BE=20=D0=B2=20=D1=84=D0=B8=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/MarketplaceService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erp24/services/MarketplaceService.php b/erp24/services/MarketplaceService.php index 5191fefb..103dec56 100644 --- a/erp24/services/MarketplaceService.php +++ b/erp24/services/MarketplaceService.php @@ -476,7 +476,7 @@ class MarketplaceService $result[] = [ 'id' => $product->id, 'name' => $properties['displayName'], - 'pictures' => $properties['imageUrls'], + 'pictures' => !empty($properties['imageUrls']) ? $properties['imageUrls'] : [$properties['imageUrl']], 'price' => $price, 'oldprice' => MarketplaceService::getProductOldPrice($product->id), 'description' => MarketplaceService::getProductDescription($product->id), @@ -666,8 +666,8 @@ class MarketplaceService ->where(['guid' => $guid]) ->all(); foreach ($data as $media) { - if (!empty($data->file)) { - $resultData = FileService::getFile($data->file); + if (!empty($media->file)) { + $resultData = FileService::getFile($media->file); if (File::src($resultData, 'images') != null) { $fileName = File::src($resultData, 'images'); $urls[] = 'https://media.erp-flowers.ru/media/view-url?url=' . $fileName; -- 2.39.5