diff --git a/src/Adapter/Presenter/Product/ProductLazyArray.php b/src/Adapter/Presenter/Product/ProductLazyArray.php index 84f0982f8fb04..7b185e00b9df1 100644 --- a/src/Adapter/Presenter/Product/ProductLazyArray.php +++ b/src/Adapter/Presenter/Product/ProductLazyArray.php @@ -838,6 +838,11 @@ protected function shouldEnableAddToCartButton(array $product, ProductPresentati return false; } + // Do not enable add to cart button if prices are hidden + if (!$this->shouldShowPrice($settings, $product)) { + return false; + } + if (($product['customizable'] == 2 || !empty($product['customization_required']))) { $shouldEnable = false; diff --git a/tests/Integration/Adapter/Presenter/Product/ProductLazyArrayTest.php b/tests/Integration/Adapter/Presenter/Product/ProductLazyArrayTest.php index c3bd6e24e3d70..3dab6ac8463a8 100644 --- a/tests/Integration/Adapter/Presenter/Product/ProductLazyArrayTest.php +++ b/tests/Integration/Adapter/Presenter/Product/ProductLazyArrayTest.php @@ -342,7 +342,7 @@ public function providerDeliveryInformationCases(): iterable 'allow_oosp' => OutOfStockType::OUT_OF_STOCK_AVAILABLE, ] ), - self::PRODUCT_DELIVERY_TIME_OOSBOA, + null, ]; }