From 466fcdd2d78e7b16413dd73df51fd6845b0b327b Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Mon, 11 Mar 2019 09:20:09 +0100 Subject: [PATCH] [Core] if cart has no shippables, don't force carriage calculation --- .../Component/Core/Order/Processor/CartShippingProcessor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CoreShop/Component/Core/Order/Processor/CartShippingProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartShippingProcessor.php index 30f7b044d7..a22b869279 100644 --- a/src/CoreShop/Component/Core/Order/Processor/CartShippingProcessor.php +++ b/src/CoreShop/Component/Core/Order/Processor/CartShippingProcessor.php @@ -82,6 +82,11 @@ public function process(CartInterface $cart) return; } + if (!$cart->hasShippableItems()) { + $cart->setCarrier(null); + return; + } + $address = $cart->getShippingAddress() ?: $this->defaultAddressProvider->getAddress($cart); if (null === $address) {