Skip to content

Commit

Permalink
Merge pull request #130 from magento-fearless-kiwis/FearlessKiwis-MAG…
Browse files Browse the repository at this point in the history
…ETWO-MAGETWO-45024-Shipping-Amount-Incorrect-Currency

[FearlessKiwis] Bug fix
  • Loading branch information
Tang, Yu(ytang1) committed Nov 5, 2015
2 parents 869f987 + 938156a commit acd35f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public function collect(
$total->setBaseTotalAmount($this->getCode(), $rate->getPrice());
$shippingDescription = $rate->getCarrierTitle() . ' - ' . $rate->getMethodTitle();
$address->setShippingDescription(trim($shippingDescription, ' -'));
$total->setShippingAmount($rate->getPrice());
$total->setBaseShippingAmount($rate->getPrice());
$total->setShippingAmount($amountPrice);
$total->setShippingDescription($address->getShippingDescription());
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ protected function setUp()
'Magento\Quote\Model\Quote\Address\Total',
[
'setShippingAmount',
'setBaseShippingAmount',
'setBaseTotalAmount',
'setTotalAmount',
'setShippingDescription',
Expand Down Expand Up @@ -229,9 +230,12 @@ public function testCollect()
$this->priceCurrency->expects($this->once())
->method('convert')
->with(5, $this->store)
->willReturn(5);
->willReturn(10);
$this->total->expects($this->once())
->method('setShippingAmount')
->with(10);
$this->total->expects($this->once())
->method('setBaseShippingAmount')
->with(5);
$this->rate->expects($this->once())
->method('getCarrierTitle')
Expand Down

0 comments on commit acd35f4

Please sign in to comment.