Math.ceil not working on front end
-
Hi,
I’ve set up a calculator to work out the number of packs needed to cover a wall.
I’m using the math.ceil operator with this equationMath.ceil( quantity_field_id_1 )
So we want the number of meters to be the total but if the user enters e.g. 5.1 then the packs needed should be 6
It works perfectly in Preview mode but on the live side it’s not working as expected. If the user enters 5.1 they get 5 packs. It only goes to 6 when the user enters 5.5 or above.
It works perfectly in preview mode in the admin area though. So entering 5.1 and above results in 6 packs which is correct.
I’ve checked that the cache is refreshed and have tested it’s showing the correct calculator on the live site so totally confused why it’s not working the same.
The page I need help with: [log in to see the link]
- The topic ‘Math.ceil not working on front end’ is closed to new replies.