Data Store and Form Repeat

I wouldn’t consider this a bug, more of how Javascript works.

Essentially when you assign dynamic values you are binding them to a javascript variable. If you have an input with an id/name that is the same as a repeat data item, it will overwrite it in the immediate scope so when you use that for binding, you are no longer binding to the value but the input itself.

You could try a quick fix (I haven’t tried it yet but may be a simple solution):
change dmx-bind:value="id" to dmx-bind:value="$"
that way it should get the id value from the repeat rather than trying to bind to the input with name/id of “id”

Otherwise, there a little work but it is easy to overcome.
Firstly use an id for your inputs and make sure it is different to the data value name
In your API server action,
where you use the $_POST values (in inserts/updates/queries etc) adjust the binding to something like $_POST.new_id that way you can have names that don’t clash with the values filling the fields.

Alternatively, use a prefix for your cart:
set the cart’s value names to something like cart_id, cart_quantity