51 if (
$quote->getIsVirtual()) {
52 $quote->setBillingAddress($addressInformation->getAddress());
54 $quote->setShippingAddress($addressInformation->getAddress());
55 $quote->getShippingAddress()->setCollectShippingRates(
true)->setShippingMethod(
56 $addressInformation->getShippingCarrierCode() .
'_' . $addressInformation->getShippingMethodCode()
61 return $this->cartTotalRepository->get(
$cartId);
71 if (
$quote->getItemsCount() === 0) {
72 throw new \Magento\Framework\Exception\LocalizedException(
73 __(
'Totals calculation is not applicable to empty cart')