![]() |
Remove decimals in prices
Hi,
I am testing now 4.5.4 and would like to remove the decimal places in price. Where I can do it? Example: 5 EUR price instead of 4.97 EUR. Both for primary and secondary pricing. Thanks! |
Re: Remove decimals in prices
Well you can't. There is no setting for this. You can modify templates to show rounded price but this will only show the price like this, it will not use it rounded. You will have to modify in php how the proces are calculated and used. I think there is no one place to do this...
|
Re: Remove decimals in prices
Well, I found out the solution, it is more simplier as I thought.
No need to do any PHP modification. Solution: in SQL set in the xcart_config "number_format" the value from 2,. to 0,. If you need more decimals, you can change 2 to any numbers you want to see as decimals. This can be used for currencies where not used any decimals. In this case: 3200.00 will be changed to 3200 if you use the modification I described above. The change is automatic rounding that means if you have a decimal, like 100.56 that will be rounded to 101. So it is not truncate function only... |
Re: Remove decimals in prices
If it works for you that way...
|
All times are GMT -8. The time now is 02:01 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.