• Resolved idovecer

    (@idovecer)


    Hello community,

    I’m experiencing an issue with the WooCommerce addon product import feature, specifically with the “Adjust Prices” option and using an IF condition.
    I have entered the following condition below and it seems to work in Description field (also with Preview function and Import), I get 110 or 130 output.

    However, when it comes to the price, it consistently returns 0 as price when this condition is in Adjust prices field.

    Here is a example of the condition I’m using:
    [IF({category[1][contains(.,”printers”) or contains(../category[1],”monitors”) ]})]110[ELSE]130[ENDIF]

    Tnx for advice.

Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @idovecer,

    Unfortunately, the “Adjust Prices” section only accepts static numbers, it doesn’t accept IF statements or import elements.

    I’d suggest skipping the “Adjust Prices” section and using our built-in MATH function in the price field. Here’s an untested example:

    [IF({category[1][contains(.,"printers") or contains(../category[1],"monitors")]})][MATH({price[1]},"*","1.10")][ELSE][MATH({price[1]},"*","1.30")][ENDIF]

    Be sure to change {price[1]} to the correct price element from your file.

Viewing 1 replies (of 1 total)
  • The topic ‘Issue with WooCommerce Product Import – Adjust Prices with IF Condition’ is closed to new replies.