I have a webpage where users can add products from 3rd party commerce sites (amazon, shopify, magento, etc) from my page. users select multiple products then click checkout, then the page redirects them to the checkout page in the 3rd party commerce site.
this works fine with Amazon as they have a server-side API that we proxy. Input: a bunch of products, output: a checkout URL. pretty simple and it works pretty well.
we're stuck with magento, however.
- There is no public API for adding a product to a user's remote cart
- The undocumented API only supports adding a single product at a time, so supporting multiple products requires multiple API calls (which is slow)
- Most magento sites do not support HTTPS and/or redirect to HTTP all the time, and our site uses HTTPS. Thus, it doesn't really work.
- We run into CORS issues when we try AJAX requests - we're currently hacking it with iframes.
- The first request gives us a "no cookie" error page instead of actually adding it to the cart.
Is there a way to solve this? Does magento support CORS requests? What is magento's support with HTTPS?
I see http://community.magento.com/t5/Programming-Questions/API-Redirecting-user-to-magento-instance-to-view-their-cart/m-p/9113#M2029 which requires our client to install an extension, but that may not be acceptable