Skip to content

Commit f6bd8c4

Browse files
committed
AC-15664::shipping method issue fix for inncorrect price
1 parent 588eac3 commit f6bd8c4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/code/Magento/Multishipping/Block/Checkout/Overview.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ public function getShippingAddressRate($address)
234234
public function getShippingPriceInclTax($address)
235235
{
236236
$rate = $address->getShippingRateByCode($address->getShippingMethod());
237-
$exclTax = $rate->getPrice();
238-
$taxAmount = $address->getShippingTaxAmount();
239-
return $this->formatPrice($exclTax + $taxAmount);
237+
$baseAmount = (float)$rate->getPrice();
238+
$baseTaxAmount = (float)$address->getBaseShippingTaxAmount();
239+
$store = $this->getQuote()->getStore();
240+
$converted = $store->getBaseCurrency()->convert($baseAmount + $baseTaxAmount, $store->getCurrentCurrencyCode());
241+
return $this->formatPrice($converted);
240242
}
241243

242244
/**
@@ -248,8 +250,10 @@ public function getShippingPriceInclTax($address)
248250
public function getShippingPriceExclTax($address)
249251
{
250252
$rate = $address->getShippingRateByCode($address->getShippingMethod());
251-
$shippingAmount = $rate->getPrice();
252-
return $this->formatPrice($shippingAmount);
253+
$baseAmount = (float)$rate->getPrice();
254+
$store = $this->getQuote()->getStore();
255+
$converted = $store->getBaseCurrency()->convert($baseAmount, $store->getCurrentCurrencyCode());
256+
return $this->formatPrice($converted);
253257
}
254258

255259
/**

0 commit comments

Comments
 (0)