Hi! I’m trying to get my shopify cart object from an external website. This is the code I’m using:
$.ajax({
type: ‘GET’,
url: ‘https://domain/cart.json’,
dataType: ‘jsonp’,
success: function(data) {
console.log(data);
}
});
but as a response I only get an empty cart with item count 0.
But when I open up https://domain/cart.json in my browser it works correctly and the cart object is filled with the right products. Also, when I open up https://domain/cart I can see the products in the cart.
Any idea why it doesn’t work via get request and how to fix this?
Thanks!