Skip to content

Instantly share code, notes, and snippets.

@procarrera
Created October 6, 2021 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save procarrera/9e17288ecb33ed3fdbb5c822b2a626e4 to your computer and use it in GitHub Desktop.
Save procarrera/9e17288ecb33ed3fdbb5c822b2a626e4 to your computer and use it in GitHub Desktop.
Update Line Properties Shopify
const updates = {}
updates['line'] = cart_line
updates['quantity'] = quantity
updates['properties'] = properties
const response = await fetch("/cart/change.js", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
},
body: JSON.stringify(updates),
});
const data = await response.json()
console.log(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment