I am planning to use Magento2 web-service using SOAP. This will be for Mobile App where customer are allowed to add to cart then checkout. The store will be a multi-store website where the customer can easily change the store of their choice.
To initialize quote / empty cart, we can use web-service:
but this doesn't have
storeId as an input request (unlike Magento1)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="http://magento210.dev/soap/default?services=quoteGuestCartManagementV1"> <soap:Header/> <soap:Body> <def:quoteGuestCartManagementV1CreateEmptyCartRequest/> </soap:Body> </soap:Envelope>
Since website will be multi-store one,
store_id of quote needs to be updated as they switch the store. The following questions remain unanswered for me:
- How will we update the store_id of a quote?
- OR How can we add to cart as per store?