-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can’t get Shopify cart via jsonp crossdomain anymore #8
Comments
Interesting. It's possible that JSONP is no longer accepted but would have to look into it. |
To test I'm running your script in the console. I get the response from shopify, it's just without any items which I can see are in the cart when I visit the shop. This could be far fetched, but I think I've figured it out. It looks like it works when I have https setup and only when i'm running the script from the same main domain. So it works when I run it on a subdomain of the main shopify store. But cross-domain with a totally different domain doesn't look like it works anymore. Could be related to chrome setting Edit: I can confirm that it get the correct cart when request is made from a subdomain of the same main Shopify domain and over ssl. To test locally i suggest running your local server over https (adding certificates was a pain) and adding a testing subdomain.maindomain to your hosts file. |
Looks like @oscarni is correct about the cookies. My shop is on a subdomain, so I'm able to set my own cookie that is usable by both domains. |
I’m using “Get Shopify cart data with JSONP“. Since a couple of days ago the request returns empty carts. Anyone else experiencing the same?
I make sure the Shopify store has items in the cart, but when getting the cart via Jsonp from another domain the cart response is without any cart items. Did Shopify change it’s api in some way?
The text was updated successfully, but these errors were encountered: