VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: palyga007 on December 26, 2010, 14:04:36 PM

Title: checkout total price problem
Post by: palyga007 on December 26, 2010, 14:04:36 PM
It's my first topic on this forum so hello! to everyone

My english is on the low level so please forgive me any mistakes.

Ok. So what is the problem:

I add product to shop set his price at 148.58, tax value 22% and the discount 5%
so product price is now 172.20


Customer buy 5 product so the total price is 861.00

but at the 4th step of order VirtueMart show that total price is 861.02

And when i check the order at the backend at list orders the total price is
861.01

So what is going on?

oh.. Joomla ver 1.5.22 + VirtueMart 1.6

I can not find a solution if it is around here please give me some clue how i can find it.
greetings from poland :)
Title: Re: checkout total price problem
Post by: ika67 on December 27, 2010, 22:56:38 PM
Hi everybody! it's my first topic too.
This serious bug existed in virtuemart 1.1.4 and still exist in 1.1.6 joomla 1.5.22. I tried to change the virtuemart configurations on one page checkout but then the different between basket and order amount is .01 (861.01 not 861.00). This different is also visible in order print and confirmation order e-mail. Because of this bug We can't use virtuemart as a e-commerce solution.
Title: Re: checkout total price problem
Post by: jjk on December 28, 2010, 18:27:44 PM
Quote from: palyga007 on December 26, 2010, 14:04:36 PMoh.. Joomla ver 1.5.22 + VirtueMart 1.6

VirtueMart 1.6 doesn't exist yet. However, for VirtueMart 1.1.6 have a look in the VirtueMart 1.1.x section (You posted in the VM 1.5 Beta section) here:
http://forum.virtuemart.net/index.php?topic=78686.msg260882#msg260882 (http://forum.virtuemart.net/index.php?topic=78686.msg260882#msg260882)

...it seems to work for me  ;)
...perhaps somebody can move this thread...
Title: Re: checkout total price problem
Post by: palyga007 on December 28, 2010, 22:25:36 PM
This solution is bad too.
I did that and price was changed to 860.99

So I restored files: product.product_form.php and product.product_price.php and table _vm_product_price to state before I made this: http://forum.virtuemart.net/index.php?topic=78686.msg260882#msg260882
but that did not help.

Why from 1st to 3rd step the price is 861.00 but in 4th is 860.99 (now)?
maybe some method don't use round() function at the right place?
I tried to found it but i don't know where I should start.



---------
148,58 (net) *0.95(discount) *1.22(Tax) *5(number of products) =861,02  yes this is the way how it is made at 4th step

but from 1st to 3rd step in code must be use PHP round() function. Something like that
$price1= round((net*discount),2);
$price2= round(($price1*Tax),2);
$totalPrice= round(($price2*quantity),2);

$price1=141.15;
$price2=172.20;
$totalPrice=861.00;

-----------
"Another workaround probably would be to type "148,57" into the 'net' field, which should display 172,20 too."

It is a bad idea. It's good if you have 1-5 products. But if you have for example 100 and each have another net price? You must check each of them and modify his price.

[attachment cleanup by admin]
Title: Re: checkout total price problem
Post by: aravot on December 29, 2010, 08:57:55 AM
http://forum.virtuemart.net/index.php?topic=77137.0
Title: Re: checkout total price problem
Post by: ika67 on December 29, 2010, 11:57:55 AM
As palyga007 said from 1st to 3rd step the price is calculated well
"product price 148.58, tax value 22% and the discount 5% so product price is now 172.20 Customer buy 5 product so the total price is 861.00 (inclusiv tax)" as in the shoping cart. But after that only in 4th step is the inconsistency of rounding why in this step 172.20 *5 = 861.02  ???
Title: Re: checkout total price problem
Post by: palyga007 on December 29, 2010, 16:02:30 PM
I would like to thank all those who wanted to help me solve the problem. I understand that modifying the code in the 1.1.x version is pointless. So J just wait for version 1.5

Happy new year!
Title: Re: checkout total price problem
Post by: herbertdorfner on February 23, 2012, 14:01:32 PM
hello to everyone,

i have the same problem. is there any soultion to fix it?



cheers,
herb