Contributions

Other (Category Index)
Search: 

Show Real Price on drop down in product_info.php

This mod will display the real price on the drop down when you check for Product Information.

Instead of having (+$8.00) or (-$8.00) on the drop down, it calculates the exact amount and readily display it on the drop down.

I have included a sample image to display the effect. Instructions included on a separate file

Single file to edit, product_info.php

Expand All / Collapse All

Real Price when necessary netslt 18 Oct 2004

Insert this instad of previous code if you only want to show the price in the select box when the option really has a different price (+ or -) from standard price:

if ($products_options['options_values_price'] != '0') {
if ($products_options['price_prefix'] == '+'){
$real_price = ($product_info['products_price']) + ($products_options['options_values_price']);
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($real_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}else{
$real_price = ($product_info['products_price']) - ($products_options['options_values_price']);
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($real_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}
}

Show Real Price on drop down in product_info.php Paul Barrera 4 Oct 2004

Note: Contributions are used at own risk.