Author Topic: checkout total price problem  (Read 9369 times)

palyga007

  • Beginner
  • *
  • Posts: 4
checkout total price problem
« 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 :)

ika67

  • Beginner
  • *
  • Posts: 2
Re: checkout total price problem
« Reply #1 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.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3299
  • using Matomo instead of Google Analytics
Re: checkout total price problem
« Reply #2 on: December 28, 2010, 18:27:44 pm »
oh.. 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

...it seems to work for me  ;)
...perhaps somebody can move this thread...
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

palyga007

  • Beginner
  • *
  • Posts: 4
Re: checkout total price problem
« Reply #3 on: December 28, 2010, 20:47:45 pm »
Unfortunately this: http://forum.virtuemart.net/index.php?topic=78686.msg260882#msg260882 is not solution of my problem.

After that at the backend Discounted Price: 172.21
but at the frontend it is still 172.20

And the total price is 861.02 too.. ;/

--------------
of course 1.1.6, my mistake :)

[attachment cleanup by admin]

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3299
  • using Matomo instead of Google Analytics
Re: checkout total price problem
« Reply #4 on: December 28, 2010, 21:34:35 pm »
Perhaps VM is calculating the discount from the net amount like 148,58 (net) *0.95(discount) *1.22(Tax) *5(number of products) =861,02
...unfortunately I currently don't know.

Until you or somebody else finds a solution, perhaps you can apply a workaround.
Assuming that your want to display "172,20" to your customers - On the 'Product information' page you could change 'Discount Type' from "5 percent" to "Override" and type "172,20" instead of the automatically calculated "172,21".

Another workaround probably would be to type "148,57" into the 'net' field, which should display 172,20 too.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

palyga007

  • Beginner
  • *
  • Posts: 4
Re: checkout total price problem
« Reply #5 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]


ika67

  • Beginner
  • *
  • Posts: 2
Re: checkout total price problem
« Reply #7 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  ???

zanardi

  • Contributing Developer
  • Full Member
  • *
  • Posts: 878
    • GiBiLogic
Re: checkout total price problem
« Reply #8 on: December 29, 2010, 13:23:53 pm »
As Aravot suggested, this is a known bug, but it is not easy to fix. We are try to fix it without having to rewrite a lot of code (which would be senseless now VirtueMart 1.5 is almost finished). I am sorry for any inconvenience.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

palyga007

  • Beginner
  • *
  • Posts: 4
Re: checkout total price problem
« Reply #9 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!

herbertdorfner

  • Beginner
  • *
  • Posts: 1
Re: checkout total price problem
« Reply #10 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