learnshopify.dev/Workspace
js component

In each card's click handler, add the product to the cart with no reload: POST `{ id: id, quantity: 1 }` to `/cart/add.js`, then call `refresh()` (it re-reads the cart and updates the header count), then set `btn.textContent = "Added"` and `btn.classList.add("is-added")`. `refresh()` is written for you.

0 / 1 task solved
northwind-coffee.com
Live Storefront