• Resolved steveklt

    (@steveklt)


    Hello,
    I want to replace commas (,) wwith dot (.) for the price column. Is there any option to do it or a custom php code? I tried to select Format numbers (use WC decimal separator) but nothing changed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    >Woocommerce>Settings>General, section “Currency options”

    Decimal separator = . ?

    thanks, Alex

    Thread Starter steveklt

    (@steveklt)

    Well, i don’t want to change the decimal for my site because the format 9.999,99 is more regural for the customers. I would like to make it happen only to the exported file because of an obligation of the printing platform that courier provided me and doesn’t recognize commas.

    Plugin Author algol.plus

    (@algolplus)

    ok, please add following code to “Misc Settings”

    add_filter( 'woe_format_numbers', function($new_value, $value) {
      return number_format( floatval( $value ), 2, ".","" );
    },10,2);

    “Format numbers” must be selected.

    Thread Starter steveklt

    (@steveklt)

    It doesn’t seem to work. I tried changing also decimal seperator but still the export file contains commas. Stange though in preview it seems to outpout dot but in actual exported xlsx file it is comma.

    • This reply was modified 7 years, 8 months ago by steveklt.
    Plugin Author algol.plus

    (@algolplus)

    Hello

    Excel uses your OS settings to format numbers.
    But you can change them https://www.howtogeek.com/245510/how-to-change-excels-decimal-separators-from-periods-to-commas/

    thanks, Alex

    • This reply was modified 7 years, 8 months ago by algol.plus.
    Thread Starter steveklt

    (@steveklt)

    Thank you very much! I wouldn’t believe it was from the excel application the problem. Your support is awesome.. keep it up!

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome 😉

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘String replace’ is closed to new replies.