protected function recalculateShippingTotal(OrderInterface $order)
 {
     $grossAmount = $order->getShippingTotal()->getGrossAmount();
     $taxRate = $order->getShippingMethod()->getTax()->getValue();
     $currency = $order->getCurrency();
     $orderTotal = $this->orderTotalFactory->createFromSpecifiedValues($grossAmount, $taxRate, $currency);
     $order->setShippingTotal($orderTotal);
 }
Beispiel #2
0
 protected function prepareOrderShippingDetails(CartInterface $cart, OrderInterface $order)
 {
     $cost = $cart->getShippingMethodCost()->getCost();
     $grossAmount = $this->currencyHelper->convert($cost->getGrossAmount(), $cost->getCurrency(), $order->getCurrency());
     $taxRate = $cost->getTaxRate();
     $orderTotal = $this->orderTotalFactory->createFromSpecifiedValues($grossAmount, $taxRate, $order->getCurrency());
     $order->setShippingTotal($orderTotal);
 }