Update quantity in data store

From the demo docs on creating a cart, the following works great:

This will upsert the quantity, but always adding 1 to the current quantity.

I cannot for the life of me figure out how to use a select, or input to provide the quantity instead of a static 1.

@Teodor What the heck am I missing here?

dmx-on:click="cart.upsert({sku: 'my_cool_product'},{qty: `qty + inp_qty.value.toNumber()`, sku: 'my_cool_product', product_name: 'My Cool Product'})"
Community Page
Last updated: