vargadani Posted July 22, 2011 Share Posted July 22, 2011 Hello, I need a solution for price calculating. I have prices with 6 decimals, I need them for calculating only. I have changed everywhere the decimals for 6, but still calculating with 2 I need to calculate total price of order with 6 decimals, but needed only 2 decimals for showing the price everywhere in FO. example what I need: in BO the price is 2.086404 with tax (1.738670 without tax) in the FO is price 2,09 and it calculating 10x 2,09=20,90 but I need calculating that way: 10x 2,086404 (from the BO price) = 20,86 I need 20,86 for the invoice, to the cart, so everywhere any idea for my problem? please help me Link to comment Share on other sites More sharing options...
indus Posted July 24, 2011 Share Posted July 24, 2011 Hello, I need a solution for price calculating. I have prices with 6 decimals, I need them for calculating only. I have changed everywhere the decimals for 6, but still calculating with 2 I need to calculate total price of order with 6 decimals, but needed only 2 decimals for showing the price everywhere in FO. example what I need: in BO the price is 2.086404 with tax (1.738670 without tax) in the FO is price 2,09 and it calculating 10x 2,09=20,90 but I need calculating that way: 10x 2,086404 (from the BO price) = 20,86 I need 20,86 for the invoice, to the cart, so everywhere any idea for my problem? please help me Hi Have you tried the rounding feature from preferences, maybe classical rounding does this.But you need to check to be sure.I have some rounding problems myself. Link to comment Share on other sites More sharing options...
vargadani Posted July 27, 2011 Author Share Posted July 27, 2011 thanky you for your answer, I tried with rounding, but nothing I need normal rounding but nedd calculate with not-rounded prices, and show rounded for 2 decimals Link to comment Share on other sites More sharing options...
Jero Posted August 18, 2011 Share Posted August 18, 2011 I have same issue. Need to calculate all prices without rounding and round only the final price per product. For example: Product price before TAX 0,68 Product price after TAX (8,5%) 0,737800 What PS does is something like this: 0,7378 rounding 0,74 x 24 = 17,76 I need it like this 0,7378 x 24 = 17,7072 and with rounding = 17,71 See the difference? What I tried so far: Disabled TAX view for group and changed code so it would still show prices with TAX. It worked, but failed when I aplied discount on products. I reverted it all back and changed in cart.php line if ($this->_taxCalculationMethod == PS_TAX_EXC) to if ($this->_taxCalculationMethod == PS_TAX_INC) It still showed wrong price per product while everthing else worked OK. I played around with price.js but I figured that it dosent do anything when displaying price in frontend. Is there anyone who had trouble with this issue and solved it? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now