Question about the variable "promo_code_value". When rendered in the template, it gives 4 decimal points instead of none. So for example, I want to indicate that there's a 25% discount, so in the template I write:


But instead of "25%", it renders "25.0000%". Is there some way to change that? Have I done something wrong? Don't know maybe if there's a configuration setting somewhere.


1 Answer 1


You can use "Number Format" plugin (http://devot-ee.com/add-ons/number-format) and can use it like:

{exp:number_format number="{promo_code_value}"}%
  • Thanks Bhashkar. I also edited the db field directly -- the field 'value' is of type DECIMAL and set to '19,4'. I set it to '19,0' and it worked without the need for a plugin. Jul 2, 2013 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.