Using this thread I successfully added a "Condition" field to my products. Now all my products are marked as New, Refurbished or UNKNOWN (which I'll manually fix later)
A few notes:
The instructions webego has in post 1 are critical. I followed them exactly except I change products_colour to products_description.
http://www.zen-cart.com/forum/showthread.php?t=120523
Then the followup by webego is also critical:
http://www.zen-cart.com/forum/showpost.php?p=800718&postcount=74
I wanted a dropdown instead of a textbox so I followed the instructions from this post:
http://www.zen-cart.com/forum/showpost.php?p=729468&postcount=8
However I modified it slightly. I didn't want to use a database to store my option values and instead hardcoded them in. Here was the code I ended up with:
<!-- BOF - Additional field added -->
<?php
$condition_array = array(array('id' => '', 'text' => TEXT_NONE));
$condition_array[] = array('id' => 'New', 'text' => 'New');
$condition_array[] = array('id' => 'Refurbished', 'text' => 'Refurbished');
?>
<tr>
<td class="main"><?php echo 'Condition: '; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . ' ' .
zen_draw_pull_down_menu('products_condition',$condition_array, $pInfo->products_condition); ?></td>
</tr>
<!-- EOF - Additional field added -->
This replaces Step 5 in the original post.
Finally I was able to intelligently set my values because my product names 'mostly' started with New or Refurbished. So I came up with this SQL query to populate my table.
INSERT cart1_products_extra_stuff (products_id, products_condition)
SELECT products_id, IF( LOWER( LEFT( products_name, 3 ) ) = 'new', 'New', IF( LOWER( LEFT( products_name, 3 ) ) = 'ref', 'Refurbished', 'UNKNOWN' ) )
FROM cart1_products_description
Which probably isn't of much help to anyone but I wanted to show off :)
Anthony Taylor
Webmaster
http://buydentalequipment.com
DentalPlanet Designed/Administrated by Falls Geek