• Resolved alprio

    (@alprio)


    Hello,
    I need help replacing 0 and 1 stock statuses to outofstock and instock.
    I use this function at stock status xpath
    [str_replace(array(0,1),array(“outofstock”,”instock”),{availabilityNumeric[1]})]
    But it doesnt work.

    I dont have anything in function editor at the bottom .
    I will attach some photos. If you need further info let me know.

    https://imgur.com/a/u38CIqV

    Thank you

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

    (@wpallimport)

    Hi @alprio,

    Our free plugins don’t support inline PHP functions, so you’d have to use an XPath IF statement for this. Here’s an untested example:

    [IF({availabilityNumeric[1][.="1"]})]instock[ELSE]outofstock[ENDIF]
Viewing 1 replies (of 1 total)
  • The topic ‘Replace 0 – 1 to outofstock – instock’ is closed to new replies.