Headless commerce and custom storefronts with Shopify APIs and SDKs
I'm working in the Boundless theme, and I want to add a gift wrapping option with a checkbox in the slide out cart on the right of the home page. I've got the checkbox and am able to add to the cart but only when i refresh the page. Here's my code below to add to the cart:
<script>
/*6590925701297*/
function giftWrapping(){
jQuery.post('/cart/add.js',
{
items: [
{
quantity: 1,
id: 39394015510705
}
]
});
alert("Updated jQuery");
}
</script>
Is there a way to add the item to the cart in realtime without having to refreshing the page? Heres the gift wrapping option I'm referencing (https://shopify.dev/tutorials/customize-theme-add-gift-wrap-option).
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By