9

if 2 items in cart if customer login both item should need to add cart , Both quote (before login & after login) merge and create final quote which contain all item of customer quote

Refference links that i got in google

https://magento.stackexchange.com/a/62481

https://magento.stackexchange.com/a/30460

  • Please clarify question more. because magento 2.2 provide default functionality. – Yogesh Nov 2 '17 at 9:41
  • is it possible if customer login add cart items to customer cart, if possible please explain, Using REST API. – nagendra Nov 3 '17 at 6:46
  • @Yogesh My products API returns products, if i try with customer i am getting error, my url : 192.168.1.65/anusthana/api/rest/customers error : snag.gy/0jbhTr.jpg can u help me – zus Oct 23 '18 at 11:05
2

By default, Magento 2 in API side does not provide any API for Merge guest cart with customer card when the customer is login.

But you can replace the guest cart with customer cart.

API : (/V1/carts/:cartId) 
File : vendor/magento/module-quote/Model/QuoteManagement.php
Function : public function assignCustomer($cartId, $customerId, $storeId)

But if you want to develop functionality Merge cart Live Magento web side you need to create custom API.

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.