2

I can successfully add item to the cart using this rest API from my APP.

POST /V1/carts/mine/items

However the item is added with a price of ZERO.

The new quote was created from the APP using this API.

POST /V1/carts/mine

But when I try to add an item from magento web the price is showing correct value.

I am using magento 2 .

  • This was 5 months ago and was there any solution? Its disappointing that magento dev experts aren't addressing this issue – madi Feb 23 '17 at 8:44
3
Here is the solution of this issue

Open file 'vendor/magento/module-quote/Model/QuoteManagement.php'.
Find function 'createEmptyCartForCustomer'.
Add below code inside try{}  (at start of try), before line number 234
$quote->getBillingAddress();
$quote->getShippingAddress()->setCollectShippingRates(true);
After adding these 2 lines it will not show 0 price again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.