Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Use of actual price in drop down instead of (+Price)


Recommended Posts

Hello, I am looking for a contribution or some method of listing the actual price of product options in products attributes drop down instead of show something like (+5.00). In other words, If I have 3 product sizes small = $1 medium=$2 and large=$3 I would like my drop downs to display the actual price $1, $2 and $3. Currently, my drop downs show the plus sign and the price added to the base price so a medium would be (+$1.00) large=(+$2.00).

Thanks for any help!

Link to comment
Share on other sites

Try this ..

 

In catalog/product_info.php

 

Find ...

 

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

 

Replace with ..

 

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

Link to comment
Share on other sites

Try this ..

 

In catalog/product_info.php

 

Find ...

 

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

 

Replace with ..

 

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

 

 

Wow this definitely did the trick, waaaay less buggy than the Actual Attribute Price contrib. One question though, how do I put an extra blank space in front of the price? It runs right into the name of my attribute. Thanks all!

Link to comment
Share on other sites

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

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...