• Resolved avistan

    (@avistan)


    Hello!

    First of all your plugin is truly amazing, thank you for it!

    I would like to request help, with an import:

    I want to import woocommerce products from an xml file, i got a problem, with the sale price. In the provided xml some products sale price is “0,00”.

    I would like to skip theese cases, and import the sale price only to products what have a real sale price.

    Im not good at cooding, and could not figured out the sollution form the documentation provided.

    Thanks a lot, in advance!

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

    (@wpallimport)

    Hi @avistan

    I would like to skip theese cases, and import the sale price only to products what have a real sale price.

    You can use an IF statement like this to import a blank value in the case that the real value is “0,00”:

    [IF({saleprice[1][.="0,00"]})][ELSE]{saleprice[1]}[ENDIF]

    Just be sure to change “saleprice” to the correct element name from your file.

    • This reply was modified 5 years, 10 months ago by WP All Import.
    • This reply was modified 5 years, 10 months ago by WP All Import.

    This is just what I was looking for. Is there any documentation for this?

    Hello!

    Agreed, your plugin is fantastic.

    I have a similar issue where I’m trying to test for certain keywords in array elements to determine whether to display them or not. Is there a way to use [ELSEIF] or string [IF] statements together? I don’t see anything on this in the official docs. Here’s my code:

    [FOREACH({custom_fields/custom_field})]
    <p class=”event-description”>[IF({value[.=”day1-kickoff-event”]})][ELSE]{value}[ENDIF]</p>
    [ENDFOREACH]

    Thanks!
    Jason Gresalfi

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP all Import – IF statement’ is closed to new replies.