• Resolved alprio

    (@alprio)


    Hello ,
    I hope everyone is well.
    i have an XML that it doesn’t has a sale price element.
    is there an if statement or a function , that will compare the latest regular price with the new one and if the price has been lowered , it will keep the regular price as is and it will add the lowered price to the sale price field.
    and if the price goes above the regular price or = it will remove the sale price .

    Thank you !

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

    (@wpallimport)

    Hi @alprio,

    is there an if statement or a function , that will compare the latest regular price with the new one and if the price has been lowered , it will keep the regular price as is and it will add the lowered price to the sale price field. and if the price goes above the regular price or = it will remove the sale price .

    That’s not possible using our built-in options, but you could do it with custom code and our API: https://www.wpallimport.com/documentation/action-reference/. You’d use the pmxi_saved_post hook to check the price for the product that was imported, compare it with the price in the file, then programmatically update the product prices if necessary.

    Thread Starter alprio

    (@alprio)

    Hey ,

    Thanks for the tip but this is far beyond my knowledge .

    I guess I have to hire someone.

    Anyway thanks again !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sale price’ is closed to new replies.