Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Option Prices


julia

Recommended Posts

Hey there.

I don't want the option prices to show up in the drop down menu, so I was thinking I could change the font color to white, and then it wouldn't show, but wouldn't change the functionality of the website. So....how do I do that??

Here is the bit of code....I think...When I get some time I'm taking a php class.

Thanks for any help. I wouldn't have gotten this far without this forum!!

Julie

 

$selected_attribute = false;

$products_options_array = array();

$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 = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name");

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

$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);

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

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

}

}

 

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

} else {

$selected_attribute = false;

}

?>

<tr>

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

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . $products_options_name['products_options_comment']; ?></td>

</tr>

Link to comment
Share on other sites

Why don't you want the option prices to show? How are your customers going to know how much extra the option costs? If they don't cost anything extra, then just set the option price to 0, and by default it won't show.

Link to comment
Share on other sites

Why don't you want the option prices to show? How are your customers going to know how much extra the option costs? If they don't cost anything extra, then just set the option price to 0, and by default it won't show.

 

Hey there.

 

The prices are going to be listed in the description, just to make it look a little better. So we will have the actual price listed, not a + sign and the add on.

Julie

http://www.olivialitton.com/osCommerce

Link to comment
Share on other sites

In that case, rather than making the text white, which is a bit of a nasty solution, just comment out the following lines

 

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

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

}

 

 

 

Like so:

 

/*

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

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

}

*/

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...