From 5c1df95f14e50a190b9d03476080f12502fd0c0a Mon Sep 17 00:00:00 2001 From: livca Date: Tue, 16 Jul 2024 15:14:13 +0200 Subject: [PATCH] fix retail mode - catalog web price --- Plugin/ContextPlugin.php | 3 +-- Plugin/ProductPlugin.php | 12 ++++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Plugin/ContextPlugin.php b/Plugin/ContextPlugin.php index b9a8cc1..bb09d6b 100644 --- a/Plugin/ContextPlugin.php +++ b/Plugin/ContextPlugin.php @@ -34,8 +34,7 @@ public function aroundDispatch( RequestInterface $request ): mixed { - // show product offer price if shop has been selected, even in Retail mode - if ($this->settingsHelper->isDriveMode() || $this->currentStore->getRetailer()) { + if ($this->settingsHelper->isDriveMode()) { // Set a default value to have common vary for all customers without any chosen retailer. $retailerId = 'default'; diff --git a/Plugin/ProductPlugin.php b/Plugin/ProductPlugin.php index 84891c5..269a351 100644 --- a/Plugin/ProductPlugin.php +++ b/Plugin/ProductPlugin.php @@ -47,8 +47,7 @@ public function aroundIsAvailable(Product $product, Closure $proceed): bool { $isAvailable = $proceed(); - // show product availability if shop has been selected, even in Retail mode - if ($this->settingsHelper->useStoreOffers() || $this->getRetailer()) { + if ($this->settingsHelper->useStoreOffers()) { $isAvailable = false; $offer = $this->offerHelper->getCurrentOffer($product); @@ -67,8 +66,7 @@ public function aroundGetPrice(Product $product, Closure $proceed): mixed { $price = $proceed(); - // show product offer price if shop has been selected, even in Retail mode - if ($this->settingsHelper->useStoreOffers() || $this->getRetailer()) { + if ($this->settingsHelper->useStoreOffers()) { $offer = $this->offerHelper->getCurrentOffer($product); if ($offer && $offer->getPrice()) { @@ -88,8 +86,7 @@ public function aroundGetSpecialPrice(Product $product, Closure $proceed): mixed { $price = $proceed(); - // show product offer price if shop has been selected, even in Retail mode - if ($this->settingsHelper->useStoreOffers() || $this->getRetailer()) { + if ($this->settingsHelper->useStoreOffers()) { $offer = $this->offerHelper->getCurrentOffer($product); if ($offer && $offer->getSpecialPrice()) { @@ -107,8 +104,7 @@ public function aroundGetFinalPrice(Product $product, Closure $proceed, mixed $q { $price = $proceed($qty); - // show product offer price if shop has been selected, even in Retail mode - if ($this->settingsHelper->useStoreOffers() || $this->getRetailer()) { + if ($this->settingsHelper->useStoreOffers()) { $offer = $this->offerHelper->getCurrentOffer($product); if ($offer) {