Re: Newbie need
Sorry about the confusing message. Here is a better explanation:
in the file named "/product_info.tpl.php" I changed:
PHP:
echo tep_draw_input_field('sub_products_qty[]', '0', 'size="5"') .
tep_draw_hidden_field('sub_products_id[]',
$sub_products['products_id']);
To:
PHP:
echo tep_draw_checkbox_field('sub_products_qty[]', 1) .
tep_draw_hidden_field('sub_products_id[]',
$sub_products['products_id']);
the code works but this happens:
suppose there are 8 subproducts,
1. click 1 checkbox (any) = only 1st product get added
2. Click any 2 checkboxes = first 2 products get added
3. check any 3 = only first three products get added
So if I check only the 8th box, the 1st product gets added instead.
I think the problem is, when a checkbox is not checked, it doesn't
send anything. It somehow need to send the quantity value "0". Could
we add a hidden field to send 0 value for unchecked products? Or, is
there a way to define
checked=1
uncheked=0
Thanks
|