Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Hide attribute price


Recommended Posts

I need help hiding the attribute price from the drop down box.


From this: small (+$5.00) to this: small


I've been looking for a solution for this for quite some time and found one but it only works on a stock OSC install and I have SPPC plus a few other contributions installed.


This is the code (I think) where I need to make the modification but I just can't figure it out.




  for ($n = 0 ; $n < count($products_options); $n++) {
         $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']);
         if ($products_options[$n]['options_values_price'] != '0') {
           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';


This is the cart



Please help!!!

Link to comment
Share on other sites

I recently did the same thing for my site, and here is how I did it.


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


Notice the section (/* */) commented out. Of course it could be completely removed I just figured I might want it back later. I also had to add 2 single quotations at the end ( ' ' ) to create a blank space or else an error was returned.

Link to comment
Share on other sites

I have tried this before but my problem is that once I remove the extra costs the total doesn't update on the page, so it shows one price on the page and another once its inserted in the cart.


Is there any way to add HTML into this function? ideally all I want to do is insert a <div="color:#fff"> before and </div> after the function, so the price is not seen by the user.

Link to comment
Share on other sites


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

  • Create New...