2

If any one is add products in cart by guest and after that login then how it will merge guest cart to customer login cart items by Rest API. if anyone found this solutions, please help me.

0
1

You can do this by using following api endpoint

Method - PUT 
{URL}/rest/V1/guest-carts/{guest-card-id} 
Param - { 
  "customerId": 3, 
  "storeId": 1 
} 
Authorization -"Bearer {user-token}"

There is also a known issue https://github.com/magento/magento2/issues/24808. It will be fixed in Magento 2.3.4.

I created an extension to fix this issue for the Magento version < 2.3.4. https://github.com/troublediehard/plab-cartsmergefix

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.