MrStatic Posted October 20, 2008 Share Posted October 20, 2008 (edited) Ok so this mod works but it does not for me. I use a mod I found here to change my attributes to radio buttons. Now I use a different function. So this line Search For: <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> Change to: <!-- Attrib price update //--> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, "onChange='showPrice(this.form);showPrice1(this.form);'");?></td> <!-- Proyecto Icaro (Fin Modificado) //--> Won't work for me. If I use that code but change the function no price shows, I have tried to just hard code the onchange part into the function itself but no go. The function is function tep_draw_radio_menu($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="radio" name="' . $name . '" value="' . $value . '"'; 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; } Any help would be appreciated. Edited October 20, 2008 by MrStatic Quote Link to comment Share on other sites More sharing options...
Guest Posted December 8, 2008 Share Posted December 8, 2008 (edited) I have the some problem... I'm using the the Radio Button selection for product attributes contribution and want to update the price - Options - Price Update works perfectly, but only for list boxes. "Radio Button selection for product attributes" makes only two changes: edit catalog/includes/functions/html_output.php add this new function tep_draw_radio_menu add this in somewhere before the final ?> //// // Output a form radio menu for product info page maniac101 function tep_draw_radio_menu($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="radio" name="' . $name . '" value="' . $value . '"'; 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; } //// ======================================================================= open and edit catalog/product_info.php find: <td class="main" colspan="2"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> replace with: <td class="main" colspan="2"><?php echo tep_draw_radio_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> Only the tep_draw_radio_menu in product_info.php, but there must be a problem with reading values from radio buttons with JS. And I don't know how to fix it... :( Edited December 8, 2008 by luxactor Quote Link to comment Share on other sites More sharing options...
dentalstrategy Posted October 20, 2009 Share Posted October 20, 2009 Hi, did you guys find out how to make this work? Options Price Update + Radio Button selection for product attributes. Any news, solution? I'm in the same situation... Thanks Quote Link to comment Share on other sites More sharing options...
jay-kay Posted November 12, 2009 Share Posted November 12, 2009 # How to make work Option Types v2 togehter with Options Price Update Due to german rules for online trade i have to update the price of an article after someone has changed some options. In my shop to be builded i have 2 different options 1.) simple dropdown - e.g. do you want the cards sold to be printet on one side or on both - an Options Price Update will immediatele change the total price due to the amount stated in database 2.) dropdown with picture - e.g. do you want the imprint in black only or do you want to add some red or green. The colours are shown in an example-text as soon as you pick them from an dropdownlist. but in that case the price will not be updatet - or worse, it will change to zero - 0,00 EUR. (thats too cheap :( ) As i already learned, the first case is handled in the product_info.php, the second in the module option_types.php. The only change i made in this module was in the line 167 as follows: $ImageSelector_Dropdown = '<select name="' . $Image_Dropdown_ID . '" onchange="document.getElementById(\'ImageSelect' . $product_info['products_id'] . '\').innerHTML=ImageText'.$product_info['products_id'].'[this.selectedIndex];showPrice(this.form);showPrice1(this.form);">' . $Image_Dropdown[$product_info['products_id']] . '</select> ' . $ProdOpt_Comment; without that - price will be always that of default option, after changing, an option with no addiditonal price will work correctly, with an extra price it will change to zero what can be the reason? :blink: Quote Link to comment Share on other sites More sharing options...
FedericoG Posted October 20, 2010 Share Posted October 20, 2010 Hi everyone, I've installed this contrib on a fresh osCommerce installation and it worked fine. But I cannot make the contrib work with the STS (Simple Template System). I would like to know if there is someone else having the same problem and if someone has resolved it. Thank you and have a nice day marut 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2011 Share Posted October 6, 2011 Hi, I installed this contribution and it seems to work fine. However initially before I select anything from the options drop down, it won't show a price. Is there any way to change this so it shows the base price? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2011 Share Posted October 13, 2011 Okay i checked and this only occurs in firefox (i'm running 7.01). This contribution works great in IE9 and Chrome. Please help me show the standard price on first page load. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 19, 2011 Share Posted October 19, 2011 another question i have is regarding the prices in my dropdown. is it possible to remove the +$99.99 and still have this contribution work? i was thinking if we just white out the price, then it will work and the customer won't see the number. thank you 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.