News:

Looking for documentation? Take a look on our wiki

Main Menu

VM adding 1 cent to price if more than 1 is purchased

Started by R1-Limited, September 17, 2012, 19:14:12 PM

Previous topic - Next topic

R1-Limited

So here is my dilemma

I have products (Tee-Shirts and Hoodies) for sale.  Each are setup to display Cost, tax and then Shipping for a total of $27.00 Each

I add 2 items, I get instead of 44.00 for cost of each shirt I get 44.01, I had 3, 4, 5 or more I get the correct price but I am still seeing that 1 cent

How do I get rid of this....

R1-Limited

I noticed a trend of unanswered posts for simple issue :( 

No matter it is a free software and it is great, However I still cannot see how this 1 cent is being added to the price if two or more are selected.  I can choose ten and the 1 cent is there, I chose 1 and the price is perfect.

jenkinhill

Quote from: R1-Limited on September 21, 2012, 18:00:38 PM
I noticed a trend of unanswered posts for simple issue

Unfortunately rounding issues are not simple and have been with us (and other ecomm platforms) since VM1. Milbo has tried to explain that behind the problem is the way that compiuters save numbers, which is not as staightforward as we assume.  So your 27.00 could be stored (for example) as 27.003  so two would be 54.006, rounded to 54.01

I thought this had been just about beaten in the most recent versions - but you don't say what versions you are using.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

R1-Limited

 Installed version 2.0.10
Latest version 2.0.10
Latest release date 2012-08-22

Joomla 2.5.6 (I know 2.5.7 has just been release

R1-Limited

What is odd, is I have other products such as hoodies that do not display this issue.  I would like to just post a flat rate
Say $27.00 for the shirt and just list in the details this includes Shipping and Tax

How do I do that?

jenkinhill

That's what I do for my intranet clients, they have a single base price, no calculation for  tax or discount applied, and zero shipping cost. Never had a rounding problem.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

jjk

The 1 cent rounding error has been fixed in latest SVN version (but at present this fix produces another error, so the devs still have to do some work ro resolve this :-)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

R1-Limited

Quote from: jjk on September 25, 2012, 08:10:25 AM
The 1 cent rounding error has been fixed in latest SVN version (but at present this fix produces another error, so the devs still have to do some work left to resolve this :-)

Curious how you establish this, Do you DISABLE the calculations

jjk

No, I'm using lots of calculations - i.e. cost prices x exchange rates + profit margins + discounts x sales tax, ...etc.
This fixes the 1 cent rounding problem in the cart: https://github.com/VirtueMart/virtuemart/commit/5bd775179c667b120c0ffb6da8027ecce60e0434
but as mentionend above, this is only the first part of the fix. (It's more complicated than you might think)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations