Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Display - calculated price -- i'm soo close!


bettyboop

Recommended Posts

I am simply trying to get the attribute pull-downs to display the actual price of the item, not the +/-price. I've seen this in the forums over and over and haven't come across a real solution. i have edited product_info.php around line 115 to this:

        // start loop

       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') {



	 // ------------ MINUS ---------

	 if ($products_options['price_prefix'] == '-') { 	 

	 //echo ("minus");

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

	 }

	 

	 // ----------- PLUS ------------

	 if ($products_options['price_prefix'] == '+') {

	 //echo ("plus");

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

	 }     	 

         }

       }

       // end loop

 

-----------------------

and it displays the correct numbers, but doesn't do the calculations. i've tried and tried to get it to work, and am giving up for now and posting this in hopes some kind soul can show me how to get it right. Thank you so much in advance!

 

I'm a designer by trade - am trying to learn PHP. (as you can see :)

Link to comment
Share on other sites

  • 9 months later...

Archived

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

×
×
  • Create New...