Hi
I’m trying to update cart attributes like this
fetch('/cart/update.js', {
method: "POST",
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json;'
},
body: JSON.stringify({
attributes: {
foo: { bar: "123" }
}
})
})
It successfully updates the cart, saves the result as a string (it should be an object, right?)
But… the string is a stringified object of PHP, not Javascript
Does anyone know how to deal with this?
