Price indication: Show zero-digits on integers

My customers get individual prices for customized products.
I want the price to be displayed like “50.99 €”. (round(x,2))
No problem, but: If the selling price happens to be an integer the rounding result will be an integer as well.
“50 €”
Is there a method to convert any number into a number with two digits, even if these are zeros? “50.00 €”

Hello - I am confused - what is the context of the question? Are you scripting? There is a ton of information on how to format numbers in say Python on the web.


Hello Pascal. I use grasshopper and shapediver in my web shop for a product configurator.
Users can see the selling price changing while playing around.
Thank you for the hint, I will have a look at Python formatting on the web but I don`t know if Python scripts are allowed within shapediver.

format_2021_Jul13a (3.9 KB)

Or using Evaluate with same expression:

format_2021_Jul13b (3.2 KB)

1 Like