diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index cd59dab9e0..f2874b163e 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,11 @@ # Release Notes für plentyShop LTS +## v5.0.66 (2024-XX-XX) Übersicht aller Änderungen + +### Geändert + +- Die Überprüfung für die Zahlungsart "Bereits bezahlt" wurde verbessert. + ## v5.0.65 (2024-08-20) Übersicht aller Änderungen ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index b6e0fd2b7d..d2e7a1c7b0 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,11 @@ # Release Notes for plentyShop LTS +## v5.0.66 (2024-XX-XX) Overview of all changes + +### Changed + +- The check for the payment type ‘Already paid’ has been extended. + ## v5.0.65 (2024-08-20) Overview of all changes ### Changed diff --git a/src/Methods/AlreadyPaidPaymentMethod.php b/src/Methods/AlreadyPaidPaymentMethod.php index 3960728139..1bf997fa91 100644 --- a/src/Methods/AlreadyPaidPaymentMethod.php +++ b/src/Methods/AlreadyPaidPaymentMethod.php @@ -2,14 +2,13 @@ namespace Ceres\Methods; +use Ceres\Config\CeresConfig; use Ceres\Wizard\ShopWizard\Services\SettingsHandlerService; use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; -use Plenty\Modules\Frontend\Session\Storage\Contracts\FrontendSessionStorageFactoryContract; use Plenty\Modules\Frontend\Contracts\Checkout; use Plenty\Modules\Payment\Method\Services\PaymentMethodBaseService; use Plenty\Plugin\Application; use Plenty\Plugin\Translation\Translator; -use Ceres\Config\CeresConfig; class AlreadyPaidPaymentMethod extends PaymentMethodBaseService { @@ -55,7 +54,12 @@ public function __construct( public function isActive(): bool { $shippingCountries = $this->settingsHandlerService->getAlreadyPaidShippingCountries($this->app->getPlentyId()); - return in_array($this->checkout->getShippingCountryId(), $shippingCountries, false) && $this->basketRepository->load()->basketAmount <= 0.0; + $coupon = $this->basketRepository->load()->couponCode ?? ''; + return in_array( + $this->checkout->getShippingCountryId(), + $shippingCountries, + false + ) && $this->basketRepository->load()->basketAmount <= 0.0 && strlen($coupon); } /**