Forums / General / Why does eZPrice drop .00?

Why does eZPrice drop .00?

Author Message

Alex Jones

Wednesday 10 September 2003 2:24:10 pm

Whenever we add a price that ends in .00 to an entry the sytem drops the .00; so 25.00 becomes 25. Why?

Is there a way to change this practice?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Thursday 11 September 2003 12:26:52 pm

Is your price using the price datatype? the ezprice datatype stores the value as a float. I've just had a look at prices we use and it displays the .00 as expected.

Your title suggests you are using that datatype. Have a look at the standard way of viewing a price datatype, in:

design/standard/templates/content/datatype/view/ezprice.tpl

You may need to use one of the sub-fields for vat that the price datatype sets for you.

Paul

Alex Jones

Friday 12 September 2003 6:51:42 am

Hrrrm, thanks for the info Paul. I have edited the Price datatype a bit, but hadn't thought of using the VAT fields...

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>