• Resolved peterwau

    (@peterwau)


    Hello i have problem with import my sale price.

    In first step i have function for convert currency, etc.

    <?php
    function change_currency($price, $course=10) {
        return ($price/$course);
    }
    ?>

    And in wp all import field i have this code :

    [change_currency({VARIANT[1]/PRICE_RETAIL[1]})]

    But now i need update SALE price.

    In my XML file the SALE PRICE value is not filled in all the time.
    I need a solution for this , if there is a SALE price print it but before that I need the function to run CHANGE CURRENCY.

    When i use this :

    [change_currency({VARIANT[1]/PRICE_SALE[1]})]
    

    all products that did not have a SALE price in the XML file got a price of 0 EUR.

    Where am I going wrong? Thank you for your help.

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

    (@wpallimport)

    Hey @peterwau,

    I would suggest adding a check in your function that returns NULL if the $price variable is empty.

    That said, we can only help with our free plugins on this forum, and they don’t support inline PHP functions. If you have more questions about this, please contact us here: https://www.wpallimport.com/support/.

Viewing 1 replies (of 1 total)
  • The topic ‘WP All import Woocommerce sale price’ is closed to new replies.