Jump to content

reifler

Members
  • Content count

    8
  • Joined

  • Last visited

Profile Information

  • Real Name
    Reifler
  1. reifler

    Custom Computer Creator v9 Support

    I don't know if anyone else wanted to remove the prices in the dropdown menus on "build.php" that have displayed strangely for me ( I.e. the price difference "+ 1.243000000" that shows next to some of the dropdown choices). I didn't want the price differences to display at all, preferring the total to reflect the price changes. After much searching and testing here's the mod (I've not found any errors in my tests): Step 1: At about line 99 in includes/functions/custom_computer.php, find and comment out the following: /* if ($values[$i]['price_diff'] == '0.00' || $values[$i]['price'] == '0.00'){ $new_price = ''; }else{ $price_fix = explode('-', $values[$i]['price_diff']); if ($price_fix[0] != '' || $price_fix[0] == '-'){ $new_price = '+' . $values[$i]['price_diff']; }else{ $new_price = '-' . $price_fix[1]; } } */ Step 2: At about line 54 in catalog/java.php, find and comment out the following: // The following is commented out to remove the price difference that would display after a product name in the dropdown. I.e.: "Product Name" + 2.8000085550 /* echo "if (document.getElementById(box_name).options[count].getAttribute('price') > 0){\n"; echo "var keep = document.getElementById(box_name).options[count].innerHTML\n"; echo "var keep_change = new String(keep)\n"; echo "var keep_array = keep_change.replace('undefined', '')\n"; echo "var keep_array = keep_array.split(' +')\n"; echo "var keep_array_fix = keep_array[0].split(' -')\n"; echo "var price_check = get_price(box_name, document.getElementById(box_name).options[document.getElementById(box_name).options.selectedIndex].getAttribute('price'), count)\n"; echo "if (price_check > 0){\n"; echo "var price_diff = ' + '\n"; echo "var price_check = price_check\n"; if (DISPLAY_PRICE_WITH_TAX == 'true'){ echo "var product_tax = eval(price_check * ".$tax_rate." / 100)\n"; echo "var newprice = (price_check + product_tax)\n"; echo "var price_check = custRound(newprice)\n"; } echo "}\n"; echo "if (price_check == 0){\n"; echo "var price_diff = ''\n"; echo "var price_check = ''\n"; echo "}\n"; echo "if (price_check < 0){\n"; echo "var price_diff = ' - '\n"; echo "var price_check = new String(price_check)\n"; echo "var price_check_fix = price_check.replace('-', '')\n"; echo "var price_check = custRound(price_check_fix)\n"; if (DISPLAY_PRICE_WITH_TAX == 'true'){ echo "var product_tax = eval(price_check_fix * ".$tax_rate." / 100)\n"; echo "var newprice = (parseFloat(price_check_fix) + product_tax)\n"; echo "var price_check = custRound(newprice)\n"; } echo "}\n"; echo "document.getElementById(box_name).options[count].innerHTML = ''\n"; echo "document.getElementById(box_name).options[count].innerHTML = keep_array_fix[0] + price_diff + ' ' + price_check\n"; echo "}\n"; */ I haven't spent the time to find a way to round the long price differences. I.e. "- 1.3560000" to "- 1.35". Perhaps there is someone who has done this? Comments on any of this are welcomed.
  2. reifler

    Dropdown Prices

    Oops, I accidentally posted this to the main forum. This was supposed to go into the Custom Computer Creator 9 support forum.
  3. reifler

    Dropdown Prices

    I don't know if anyone else wanted to remove the prices in the dropdown menus on "build.php" that have displayed strangely for me ( I.e. the price difference "+ 1.243000000" that shows next to some of the dropdown choices). I didn't want the price differences to display at all, preferring the total to reflect the price changes. After much searching and testing here's the mod (I've not found any errors in my tests): Step 1: At about line 99 in includes/functions/custom_computer.php, find and comment out the following: /* if ($values[$i]['price_diff'] == '0.00' || $values[$i]['price'] == '0.00'){ $new_price = ''; }else{ $price_fix = explode('-', $values[$i]['price_diff']); if ($price_fix[0] != '' || $price_fix[0] == '-'){ $new_price = '+' . $values[$i]['price_diff']; }else{ $new_price = '-' . $price_fix[1]; } } */ Step 2: At about line 54 in catalog/java.php, find and comment out the following: // The following is commented out to remove the price difference that would display after a product name in the dropdown. I.e.: "Product Name" + 2.8000085550 /* echo "if (document.getElementById(box_name).options[count].getAttribute('price') > 0){\n"; echo "var keep = document.getElementById(box_name).options[count].innerHTML\n"; echo "var keep_change = new String(keep)\n"; echo "var keep_array = keep_change.replace('undefined', '')\n"; echo "var keep_array = keep_array.split(' +')\n"; echo "var keep_array_fix = keep_array[0].split(' -')\n"; echo "var price_check = get_price(box_name, document.getElementById(box_name).options[document.getElementById(box_name).options.selectedIndex].getAttribute('price'), count)\n"; echo "if (price_check > 0){\n"; echo "var price_diff = ' + '\n"; echo "var price_check = price_check\n"; if (DISPLAY_PRICE_WITH_TAX == 'true'){ echo "var product_tax = eval(price_check * ".$tax_rate." / 100)\n"; echo "var newprice = (price_check + product_tax)\n"; echo "var price_check = custRound(newprice)\n"; } echo "}\n"; echo "if (price_check == 0){\n"; echo "var price_diff = ''\n"; echo "var price_check = ''\n"; echo "}\n"; echo "if (price_check < 0){\n"; echo "var price_diff = ' - '\n"; echo "var price_check = new String(price_check)\n"; echo "var price_check_fix = price_check.replace('-', '')\n"; echo "var price_check = custRound(price_check_fix)\n"; if (DISPLAY_PRICE_WITH_TAX == 'true'){ echo "var product_tax = eval(price_check_fix * ".$tax_rate." / 100)\n"; echo "var newprice = (parseFloat(price_check_fix) + product_tax)\n"; echo "var price_check = custRound(newprice)\n"; } echo "}\n"; echo "document.getElementById(box_name).options[count].innerHTML = ''\n"; echo "document.getElementById(box_name).options[count].innerHTML = keep_array_fix[0] + price_diff + ' ' + price_check\n"; echo "}\n"; */ I haven't spent the time to find a way to round the long price differences. I.e. "- 1.3560000" to "- 1.35". Perhaps there is someone who has done this? Comments on any of this are welcomed.
  4. Greetings! This is what worked for me: Go to your catalog/includes/modules/shipping/ Open the modules you want to edit (I changed UPS and USPS) Find and delete this string in each module: (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs) (Be sure not to remove the quotes around it.)
×