acoyne Posted March 6, 2008 Posted March 6, 2008 Hello all, In the products options dropdown, is it possible not to show the price increase eg, + (10.00)EUR I've installed a AJAX price update for this section where when a different option is selected the price will update below. SHop - Click Here The code for the section is below. If I comment out this code is wont show the price increase but then the price update doesnt work. $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'])) .') '; Code ; <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.products_attributes_id"); 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') { $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'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <!-- Attrib price update //--> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, "onChange='showPrice(this.form);showPrice1(this.form);'");?></td> <!-- Proyecto Icaro (Fin Modificado) //--> </tr> <?php } ?> </table> <?php } ?><!-- price update attributes begin --> <p><b><font face="Arial" color="#800000" size="4"> <?php if(tep_has_product_attributes($product_info['products_id'])){ if ($new_price = tep_get_products_special_price($product_info['products_id'])) { ?> <script type="text/javascript">document.write('<s><div id="productNEWprice1"></div>\n</s>');</script> <script type="text/javascript">document.write('<span class="productSpecialPrice"><div id="productNEWprice"></div>\n</span>');</script> <noscript><?php echo $products_price; ?></noscript> <?php } else {?> <script type="text/javascript">document.write('<div id="productNEWprice"></div>\n</span>');</script> <noscript><?php echo $products_price; ?></noscript> <?php } } else { echo $products_price; } ?></font></b></p> </td> <input type="hidden" name="nuPrice" value="<?php echo str_replace("$","",$nuPrice); ?>"> <input type="hidden" name="nuPrice1" value="<?php echo str_replace("$","",$nuPrice1); ?>"> <!-- price update attributes end --> THanks Alan
deggial Posted July 11, 2009 Posted July 11, 2009 Hello all,In the products options dropdown, is it possible not to show the price increase eg, + (10.00)EUR I've installed a AJAX price update for this section where when a different option is selected the price will update below. Hi, It is a very great idea. And by searching a solution for this price update with AJAX, I have found out your website. I wanted to have it also. Could you please explain how you manage to update the prices as the attributes are selected, without refreshing the page? I need to steps to do it, I have no AJAX knowledge. Thanks, Yordanov.
♥ecartz Posted July 11, 2009 Posted July 11, 2009 Searching the contributions area for "attribute price update" finds Options - Price Update and possibly others (I didn't look through all the contributions). In regards to the original question, I believe that the contribution mines the HTML for the current attribute price. So if you delete the price from the display, you have to put it back somewhere else and modify the javascript to get it from there. Always back up before making changes.
Guest Posted October 19, 2011 Posted October 19, 2011 is it possible to just color the Price white? that way it's hidden
Recommended Posts
Archived
This topic is now archived and is closed to further replies.