Toujours module DHL

This commit is contained in:
2020-12-06 11:12:30 +01:00
parent ef16a65ce8
commit 76158efb64

View File

@@ -154,10 +154,12 @@ class DHL extends AbstractDeliveryModule
);
}
$postageArray = DHLDeliveryPriceQuery::create()
->findByAreaId($areaId);
$postage = current($postageArray);
$deliveryPrice = DHLDeliveryPriceQuery::create()
->filterByAreaId($areaId)
->filterByMaxWeight($weight, Criteria::GREATER_EQUAL)
->orderByMaxWeight(Criteria::ASC)
->findOne();
while (prev($areaPrices)) {
if ($weight > key($areaPrices)) {