cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API Magento 2 - Merging of two carts

Rest API Magento 2 - Merging of two carts

Hi Alan,

 

I am looking for your help on below concern -

 

What is the way of merging two carts (taking scenario – guest user added items into cart and before checkout he logged in, so his previous added cart should be merged with new cart).

 

Actually we are in a project where Magento 2 CE is used as the commerce service provider. Usually when a guest user who has items in Cart, login the cart gets merged to the customer's cart and the guest cart will be deleted. How can the same be achieved using Rest APIs in Magento 2? We know that in WCS, we needed to pass the guest token as a header to the Registered user login Rest API. Can someone help us on this?

 

Regards,

Nid