Forums / Setup & design / No fractional digits if price is an integer

No fractional digits if price is an integer

Author Message

Julian Seiss

Friday 17 October 2008 6:30:42 am

Hallo,

iam looking for a solution to remove the fractional digits if the a price is an interger.

Locale Settings:
Symbol=€
Name=Euro
ShortName=EUR
DecimalSymbol=.
ThousandsSeparator=,
FractDigits=2
PositiveSymbol=
NegativeSymbol=-
PositiveFormat=%p%q %c
NegativeFormat=%p%q %c

e.g.
Using 15|l10n('currency') returns 15.00 €

Is it possible that l10n returns 15 € when the given digit is an integer without setting the FractDigits to 0? If the given digit is an float, l10n should keep on returning a price with fractional digits.

Thanks already!

eZ debug

Timing: Jan 19 2025 00:08:17
Script start
Timing: Jan 19 2025 00:08:17
Module start 'content'
Timing: Jan 19 2025 00:08:17
Module end 'content'
Timing: Jan 19 2025 00:08:17
Script end

Main resources:

Total runtime0.0263 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0091 587.8438180.8125
Module start 'content' 0.00910.0070 768.656389.8203
Module end 'content' 0.01610.0101 858.476666.7031
Script end 0.0262  925.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.6993120.0002
Check MTime0.00134.8623120.0001
Mysql Total
Database connection0.00103.966410.0010
Mysqli_queries0.003613.568940.0009
Looping result0.00000.083320.0000
Template Total0.009636.410.0096
Template load0.00114.125710.0011
Template processing0.008532.244410.0085
Override
Cache load0.00083.051510.0008
General
dbfile0.004717.9081100.0005
String conversion0.00000.023530.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs