• Resolved Wohoo123

    (@wohoo123)


    Hi,

    I want to round discount numbers to whole numbers.
    E.g.

    – 14,5 euro discount = 15 euro
    – 14,4333 euro discount = 14 euro

    Is this possible? And if so by using what JS pseudo code?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    There is no automatic option for the numbers to make as integers by default. It needs to modify the core templates of the plugin in order to integrate this kind of feature

    regards

    Thread Starter Wohoo123

    (@wohoo123)

    @stmmattgordon thanks for your reply.
    Stylemix once said this feature will be added within the next update. Do you know if it is added or will be added?

    Or how can I make this work since it is really important to me!

    Thanks

    Thread Starter Wohoo123

    (@wohoo123)

    I know I can modify the total from 2 decimals to 0 decimals. But I don’t know if I can round a total discount that I calculate within my pseudo code.

    I tried to add 5000 lines of code

    if (discount==0.01) discount = 0;
    if (discount==0.02) discount = 0;
    if (discount==0.51) discount = 1;

    But this does not seem to work.

    Plugin Support Axel StylemixThemes

    (@axelstm)

    Hi @wohoo123

    You can round the total by using the “round” in your formula – https://prnt.sc/s8eth1.

    Regards

    Thread Starter Wohoo123

    (@wohoo123)

    Edit solved

    • This reply was modified 4 years, 7 months ago by Wohoo123.
    Plugin Support Axel StylemixThemes

    (@axelstm)

    we glad to know that you resolved the problem ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Round discount’ is closed to new replies.