Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Decimal places in HTML template

Avatar

Level 3

We're configuring some new email templates. As we populate these emails with a price, we're looking for these to be set at 2 decimal places including pence, E.g. £100.00.

The values in the data fed in to the template are to two decimal points, but the HTML is showing the data without the trailing zero, E.g. £101.7

How do we get round this?

Regards,

Andy

1 Accepted Solution

Avatar

Correct answer by
Employee

Hello andysayers909

You may try using js script function Math.round(num * 100) / 100 or parseFloat(Math.round(num3 * 100) / 100).toFixed(2);

Similar issue has been resolved in Re: Getting 2 decimal places

Regards,

Ananya Kuthiala

View solution in original post

0 Replies

Avatar

Correct answer by
Employee

Hello andysayers909

You may try using js script function Math.round(num * 100) / 100 or parseFloat(Math.round(num3 * 100) / 100).toFixed(2);

Similar issue has been resolved in Re: Getting 2 decimal places

Regards,

Ananya Kuthiala