Djunity Posted January 25, 2009 Share Posted January 25, 2009 (edited) Hi there, I have been searching a week now for a module that does what i want sadly it looks like it doesn't exist. What i want is that for some attribute sets the selection must be a checkbox say like if you have an attribute set for accesiores so that an costumer can select more options. I did some editing of the osc code and managed to let the attributes to be shown in a verticly checkbox menu but saidly when you select more than one option only one is added to the shopping cart. The code i did is/ in catalog/includes/functions/html_output.php i added the following code function tep_draw_checkbox_field_attrib($name, $values, $default = '', $parameters = '', $required = false) { $field ='<table border="0" cellspacing="0" cellpadding="0"><tr><td class="main">'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $value = tep_output_string($values[$i]['id']); $field .= '<input type="checkbox" name="' . $name . '" value="' . $value . '"'; if ($i == 0) if ($i == 0) $field .= ' checked'; $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '<br>'; } $field .= '</td></tr></table>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } and in catalog/product_info.php i changed one line of code to <td class="main" colspan="2"><?php echo tep_draw_checkbox_field_attrib('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> Does any one know either an existing contribution that does what i want to do or can some one help me out to fix it so we can make the contibution. Current version can be seen at http://nbm.123hostingservice.nl/product_in...?products_id=44 Beste Regards Djunity Edited January 25, 2009 by Djunity Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.