• Resolved Michael

    (@whispardesign)


    Hello,

    After changing to 3.0 – our calculators stopped working – throwing js errors.

    Please advise.

    Best,
    Michael

    • This topic was modified 2 years, 3 months ago by Michael.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Michael

    (@whispardesign)

    Actually – the problem area had to do with the round function – that threw the error. For reference – what is the correct usage of the rounding function – when added to the file it is added as Math.round(

    Hello, @whispardesign

    To avoid misunderstandings, please describe your case in more detail, as we did not identify this issue by following the link you provided.
    Also, please make sure your system requirements are correct:

    https://docs.stylemixthemes.com/cost-calculator-builder/getting-started/system-requirements

    Best regards.

    Thread Starter Michael

    (@whispardesign)

    System requirements are fine – the problem was not with 3.0 but with the rounding function as I described.

    Please go back to that page and click the “How much grass do you need” button and enter 100 and 100 in the fields. You will see that the “pallets needed” is not rounding.

    When I add the Round function Math.round( in the calculator settings it breaks.
    Can you please provide a sample code using the round function that works – perhaps I am not entering it correctly or there is a bug.

    Best,
    Michael

    Thread Starter Michael

    (@whispardesign)

    This is my current formula without rounding
    quantity_field_id_6 * quantity_field_id_1 * 2 / 900

    Hi, @whispardesign

    We checked this case on our test calculator and did not experience any difficulties.
    Please make sure that your website does not have third-party plugins installed that may interfere with the calculator’s logic.

    Regards.

    Thread Starter Michael

    (@whispardesign)

    I am simply asking for you to show me the proper syntax for using the round function.
    Please post an example with my existing formula above to round to 2 places.

    Thank You

    Plugin Support EricStylemixThemes

    (@ericstylemixthemes)

    Hello,

    I created a similar calculator in our testing environment and used the following calculations in the Formula field:

    Math.round( quantity_field_id_0 * (quantity_field_id_2 * 2 / 900))

    You can see results from this screenshot:

    Regards

    Thread Starter Michael

    (@whispardesign)

    Thank you Eric.
    Still having a few issues adapting to our forumla.

    (quantity_field_id_0 * quantity_field_id_1 * (quantity_field_id_2 /12 ) ) / 27

    If I simply add Math.Round it breaks.
    Do you mind taking my formula and adapting your test with rounding?
    Not sure where I am going wrong :/

    Thanks for the assistance.

    Plugin Support EricStylemixThemes

    (@ericstylemixthemes)

    Hello,

    I tested your formula with Math.round() (Screenshot).

    I used the following calculations in the Formula field:

    Math.round( (quantity_field_id_0 * quantity_field_id_2 * (quantity_field_id_3 /12 ) ) / 27)

    The calculator elements can be seen from this screenshot

    Please try to create a similar calculator on your own and recheck the issue.

    Regards

    Thread Starter Michael

    (@whispardesign)

    Thank you Eric – All good – works like a charm!

    Plugin Support EricStylemixThemes

    (@ericstylemixthemes)

    You are welcome @whispardesign ??

    If you’re satisfied with our response and think we are worth five stars, I would request you to post a review for our plugin.

    https://www.ads-software.com/plugins/cost-calculator-builder/#reviews

    Your kind words will encourage our team a lot and we will get the motivation to deliver better products and services in the future.

    Kind Regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Not working after changing to 3.0’ is closed to new replies.