Created
October 6, 2021 22:38
-
-
Save procarrera/9e17288ecb33ed3fdbb5c822b2a626e4 to your computer and use it in GitHub Desktop.
Update Line Properties Shopify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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