Jump to content

How to round/truncate prices to multiple of 10 cents


Recommended Posts

Hallo

 

I have a problem rounding my prices. Since you will never find someone selling stuff for 5.23€ or 6.24€, (that is with the second decimal different from 0) but rather 5.20, 6.20, etc. I don't understand why PS (I am on 1.4.11) has not this feature.

I read a lot of posts dealing with this problem, but not a real answer.

 

Now, I know perfectly that this weird two decimals come from whatever calculation there is (especially when taxes are there) but is there a way to have the last decimal always set to 0?

 

I thought on some simple solutions:

 

- round prices to two decimals and wherever they are shown, replace the last digit with 0

- round prices to one decimal and append a "0" to the price

 

Althogh I could do it with jQuery, I have no idea on how many files should I put this transformation.

However, my questions:

 

- in which files should I apply the transformations I was talking about? Do you think it is just possbile? i see prices everywhere! :)

- am I going into the right direction or is there another way, which I am missing?

 

Thank you very much

Fabio 

Link to comment
Share on other sites

×
×
  • Create New...