Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help on "Actual Price in Pull Down Option Menu" to work also with radio buttons


crica

Recommended Posts

Hello,

 

im not good in php.I only know copying and pasting following your directions.

Anyway, the contrubution "Actual Price in Pull Down Option Menu" worked just fine on my drop down options.

But i need it on radio buttons and i´ve installed another contrib "Option_Type_Feature_1.7.2" .

 

i printed out codes, compared, but nothing.

 

if isnt ask too much could you take a look at the code i have to radio buttons and tell me how to adapt it to Actual "Price in Pull Down Option Menu" contrib?

 

Thanks a lot!

 

case PRODUCTS_OPTIONS_TYPE_RADIO:

//CLR 030714 Add logic for radio buttons

$tmp_html = '<table>';

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");

$checked = true;

while ($products_options_array = tep_db_fetch_array($products_options_query)) {

$tmp_html .= '<tr><td class="main">';

$tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked);

$checked = false;

$tmp_html .= $products_options_array['products_options_values_name'] ;

$tmp_html .=$products_options_name['products_options_comment'] ;

if ($products_options_array['options_values_price'] != '0') {

$tmp_html .= '(' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

$tmp_html .= '</tr></td>';

}

$tmp_html .= '</table>';

?>

<tr>

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>

<td class="main"><?php echo $tmp_html; ?></td>

</tr>

<?php

break;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...