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
BedrockMission!

Learn More

View all

Sign in to view all badges

Decimal places in HTML template

Avatar

Avatar
Validate 1
Level 2
andysayers909
Level 2

Likes

12 likes

Total Posts

29 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
andysayers909
Level 2

Likes

12 likes

Total Posts

29 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
andysayers909
Level 2

05-07-2018

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
ananya_kuthiala
Employee

Likes

58 likes

Total Posts

80 posts

Correct Reply

39 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
ananya_kuthiala
Employee

Likes

58 likes

Total Posts

80 posts

Correct Reply

39 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
ananya_kuthiala
Employee

05-07-2018

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

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 2
andysayers909
Level 2

Likes

12 likes

Total Posts

29 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
andysayers909
Level 2

Likes

12 likes

Total Posts

29 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
andysayers909
Level 2

09-07-2018

Thanks very much. Issue resolved.