2

I am using wp all import to import products. My all prices are with comma instead of decimal point(.). When I use condition to get all product which price less than 11,5 it returns zero result. It could not recognise comma.

  • can you give an example of a line in the csv? Possibly an indication of which field is the dollar amount. – NiteRain Feb 01 '19 at 20:27
  • In my csv a field price with comma contains my product price. – Muhammad Bilal Feb 01 '19 at 20:42
  • hard to tell if there is a fix without an example rows. – NiteRain Feb 03 '19 at 20:36
  • This is not possible due to limitation on Xpath. In XPath only . (period) is allowed as decimal delimiter. Because of that you can't use filtering option available in Element step of WP All Import wizard. You either need to convert your pricing data to use period as decimal delimiter or add custom function to filter based on comma as decimal. This only affects filtering feature. You can import your comma delimited pricing data without it and WPAllImport will save it in correct format in database. – Dhaval Shah Feb 04 '19 at 06:45

1 Answers1

1

This is an old post 2 years ago, but propably someone is looking for a solution. Thus, you could add a custom function inside Regular Price (or wherever you want to place this price value). For example, add this code:

[check_price({column_of_your_csv[1]})]

and inside Function Editor tab, you could write this code:

function check_price($avail) {
    $price = str_replace(",",".",$avail);
        return $price;
}

Not tested, but it should work!