From 80717c4b59ef9ae70e2154ed126dbf79c5d5061f Mon Sep 17 00:00:00 2001 From: Vincent van Hoven Date: Wed, 24 Jul 2024 11:59:00 +0200 Subject: [PATCH 1/2] [FIX] Bolfeed image mapping issue Co-Authored-By: Vincent van Hoven <11269255+vincentvanhoven@users.noreply.github.com> --- src/Jobs/Feeds/BolFeed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jobs/Feeds/BolFeed.php b/src/Jobs/Feeds/BolFeed.php index 8fe985d..0ddeda2 100644 --- a/src/Jobs/Feeds/BolFeed.php +++ b/src/Jobs/Feeds/BolFeed.php @@ -59,7 +59,7 @@ protected function getProductQuery(): Builder protected function productToFeedRow(Product $product) { // fetch images - $images = implode(',', $product->images()->map->getPublicUrl()->all()); + $images = implode(',', $product->images->map->getPublicUrl()->all()); // set bol price $shippingCost = 0; From b7ad3a88bd562c0ba6ffd57fc5490815ac19a539 Mon Sep 17 00:00:00 2001 From: Vincent van Hoven Date: Wed, 24 Jul 2024 12:38:17 +0200 Subject: [PATCH 2/2] [FIX] TradeTracker feed image src format Co-Authored-By: Vincent van Hoven <11269255+vincentvanhoven@users.noreply.github.com> --- src/Jobs/Feeds/TradeTrackerFeed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jobs/Feeds/TradeTrackerFeed.php b/src/Jobs/Feeds/TradeTrackerFeed.php index 927f669..1aff746 100644 --- a/src/Jobs/Feeds/TradeTrackerFeed.php +++ b/src/Jobs/Feeds/TradeTrackerFeed.php @@ -107,7 +107,7 @@ protected function productToFeedRow(Product $product) $fields['brand'] = $product->brand->name; } - $images = $product->images()->limit(5)->map->getPublicUrl()->all(); + $images = $product->images->take(5)->map->getPublicUrl()->all(); foreach ($images as $key => $image) { $fields['imageURL-'.($key + 1)] = $image;