| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Remove decimals in prices | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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! |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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...
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() 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...
__________________
Latat X-cart Gold 4.019, LINUX |
|||||||
#4
|
|||||||||
|
|||||||||
![]() If it works for you that way...
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|