9 years ago
5
Topic

Is there a way (or a plug in that will help) to format numbers in the list output?

I have prices that I want to format with commas.  I use html to add the dollar-sign, but would also like the commas (e.g. $23,456)

Will the code pack do that?  (Is there any documentation for the code pack??)  Thanks in advance!

Get a Book for SEBLOD
9 years ago
4
Level 1

Hello shoshanaz,

you can use the plugin typo PHP String.

You will be able to do what you want with the option number_format.


Regards.

Lionel

9 years ago
0
Level 2

Thank you so much for that information!

9 years ago
2
Level 2

  I tried the php string typography plugin, but couldn't figure out what it wanted in the fields in the construction format with the "number_format" dropdown selected.   I am trying to end up with 12345 being formatted as $12,345 for the field "veh_price".  

I couldn't find any documentation, so if you can help me understand these fields, I'd be very grateful.

  • undefined*
  • length
  • COM_CCK
9 years ago
1
Level 3

After a lot of trial and error the settings below gave me what I needed, but I still do not understand why.  Some explanation will probably be very helpful when dealing with other formats choices.  Thanks in advance!

function: number_format
length: blank
prefix: $
undefined*:0
COM_CCK_...: ,
Suffix: blank
Typography on Label: No
Typography Target: Auto

1283 Posts
Bucklash
9 years ago
0
Level 4

subsribed

Get a Book for SEBLOD