Basically Ive added a field to the product node called mp3preview. Which holds html to display an flash mp3 player with the proper agruements. Now Ive tried extending the tables but ive only gotten it to display the column MP3PREVIEW. but the values are empty. take a look at the code
<code>
<?php
// $Id$
function ucproductfield_table_alter($table_id, $op) {
if ($table_id == 'uc_product_table') {
switch ($op) {
case 'fields':
$fields[] = array('name' => 'mp3preview', 'title' => t('Mp3 Preview'), 'weight' => 3, 'enabled' => TRUE);
return $fields;
case 'data':
$result = db_query("SELECT field_mp3preview_value FROM {content_type_product}");
while ($row = db_fetch_object($result)) {
$data['mp3preview'][] = $row->mp3preview;
}
return $data;
}
}
}That is what I have in my module
and
http://www.queencitybeats.com/catalog/1/club_beats
this is what displays.



Joined: 04/23/2008