• Resolved idovecer

    (@idovecer)


    I should add the “Shipping Class” during the import in WooCommerceAddon, if the product name contains xxx and (yyy or zzz) in the name.
    So I added simple code in “Set product shipping class with XPath”.
    [IF({Title[1][contains(.,”xxx”)]})]Additional-shipping-class-1[ENDIF]

    And that works.

    But as soon as I add one AND or OR condition, the function no longer works.

    Can you help?
    Thank you.

    Non working example:
    [IF({Title[1][contains(.,”xxx”)] AND Name[1][contains(.,”yyy”)]})]Additional-shipping-class-1[ENDIF]

    Some titles has xxx and yyy in the title field.
    Tnx for suggestions and tips.

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

    (@wpallimport)

    Hey @idovecer,

    Please try this syntax instead:

    [IF({Title[1][contains(.,"xxx") and contains(../Name[1],"yyy")]})]Additional-shipping-class-1[ENDIF]

    Just make sure that “Title” and “Name” are correct (i.e. the elements are {Title[1]} and {Name[1]} when they’re dragged in).

Viewing 1 replies (of 1 total)
  • The topic ‘Shipping class auto define with IF statement’ is closed to new replies.