skip to Main Content

I’m really fighting with displaying incorrect prices at almost 6300 products imported from XML feed. All prices are in format like 409.000 €, which means only 409 €. It displays prices in frontend like 409.000,00 which should be 409,00 (or 409). This {price[1]} should be formatted.

2

Answers


  1. There are php functions you can use, I am no expert but I use str_replace on some values. In your case something like this might work: [str_replace(".000,00",",00",{price[1]})]
    You place this on the import field, where you have {price[1]}
    But if you search "wp all import php functions" you’ll get more info.

    Login or Signup to reply.
  2. Could try something like this:

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

    Use it like this

    [wp_all_import_convert_price({price[1]})]
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search