@@ -159,7 +159,7 @@ class QuoteManagement implements \Magento\Quote\Api\CartManagementInterface
159
159
* @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository
160
160
* @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository
161
161
* @param \Magento\Customer\Model\CustomerFactory $customerModelFactory
162
- * @param \Magento\Quote\Model\Quote\AddressFactory $quoteAddressFactory,
162
+ * @param \Magento\Quote\Model\Quote\AddressFactory $quoteAddressFactory
163
163
* @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper
164
164
* @param StoreManagerInterface $storeManager
165
165
* @param \Magento\Checkout\Model\Session $checkoutSession
@@ -221,7 +221,7 @@ public function __construct(
221
221
}
222
222
223
223
/**
224
- * { @inheritdoc}
224
+ * @inheritdoc
225
225
*/
226
226
public function createEmptyCart ()
227
227
{
@@ -241,7 +241,7 @@ public function createEmptyCart()
241
241
}
242
242
243
243
/**
244
- * { @inheritdoc}
244
+ * @inheritdoc
245
245
*/
246
246
public function createEmptyCartForCustomer ($ customerId )
247
247
{
@@ -257,7 +257,7 @@ public function createEmptyCartForCustomer($customerId)
257
257
}
258
258
259
259
/**
260
- * { @inheritdoc}
260
+ * @inheritdoc
261
261
*/
262
262
public function assignCustomer ($ cartId , $ customerId , $ storeId )
263
263
{
@@ -332,7 +332,7 @@ protected function createCustomerCart($customerId, $storeId)
332
332
}
333
333
334
334
/**
335
- * { @inheritdoc}
335
+ * @inheritdoc
336
336
*/
337
337
public function placeOrder ($ cartId , PaymentInterface $ paymentMethod = null )
338
338
{
@@ -349,6 +349,8 @@ public function placeOrder($cartId, PaymentInterface $paymentMethod = null)
349
349
350
350
$ data = $ paymentMethod ->getData ();
351
351
$ quote ->getPayment ()->importData ($ data );
352
+ } else {
353
+ $ quote ->collectTotals ();
352
354
}
353
355
354
356
if ($ quote ->getCheckoutMethod () === self ::METHOD_GUEST ) {
@@ -379,7 +381,7 @@ public function placeOrder($cartId, PaymentInterface $paymentMethod = null)
379
381
}
380
382
381
383
/**
382
- * { @inheritdoc}
384
+ * @inheritdoc
383
385
*/
384
386
public function getCartForCustomer ($ customerId )
385
387
{
@@ -406,6 +408,8 @@ public function submit(QuoteEntity $quote, $orderData = [])
406
408
}
407
409
408
410
/**
411
+ * Convert quote items to order items for quote
412
+ *
409
413
* @param Quote $quote
410
414
* @return array
411
415
*/
0 commit comments