New Zenner
- Join Date:
- May 2011
- Posts:
- 5
- Plugin Contributions:
- 0
How do I create 148 checkboxes in the product entry page?
Zen Cart v1.3.9h
I have manually edited the database to add 148 fields in table "products", all of which can have values of "0" or "1." Some products will have them all 0, some products will have only one of them be 1, some products will have a few be 1, and very few products will have them be all 1.
If I edit /admin/includes/modules/product/collect_info.php to have:
<tr>
<td class="main">Y1W01 *TEST*</td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_Y1W01', $pInfo->products_Y1W01, zen_set_field_length(TABLE_PRODUCTS, 'products_Y1W01')); ?></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
and have added p.products_Y1W01 as one of the fields in the select at the top of the page
and have edited update_product.php to include
'products_Y1W01' => zen_db_prepare_input($_POST['products_Y1W01']),
in the $sql_data_array,
I am given a text box that can be edited with a one-digit number. Changing this updates the database (I checked with a separate php script to make sure it actually IS changing).
However, instead of a text box that will read "0" or "1," I would like to have it be a checkbox that can be ticked.
I've spent the last two days trying to understand the syntax of a checkbox and I'm just not getting it.
Can anyone help explain what I need to do?