Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 80ed833

Browse files
committed
Added fix for issue 2991 to fetch billing and shipping addresses to enable getting a correct price through the (web) API after adding a product to an empty cart
1 parent 08ec8ce commit 80ed833

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ public function createEmptyCart()
232232
$quote->setShippingAddress($this->quoteAddressFactory->create());
233233

234234
try {
235+
$quote->getBillingAddress();
236+
$quote->getShippingAddress()->setCollectShippingRates(true);
235237
$this->quoteRepository->save($quote);
236238
} catch (\Exception $e) {
237239
throw new CouldNotSaveException(__('Cannot create quote'));

0 commit comments

Comments
 (0)