WordPress.org

Ready to get started?Download WordPress

Forums

Jazzy Forms
[resolved] Bug when using more than 2 variable with AND (2 posts)

  1. scattered810
    Member
    Posted 1 year ago #

    I don't see why this is not working, other than there being a bug that only allows two variables for AND statements.
    I am testing the following, which is part of a much larger string.
    IF(AND(stock=1,color=1,sides=1,(t1001*q),IF(AND(stock=2,color=1,sides=1),(t1002*q),IF(AND(stock=3,color=1,sides=1),(t1003*q))))

    If stock value is 1 and color value is 1 and sides value is 1, I want functionID: t1001 to be multiplied by q (quantity)

    If stock value is 2 and color value is 1 and sides value is 1, I want functionID: t1002 to be multiplied by q (quantity)

    http://wordpress.org/extend/plugins/jazzy-forms/

  2. scattered810
    Member
    Posted 1 year ago #

    Thanks to raulelenes, he posted his code which I applied to mine. Works like a charm.

    IF(AND(stock=1,AND(color=1,sides=1)),(t1001*q),IF(AND(stock=2,AND(color=1,sides=1)),(t1002*q),IF(AND(stock=3,AND(color=1,sides=1)),(t1003*q))))

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic