Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show Real Price on drop down in product_info.php


creativeone

Recommended Posts

I found this Contribution which seems to be exactly what I need but it doesn't explain enough for my newbie brain. Can someone tell me how to do this

 

Show Real Price on drop down in product_info.php

 

I have a client who has filters. Visitors can either buy the filter kit or from the drop down box buy one of the filters from the kit. In the product attributes I put in the difference in cost but it shows in the drop down box and looks confusing. How can I get rid of that? Thanks.

 

Product page

 

http://globalwaterandair.com/store/product...87220e5482051eb

Link to comment
Share on other sites

I found this Contribution which seems to be exactly what I need but it doesn't explain enough for my newbie brain.  Can someone tell me how to do this

 

Show Real Price on drop down in product_info.php

 

I have a client who has filters.  Visitors can either buy the filter kit or from the drop down box buy one of the filters from the kit.  In the product attributes I put in the difference in cost but it shows in the drop down box and looks confusing.  How can I get rid of that? Thanks.

 

Product page

 

http://globalwaterandair.com/store/product...87220e5482051eb

 

What do you not understand?? All you need to do is replace the small piece of code in the product_info.php.

 

this

 

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'])) .') ';

}

 

 

with this

 

//here is the edited code

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'])) .') ';

}

// end of code

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Ok that worked - don't know what I did the first time. Thanks.

Cindy

 

What do you not understand??  All you need to do is replace the small piece of code in the product_info.php.

 

this

 

          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'])) .') ';

          }

with this

 

//here is the edited code

      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'])) .') ';

      }

// end of code

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...