• Resolved deftones fan

    (@deft1z)


    Hello))
    Please help me with the next task. When exporting, I only need one field for the product price <price>. Items in my store can be either with regular or sale price. How to make that when exporting, if a product has a sale price, then it goes to the export file in the price field <price>. And if the sale price field is not filled in, then it goes just the regular price to <price>.

    thank you in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter deftones fan

    (@deft1z)

    Any support?

    Plugin Author WP All Import

    (@wpallimport)

    Hi @deft1z,

    Have you tried exporting the “Price” element, instead of “Regular Price” or “Sale Price”, for this? It should contain the regular price if there’s no sale price, or the sale price if there is one.

    If that doesn’t work for you, then you could use a custom PHP function to conditionally export the regular or sale price: https://www.wpallimport.com/documentation/export/pass-data-through-php-functions/.

    Thread Starter deftones fan

    (@deft1z)

    Have you tried exporting the “Price” element, instead of “Regular Price” or “Sale Price”, for this? It should contain the regular price if there’s no sale price, or the sale price if there is one.

    That’s worked!!!!
    Thank You so much.

    I like Your plugin – I think that it is the only solution for wp with that functionality. But it is to complicated – a lot of things are done withh custon php code. I think it could be more userfriendly (like plugins from other CMS that I use)

    Good luck

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If statement for sale price’ is closed to new replies.