Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're developing a Shopify App that implements the add to cart functionality from the Ajax API.
Is there a way that we can programatically get the required section ids from the theme so that we can make a bundled rendering of the cart, regardless of the theme being used?
const formData = new FormData()
formData.append('id', variantId)
formData.append('quantity', quantity)
formData.append('utf8', '✓')
formData.append('form_type', 'product')
formData.append('sections', sections) // ← This is the value we are missing
await fetch(`/cart/add`, {
method: 'POST',
headers: {
'x-requested-with': 'XMLHttpRequest',
accept: 'application/javascript',
'Content-Type': 'multipart/form-data',
},
body: JSON.stringify(formData)
});
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024