This is sort of related to Store module: How to update cart quantity without submitting the cart? but I don't want to update that question b/c it is still relevant to other people. It turns out my issue is that our store uses price modifiers for the "quantity." So people order 1 item, but it might come in 500, 1000, 1500, or 2000. Instead of changing the item_qty field on the cart page, I need to be able to change a price modifier instead. This is what my template looks like thus far, and it sort of works, but instead of updating the existing item it just adds an entirely new item to the cart.
A simplified version of my cart template:
{exp:store:checkout next="cart/confirm" return="cart/ORDER_HASH"}
{!-- This seems to be the only way to get the full list of available
modifiers in this tag :( --}
{modifiers}
{if modifier_name == "Quantity" OR modifier_name == "quantity"}
{embed="cart/_product-modifiers"
entry_id="{entry_id}"
key="{key}"
option_id="{option_id}"
modifier_id="{modifier_id}"}
{/if}
{/modifiers}
{!-- Quantity is determined by the modifier since its a fixed amount, so set to 1
here so the product is actually added to the cart --}
<input type="hidden" name="item_qty[{key}]" value="1" />
<button type="submit" name="update_cart" class="item-quantity-update" value="Update Cart">Update Cart</button>
{/exp:store:checkout}
And the cart/_product-modifiers template to render this dropdown http://cl.ly/image/0e0Q0q391I0s:
{exp:store:product entry_id="{embed:entry_id}"}
{modifiers}
<select name="item[{embed:key}][modifiers_{embed:modifier_id}]">
{modifier_options}
<option value="{option_id}" {if "{embed:option_id}" == "{option_id}"}selected="selected"{/if}>{option_name}</option>
{/modifier_options}
</select>
{/modifiers}
{/exp:store:product}
item_qty
as a select which would make your life much easier.