shu keat Posted June 2, 2009 Share Posted June 2, 2009 // return tep_draw_custom_pull_down_menu($name, $mb_array, '', $parameters, $systype, $fsb, $number); return tep_draw_custom_radio_field($name, $mb_array, '', $parameters, $systype, $fsb, $number); } // Output a form pull down menu for Custom Computer Creator // function tep_draw_custom_radio_field($name, $values, $default = '', $mb_array, '', $parameters, $systype, $fsb, $number); function tep_draw_custom_pull_down_menu($name, $values, $default = '', $parameters = '', $systype, $fsb, $number) { global $tax_rate, $languages_id; $field = '<select style="width:250;" name="' . tep_parse_input_field_data($name, array('"' => '"')) . '" id="' . tep_parse_input_field_data($name, array('"' => '"')) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= ' onChange="showimage(\'' . $number . '\', \'' . $name . '\')">'; for ($i=0; $i<sizeof($values); $i++) { $field .= '<option price="' . $values[$i]['price'] . '" name="images/' . $values[$i]['name'] . '" model="' . $values[$i]['model'] . '" value="' . $values[$i]['text'] . '"'; if ($values[$i]['default'] == $values[$i]['model']){ $field .= 'SELECTED'; } if ($values[$i]['price_diff'] == '0.00' || $values[$i]['price'] == '0.00'){ $new_price = ''; }else{ $price_fix = explode('-', $values[$i]['price_diff']); if ($price_fix[0] != '' || $price_fix[0] == '-'){ $new_price = '+' . $values[$i]['price_diff']; }else{ $new_price = '-' . $price_fix[1]; } } $field .= '>' . $values[$i]['text'] . ' ' . $new_price; } $field .= '</select>'; $reqn = explode('new', $name); if ($systype == ''){ }else{ $req_check = tep_db_query('select cat_req from '.TABLE_CCC_CAT.' where cat_id = "'.$number.'" and status = "1" order by sort_order asc'); $req = tep_db_fetch_array($req_check); if ($req['cat_req'] == '1'){ $need = '1'; } } if ($need == "1") { $field .= DROP_DOWN_REQUIRED . "<input type=hidden name=required" . $reqn[1] . " value=" . tep_parse_input_field_data($name, array('"' => '"')) . ">"; } return $field; } function tep_draw_custom_radio_field($name, $values, $default = '', $parameters = '', $systype, $fsb, $number) { for ($i=0; $i<sizeof($values); $i++) { if ($values[$i]['price'] == "" || $values[$i]['price'] == ""){ $selected = 'checked'; }else{ $selected = ''; } $new_num = explode('new', $name); $field .= '<br>'; $field .= '<input name="' . $name . '" type="radio", price="' . $values[$i]['price'] . '" pic="images/' . $values[$i]['name'] . '" model="' . $values[$i]['model'] . '"'; $field .= 'onClick="showimage(\''.$name.'\', \''.$i.'\', \''.$new_num[1].'\')" '.$selected.'>'; $field .= $values[$i]['text'] . ' ' .$values[$i]['price'].''; } $reqn = explode('new', $name); if ($systype == ''){ }else{ $req_check = tep_db_query('select cat_req from '.TABLE_CCC_CAT.' where cat_id = "' . $number . '" and status = "1" order by sort_order asc'); $req = tep_db_fetch_array($req_check); if ($req['cat_req'] == "1"){ $need = '1'; } } if ($need == "1") { //$field .= DROP_DOWN_REQUIRED . "<input type=hidden name=required" . $reqn[1] . " value=" . $name . ">"; } return $field; } ?> i really need help on this. please. // function tep_draw_custom_radio_field($name, $values, $default = '', $mb_array, '', $parameters, $systype, $fsb, $number); after i change to custom_radio_field, errors show out. i want to display the output, but cannot display. got anyone know how to fix this. PLEASE HELP ME. I WANT CHANGE FROM DROP DOWN LIST TO RADIO BUTTON AND DISPLAY THE OUTPUT. PLEASE HELP ME. WHO KNOW THE CODE OR HAVE ANY IDEAS....... PLEASE SEND ME. THOUSAND OF THANKS... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.