• Resolved thvx

    (@thvx)


    I am currently importing a CSV file into my WooCommerce products. I’m trying to make it so that the sale price on products only gets showcased when {price[1]} is less then {fromprice[1]}. For this, I’ve put a inline PHP if-statement in the WooCommerce add-on sale price section, but it doesn’t work. Code:

    
    [IF({price[.< {fromprice}]}) ] {price} [ENDIF]
    

    Whenever I click on preview it gives me the following error: Error parsing: Close brace expected instead of TEXT

    I really want to continue importing, any help would be greatly appreciated!

    • This topic was modified 4 years, 2 months ago by thvx.
    • This topic was modified 4 years, 2 months ago by thvx.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hey @thvx,

    Please try this syntax instead:

    [IF({price[.<../fromprice]})]{price}[ENDIF]

    Let me know how it goes.

    Plugin Author WP All Import

    (@wpallimport)

    Hey @thvx,

    I’m marking this as resolved since it’s been inactive for a while now. Please open a new topic if you still have questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Compare 2 fields with inline PHP’ is closed to new replies.