Updating quantity of product (Shopping cart)

If you change this line from:

<td><input id="quantity" name = "quantity" type="text" value="<%= item.quantity %>" size="1" /></td>

to:

text_field_tag "items[#{item.id}]", item.quantity, :id => "items_#{item.id}"

it will create a hash of values params[:items] that you can then cycle through and update your cart items.

e.g. params[:items].each { | id, qty | ...update routine.... }

HTH, Nicholas