Author Topic: Wrong Price in Basket???  (Read 4487 times)

Joe Sixpack

  • Beginner
  • *
  • Posts: 10
Wrong Price in Basket???
« on: October 12, 2012, 15:06:21 pm »
For every small update i spend hours in checking out and testing.

Update 2.0.10 to 2.0.12 and i get this in my shop:  :o


Edit:
After trying out several things, I found out that happens only when the Shop-Currency is Swiss Franc (CHF)

any idea to fix this issue quickly??

[attachment cleanup by admin]

turkish74

  • Beginner
  • *
  • Posts: 13
Re: Wrong Price in Basket???
« Reply #1 on: October 13, 2012, 10:33:59 am »
I have this problem also in 2.0.10. I hoped it will be cleared in the next version, unfortunatly also with 2.0.12b it is not fixed.

Cheers

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Wrong Price in Basket???
« Reply #2 on: October 13, 2012, 13:00:30 pm »
Please write a pm to me, I have no idea how that can happen.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Joe Sixpack

  • Beginner
  • *
  • Posts: 10
Re: Wrong Price in Basket???
« Reply #3 on: October 13, 2012, 22:56:47 pm »
just tried: Fresh Joomla 2.5.7
New installation VM 2.0.12b

Shop currency CHF (Swiss Franc) as default.

Products in cart: 2 x 1000.- = 4000.- CHF

Total price at the bottom is right: 2000.- CHF

[attachment cleanup by admin]

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Wrong Price in Basket???
« Reply #4 on: October 15, 2012, 12:04:17 pm »
ahhh, now I got an idea how it happened. It is the "Rappenrundung". The main problem is that no one of the swizz people can explain me how it should be.

Imho only the final price should be rounded. In fact only the final price of the cart, but okey it looks strange for you, so the final prices of all products in the cart. But what is with the tax and the discounts? and this makes it complex.

Maybe you modded it already somehow to get a rappenrundung and now the work is done doubled.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

fishbones

  • Beginner
  • *
  • Posts: 6
Re: Wrong Price in Basket???
« Reply #5 on: October 15, 2012, 16:49:50 pm »
Hi Milbo

I have exactly the same problem.
which specific information about the "rappenrundung"  do you need to solve this problem?

at the moment for some reason the basket is multiplying the quantity by it self before
calculating the final amount for one single position of the basquet.

many thanks for your help
cheers



Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Wrong Price in Basket???
« Reply #6 on: October 16, 2012, 08:58:25 am »
Set your rounding value to -1. That may already help
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

fishbones

  • Beginner
  • *
  • Posts: 6
Re: Wrong Price in Basket???
« Reply #7 on: October 16, 2012, 11:19:18 am »
many thanks for your answer.

unfortunalety the problem still persist as discribed by Joe Sixpack.

as a workaround i've change the "numeric code" for the Swiss franc from 756 to 999.

since then, the quantity in mi cart is no more multiplied by it self
before multiplying with the single position price.

The cart is now calculating the single position price the right way.


does this "numeric code" change afect any other function in VirtueMart?




Joe Sixpack

  • Beginner
  • *
  • Posts: 10
Re: Wrong Price in Basket???
« Reply #8 on: October 16, 2012, 11:35:28 am »
The problem is:

http://forum.virtuemart.net/index.php?topic=107541.msg359477 # msg359477

Quote
Release 2.0.11e
New release E version:
Fixed rounding for quantity higher than 1
added for rounding rap swizz

My suggestion would be to eliminate that funny "Swizz" Feauture  quickly

Tax and so on are usually expected in centime amounts, that's no Problem for "Swizz" People  ::), who really need a beautiful 5-centime amount in its final price, adds a little hack:

that was the solution before 2.0.11e:
administrator \ components \ com_virtuemart \ helpers \ calclationh.php

Line 1043:
round function display ($ value) {
return round ($ value, 2);
}

New:
round function display ($ value) {
return round ($ value * 2, 1) / 2;
}

And everything was fine

Milbo, can you briefly explain where this new "SWIZZ" Function has been installed?

Joe Sixpack

  • Beginner
  • *
  • Posts: 10
Re: Wrong Price in Basket???
« Reply #9 on: October 16, 2012, 11:42:36 am »
Kurz noch für die Schweizer:

MWST und so weiter, Nettopreise ist absolut OK auch in Rappenbeträgen. Auch der Endpreis kann in Rappenbeträgen stehen, es gibt keine Vorschrift, dass der Endpreis auf 5 Rappen gerundet werden muss. Aldi verkauft in der Schweiz seine Ware in den Läden ja auch schon in Rappen (3.99 usw) (bekommt man dort eigentlich Hartgeld in 1-Rappenstück zurück oder wird der Betrag an der Kasse gerundet? hab noch nie dort eingekauft....)

Wer es "schön" mag und gewohnt ist dass der Endpreis gerundet ist.... Ein kleiner Hack würde doch genügen, statt das ganze System wegen einem Kinkerlitzchen durcheinander zu bringen.

Meine Meinung. Was meinen die anderen SWIZZER so?

Nachtrag aus Wikipedia:

Quote
Eine Besonderheit in der Schweiz ist die Rappenrundung. Obwohl in der Schweiz durchaus nach Bedarf mit Rappen gerechnet wird, werden jedoch keine Beträge kleiner als 5 Rappen in Bargeld bezahlt oder in Rechnung gestellt.
...
Dieses Konzept ist auch in anderen Ländern bekannt, so unter anderem in Finnland, bei der die kleinste Währungseinheit die 5-Eurocent-Münze ist

Wie habt ihr das in VM nun eigentlich bei den Finnen gelöst?


fishbones

  • Beginner
  • *
  • Posts: 6
Re: Wrong Price in Basket???
« Reply #10 on: October 17, 2012, 12:27:02 pm »
I agree with Joe, it will be better to eliminate the "SWIZZ" feature.

Ja, joe.. ein kleiner Hack reicht vollkommen wenn es darum geht
der Endpreis auf 5 Rappen zu runden.

Wie hast du dein Problem nun gelöst?






Joe Sixpack

  • Beginner
  • *
  • Posts: 10
Re: Wrong Price in Basket???
« Reply #11 on: October 18, 2012, 16:02:23 pm »
ich habe, wie du oben beschrieben hast, den Numeric-Code geändert und die calculationh.php angepasst.

Damit ist Ruhe in der Kiste. Vorerst. CHF ist jedoch die einzige Währung die ich im Shop habe, insofern kann ich nichts darüber sagen ob das noch Auswirkungen hat...

 :)

fishbones

  • Beginner
  • *
  • Posts: 6
Re: Wrong Price in Basket???
« Reply #12 on: October 19, 2012, 11:12:47 am »
ok. ich muss noch die calculationh.php wie du beschrieben hast noch anpassen  "Line 1043".
danach ist auch bei mir mal ruhe in der kiste  ;D

das "mir schwizzer" so ein problem auslösen können...

hoffe, dass die rundungsgeschichte mal allgemein behandelt wird, so dass
man im backend selber die eigene rundungs formel pro währung eingeben kann.


dirkb

  • Jr. Member
  • **
  • Posts: 74
Re: Wrong Price in Basket???
« Reply #13 on: October 20, 2012, 11:39:37 am »
So ... swiss specific.

How do I solve that problem with 2.012b ? I searched for the before 2.011e solution, but it does not even show up in calculation.php ?

I take everything ... advice, a hack ... or whatever helps me sort this out =)

thanks

Joe Sixpack

  • Beginner
  • *
  • Posts: 10
Re: Wrong Price in Basket???
« Reply #14 on: October 20, 2012, 20:45:42 pm »
So, in Version 2.0.12e there is now a implemented function, that seems to work verry well.

Thank you for that work!  :)

Perhaps it would be a little more serious, to name this function as it should be.  Swizz.....  .....  ???

[attachment cleanup by admin]