• Resolved saleemwordpress

    (@saleemwordpress)


    How can I have multiple if conditions in a formula ? The formula builder is not intuitive and does not give any error messages.

    I would like to add the results of multiple if conditions such as

    if( quantity_field_id_1 >4){ quantity_field_id_1 * 23}else{ quantity_field_id_1 * 47} + if( quantity_field_id_3 >4){ quantity_field_id_3 * 23}else{ quantity_field_id_3 * 47}

    so if field 1 quantity is more than 4 then multiple by 47 otherwise multiple by 23. I want to add the result of more than 1 if condition. If I do one if statement the total works if I add two then it does not.

    There is no documentation or examples of how to do simple formulas. If I cannot get this to work I will be asking for a refund and build a custom page myself.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter saleemwordpress

    (@saleemwordpress)

    There is no documentation with regards to formulas. Reading the responses to questions here I have seen we cannot access the results of other total fields. I have bought the pro version. I like the plugin but I cannot create a total formula that meets our client requirements. I do not know how to debug the formula. There is no mention of the if operator. I only learned of it through this forum.

    To say I am disappointed is an understatement. Can any user please how me how to use multiple if operators ?

    Thread Starter saleemwordpress

    (@saleemwordpress)

    For anyone else treat the formula as Javascript code.

    Did you figure out how to use multiple conditions? If yes, can you show an example?

    Hi Dear @saleemwordpress,

    With the correct Javascript code, the formula will work properly. Can you please clarify your formula logic in more detail so we can assist you?

    As we understand you wish to add the result of first condtion(if( quantity_field_id_1 >4){ quantity_field_id_1 * 23}else{ quantity_field_id_1 * 47}) with the second conditon( if( quantity_field_id_3 >4){ quantity_field_id_3 * 23}else{ quantity_field_id_3 * 47})
    If so, please try to calculate these condition and different Total element and add the results on another Total element (https://prnt.sc/u5e48l)

    regards

    Plugin Support Stylemix Plugins Dev

    (@stylemixpm)

    Hi,

    Is there anything else we can help you with? Please don’t hesitate to reply to this topic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to have multiple if conditions in formula’ is closed to new replies.