public getSummary ( ) : WellCommerce\Bundle\OrderBundle\Entity\OrderSummaryInterface | ||
return | WellCommerce\Bundle\OrderBundle\Entity\OrderSummaryInterface |
/** * Converts the order's gross total to target currency * * @param OrderInterface $order * * @return float */ protected function convertAmount(OrderInterface $order) { $amount = $order->getSummary()->getGrossAmount(); $baseCurrency = $order->getCurrency(); return $this->getCurrencyHelper()->convert($amount, $baseCurrency); }
private function createDetails(OrderInterface $order) : Details { $shippingCosts = $order->getModifier('shipping_cost'); $details = new Details(); $details->setShipping($shippingCosts->getNetAmount()); $details->setTax($order->getSummary()->getTaxAmount()); $details->setSubtotal($order->getProductTotal()->getNetPrice()); return $details; }