From a60d10b4501b1d49999c0fa714abfb78d15c5032 Mon Sep 17 00:00:00 2001 From: Richard BAYET Date: Thu, 12 Aug 2021 07:21:39 +0200 Subject: [PATCH] Fixes #62 Correctly add offer ids to identities --- Block/Catalog/Product/Retailer/Availability.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Block/Catalog/Product/Retailer/Availability.php b/Block/Catalog/Product/Retailer/Availability.php index aef1b68..4ea7ea6 100644 --- a/Block/Catalog/Product/Retailer/Availability.php +++ b/Block/Catalog/Product/Retailer/Availability.php @@ -160,9 +160,9 @@ protected function getProduct() */ protected function getStoreOffers() { - $storeOffers = []; - if ($this->storeOffers === null) { + $storeOffers = []; + $offerByRetailer = []; foreach ($this->offerManagement->getProductOffers($this->getProduct()->getId()) as $offer) { $offerByRetailer[(int) $offer->getSellerId()] = $offer; @@ -192,9 +192,9 @@ protected function getStoreOffers() $storeOffers[] = $offer; } - } - $this->storeOffers = $storeOffers; + $this->storeOffers = $storeOffers; + } return $this->storeOffers; }