I am writing a web app that communicates with Magento API for reading product data and then allowing the user to add to cart products they wish to purchase.
All API calls are done using a login I added via the admin site.
When the user finishes the selection process are redirected to the shopping cart on the Magento instance and complete the purchase.
And that's the tricky bit - calls to the API are done using a specific admin user, under this user session. The cart is also added to this admin session. When my user is redirected to the site they won't see anything there, since it's not their session - they are arriving to the site as guests.
One way to solve this would be to make the add to cart from JS and not server side, because this will associate the cart with the browser and not with my server side logic, but I'm not aware of a way to do this. Not to mention cross-domain JS issues.
So - Is there somewhere in the API something that can help me do something like retrieve a URL I can redirect the user to - this URL will associate the cart with the user who is redirected to this URL and then they can see the cart.
This sounds like a reasonable requirement and I believe it should be available one form or another in the current API. At least I hope so.. :)
I prefer to avoid (if possible) writing custom APIs for this.
Any help would be much appreciated!
Thanks!