EgonS Posted May 6, 2006 Posted May 6, 2006 I'm using the css buttons contrib. I'm having some trouble with changing the titles in for example the shopping cart. Where it says remove, product(s), qty., total it uses the same table background as the boxes do. Now I would like to give that in the shopping cart, product listing, and everywhere else it shows this, a different CSS class. But how? :huh: Then there are the radio buttons and checkboxes. There is the INPUT, CHECKBOX, RADIO in the stylesheet. So I made INPUT seperate. But the checkboxes and radio buttons use the INPUT. And this makes it all look a bit screwy. How do I give the checkboxes and radio buttons a different class? It's probably done in the html_output.php... but I have no real PHP knowledge...
Guest Posted May 6, 2006 Posted May 6, 2006 its mainly html changes you have to do. You could create additional css classes for instance say you wanted a second class for the the input checkbox box the you do INPUT.new_check_box { background-color: #FF0000; } Then you edit the catalog\shopping_cart.php where it draws the checkbox and you pass in the parameter field on the call to the tep_draw_checkbox_field function the class (4th argument).
EgonS Posted May 6, 2006 Author Posted May 6, 2006 Ok thank you enigma1. But I can't seem to get it working :-" :blush: . There is 'params' => 'class="productListing-data" valign="top"', But I change that how I want. But nothing changes on the site.
Guest Posted May 7, 2006 Posted May 7, 2006 where is the code that you changed for the checkboxes? Can you post it?
EgonS Posted May 7, 2006 Author Posted May 7, 2006 I have changed nothing yet. I tried to change the shopping_cart.php from what you told me. I changed the last line of... $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); (changed ['id] into ['checkbox'], then added , class='checkbox' and as last I tried behind the class behind the ). But nothing changed). I figured since I want the radio and checkbox changed through the whole site and not just the shopping cart. I needed to change something (no idea what) in //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) { $selection .= ' CHECKED'; } if (tep_not_null($parameters)) $selection .= ' ' . $parameters; $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters); } in catalog/includes/functions/html_output.php. :huh:
Guest Posted May 7, 2006 Posted May 7, 2006 no, the 'id' is used to identify the product id the checkbox is associated with, ok just change this line: 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); to 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false, 'class="new_check_box"')); and define the new_check_box like this in your stylesheet.css INPUT.new_check_box { background-color: #FF0000; } That's what I said earlier Then you edit the catalog\shopping_cart.php where it draws the checkbox and you pass in the parameter field on the call to the tep_draw_checkbox_field function the class (4th argument).
EgonS Posted May 7, 2006 Author Posted May 7, 2006 Ah see... I forgot the false, and the ' and... Ok ok I screwed up :lol: . Thank you very much Enigma1. This seems to do the job. All I need to do now is find out how to get the class in all the checkboxes and radio (but that shouldn't be to hard now :blink: ). Maybe I can even find my table titles problem myself. But if anyone here has the solution... it's always welcome :D .
EgonS Posted May 7, 2006 Author Posted May 7, 2006 Ok... maybe not... the create_account.php has me completly puzzled :(
Recommended Posts
Archived
This topic is now archived and is closed to further replies.