File tree Expand file tree Collapse file tree 4 files changed +6
-1
lines changed
dev/tests/integration/testsuite/Magento/Usps/Model Expand file tree Collapse file tree 4 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -743,6 +743,7 @@ protected function _setFreeMethodRequest($freeMethod)
743
743
$r = $this->_rawRequest;
744
744
$weight = $this->getTotalNumOfBoxes($r->getFreeMethodWeight());
745
745
$r->setWeight($weight);
746
+ $r->setPackages($this->createPackages((float)$r->getFreeMethodWeight(), []));
746
747
$r->setService($freeMethod);
747
748
}
748
749
Original file line number Diff line number Diff line change @@ -523,6 +523,9 @@ protected function _setFreeMethodRequest($freeMethod)
523
523
$weight = $this->getTotalNumOfBoxes($r->getFreeMethodWeight());
524
524
$weight = $this->_getCorrectWeight($weight);
525
525
$r->setWeight($weight);
526
+ $r->setPackages(
527
+ $this->createPackages((float)$r->getFreeMethodWeight(), [])
528
+ );
526
529
$r->setAction($this->configHelper->getCode('action', 'single'));
527
530
$r->setProduct($freeMethod);
528
531
}
Original file line number Diff line number Diff line change @@ -474,6 +474,7 @@ protected function _setFreeMethodRequest($freeMethod)
474
474
$r->setWeightPounds(floor($weight));
475
475
$ounces = ($weight - floor($weight)) * self::OUNCES_POUND;
476
476
$r->setWeightOunces(sprintf('%.' . self::$weightPrecision . 'f', $ounces));
477
+ $r->setPackages($this->createPackages((float)$r->getFreeMethodWeight(), []));
477
478
$r->setService($freeMethod);
478
479
}
479
480
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ public function testPartialFreeShippingWithCoupon(): void
341
341
$this->assertEquals('ALL', $firstRequest->Package->Service);
342
342
$this->assertEquals('20', $firstRequest->Package->Pounds);
343
343
$this->assertEquals('Priority', $secondRequest->Package->Service);
344
- $this->assertEquals('20 ', $secondRequest->Package->Pounds);
344
+ $this->assertEquals('10 ', $secondRequest->Package->Pounds);
345
345
$price = $this->getShippingMethodAmount($methods, 'usps', '1');
346
346
$this->assertEquals(6.70, $price);
347
347
}
You can’t perform that action at this time.
0 commit comments