Remulon Posted May 25, 2008 Posted May 25, 2008 Hi, I am writing to you because I have not been able to get any real answers to my problem. I am having rounding and conversion rate issues with my osC installation. The main problem that I am having revolves around the calculation of item totals and the final items sub total, only when the customer is not using the default currency. The problem arose when a customer placed an order for 100 of a particular item. The item converted to having a unit price $4.0068 in the user's currency, which displayed as $4.01 and the sub-total for that item displayed as $400.68, which I know is mathematically correct, but it doesn't look like it to the customer, when they see a unit price of $4.01, the item sub-total should really be $401.00 Here is a quote from one of my posts: Of course the totals are going to be out if (pseudo code):converted_price = round(final_price * conversion_rate) converted_item_sub_total = round((final_price * qty) * conversion rate) Wouldn't it be better to (again pseudo code): converted_price = round(final_price * conversion_rate) converted_item_sub_total = converted_price * qty Could you please check out the thread I started, and let me know of any possible solutions to my problem. My original thread is here: http://www.oscommerce.com/forums/index.php?showtopic=302877 Thanks and Regards Remo.
spooks Posted May 26, 2008 Posted May 26, 2008 Use tep_round in your code then you can set decimal places. :lol: Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
Remulon Posted May 26, 2008 Author Posted May 26, 2008 Use tep_round in your code then you can set decimal places. :lol: Sam, the code does use tep_round(), the snippet I have put in my first post is "pseudo code" which is simply a translation of the code in a language that humans can read easily. If you need more information on my problem, my original post is here: http://www.oscommerce.com/forums/index.php?showtopic=302877
Recommended Posts
Archived
This topic is now archived and is closed to further replies.