On my view_cart.php I have an overview of all the products to be ordered. Here I like to get the total quantity of products.
Every row represents a product where i have a field like
<input type="hidden" name="item_qty[0]" value="3" />
and for example
<input type="hidden" name="item_qty[1]" value="5" />
<input type="hidden" name="item_qty[2]" value="2" />
Now i like to get the total (here 10) to specify some shipping. I tried
$("input[name='item_qty[]']").each(function() {
test_qty += $(this).val();
});