From b5bacba8c01453cd04191875427c4c3152f66cd6 Mon Sep 17 00:00:00 2001 From: Joeri van Veen Date: Thu, 11 Jul 2024 14:25:39 +0200 Subject: [PATCH] fix(checkout): take carrier specific mailbox weight into account --- Model/Quote/Checkout.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Model/Quote/Checkout.php b/Model/Quote/Checkout.php index fc0a14c4..27df9619 100644 --- a/Model/Quote/Checkout.php +++ b/Model/Quote/Checkout.php @@ -221,7 +221,9 @@ private function getDeliveryData(?string $packageType = null): array && ($allowPickup || $allowStandardDelivery || $allowMorningDelivery || $allowEveningDelivery); if ($allowDeliveryOptions && $packageType === AbstractConsignment::PACKAGE_TYPE_MAILBOX_NAME) { - $allowDeliveryOptions = $this->helper->getBoolConfig($carrierPath, 'mailbox/active'); + $this->package->setMailboxSettings($carrierPath); + $allowDeliveryOptions = $this->helper->getBoolConfig($carrierPath, 'mailbox/active') + && $this->package->getMaxMailboxWeight() >= $this->package->getWeight(); } $myParcelConfig['carrierSettings'][$carrier] = [