Craig_B Posted June 29, 2004 Posted June 29, 2004 Hello, The prices that I am inputing into OSCommerce are rounding to the nearest dollar. Is there a place where I can configure OSCommerce not to do this? Prices not displaying correctly! Thanks, Craig
Craig_B Posted July 4, 2004 Author Posted July 4, 2004 I am still having issues with this and do not know where to look. The prices in the database are correct but still not displaying properly. Any help would be most appreciated! thanks, Craig
Acheron Posted July 4, 2004 Posted July 4, 2004 In Admin CP --> Configuration --> My Store --> Set decimal places There is also a value in your SQL DB if the first fix doesn't pan out.
Craig_B Posted July 4, 2004 Author Posted July 4, 2004 Admin > Configure > My Store > Tax Decimal Places set to 2 -and- Admin > Localization > Currency > Decimal places set to 2 I have also checked the SQL and it has the correct values in the DB. I am not sure where to look now. I am sure it has something to do with the setting the Canadian dollar as default as the US store works fine.
Acheron Posted July 4, 2004 Posted July 4, 2004 Admin > Configure > My Store > Tax Decimal Places set to 2 -and- Admin > Localization > Currency > Decimal places set to 2 I have also checked the SQL and it has the correct values in the DB. I am not sure where to look now. I am sure it has something to do with the setting the Canadian dollar as default as the US store works fine. Prices all show 2 decimal places on the CA site so your problem is with the rounding function rather than decimal places. Sorry for the misunderstanding. :) In your functions file(s), what do you have for tep_round?
Craig_B Posted July 5, 2004 Author Posted July 5, 2004 In funtions > general.php I have this: // Wrapper function for round() function tep_round($number, $precision) { if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) { $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1); if (substr($number, -1) >= 5) { if ($precision > 1) { $number = substr($number, 0, -1) + ('0.' . str_repeat(0, $precision-1) . '1'); } elseif ($precision == 1) { $number = substr($number, 0, -1) + 0.1; } else { $number = substr($number, 0, -1) + 1; } } else { $number = substr($number, 0, -1); } } I don't believe that I touched this file though <_<
Guest Posted August 31, 2004 Posted August 31, 2004 :blink: I?m havin the same problem, i checked all the parameters and the tep_round function, all are correct. Somebody can help us ?URGENT!
241 Posted August 31, 2004 Posted August 31, 2004 :blink: I?m havin the same problem, i checked all the parameters and the tep_round function, all are correct. Somebody can help us ?URGENT! have you set up your tax and zones No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Guest Posted August 31, 2004 Posted August 31, 2004 :huh: Yes, i check for taxes, but the problem persist. Please give me the ligth :ph34r:
retrospect Posted November 2, 2004 Posted November 2, 2004 Having same rounding issue as those above. Using USD. Only thing I have messed with in currencies is that I turned off all currencies but USD. mySQL reflects correct values as well as admin. I have zones and taxes setup. Have looked at all round, tep_round, ceil and find nothing out of the way. If the price of a product is .125 (12 and half cents). An order of 500 should total $62.50 without tax but it totals $65 because it rounds the product price to .13! If I change the decimal places in the USD currency to 3 or 4 or more then the price is correct but of course displays unneeded decimal places. Please help!
Sardonic76 Posted December 16, 2004 Posted December 16, 2004 Had the same problem. Just found a thread that helped me sort it out: decimal
Recommended Posts
Archived
This topic is now archived and is closed to further replies.