Originally Posted by
schoolboy
Glad to be of assistance... we wish you all the best in your zencart venture(s)...
Almost done! Thanks also lat9 but I went for the intense option as found here at the cornerpiece blog and here courtesy of crazy_chris - it works great!
One thing I can't sort out though - I have text fields atm saying Organic: and Fair Trade: where you add a 1 or 0 in the admin field to trigger each icon.
I need these to be radio buttons not text fields. How do I grab the values of these? My current code [in admin/includes/modules/product/collect_info.php]:
PHP Code:
'products_fairtrade' => '',
'products_organic' => '',
and
PHP Code:
<tr>
<td class="main"><?php echo 'Fairtrade '; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . ' ' .
zen_draw_input_field('products_fairtrade', $pInfo->products_fairtrade, zen_set_field_length(TABLE_PRODUCTS_EXTRA_STUFF, 'products_fairtrade')); ?></td>
</tr>
<tr>
<td class="main"><?php echo 'Organic '; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . ' ' .
zen_draw_input_field('products_organic', $pInfo->products_organic, zen_set_field_length(TABLE_PRODUCTS_EXTRA_STUFF, 'products_organic')); ?></td>
</tr>
Here's what I'm thinking:
PHP Code:
'products_fairtrade' > '0',
PHP Code:
##'products_organic' > '0',
and
PHP Code:
<tr>
<td colspan="2"><?php echo zen_draw_checkbox_field('products_fairtrade', ' id="products_fairtrade"') . "Fair Trade"; ?><br /></td>
<td colspan="2"><?php echo zen_draw_checkbox_field('products_organic', ' id="products_organic"') . "Organic"; ?><br /></td>
</tr>
But how do I save these values to my custom tables located at pdex.products_fairtrade and pdex.products_organic? I'm sure I'm missing something quite important!
Thanks,
John
Bookmarks