• Resolved rtravers

    (@rtravers)


    Hi,

    I am looking to have 2-5 fields on a product validate with each other so that they don’t exceed a certain value when added together.

    So as an example 3 fields have 3 different values , 60, 30 & 20, so when adding those values they don’t exceed 100 with an error showing up

    I have been scouring around trying to find out anything but had no luck.

    Any help with this would be very grateful

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author moomooagency

    (@moomooagency)

    Hi.

    It is possible.
    You need to create NOV. For example: {uni_option_1}+{uni_option_2}+{uni_option_3}+{uni_option_4} etc
    Add conditional logic in the main formula and check that NOV: if {uni_nov} > 100 set price 0 (In that case user won’t be able to add the product to the cart because the price is 0)
    And use Dynamic Notice option to show error message if {uni_nov} > 100

    That’s all!

    Thread Starter rtravers

    (@rtravers)

    Thank you for that.

    I had actually done it for the dynamic notice already. A good couple of hours after I posted this.

    So not much to do to get it into the main formula.

    Thank you for your help again.

    Plugin Author moomooagency

    (@moomooagency)

    Great!

    Would you please rate the plugin here on wp.org?

    Thread Starter rtravers

    (@rtravers)

    Already done so

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Validation Logic’ is closed to new replies.