WordPress.org

Support

Support » Plugins and Hacks » Easy Digital Downloads » [Resolved] [Plugin: Easy Digital Downloads] how to get thousand/decimal separator to work on multilingual site?

[Resolved] [Plugin: Easy Digital Downloads] how to get thousand/decimal separator to work on multilingual site?

  • Hi Pippin,

    I’m having an issue with the thousands/decimal separator on a multilingual website (English (default) German and Greek) using the WPML plugin.

    In the settings I have set the separators to use the mainland Europe way: x.xxx,xx

    In the backend on the product posts I use that notation too: EUR 9,99

    Then on the frontend on the product posts I can indeed see EUR 9,99, however on the checkout page something goes wrong as the total amount shows EUR 9.00

    I have tried to overcome this issue by making a WPML Language Configuration File for your plugin (which also is very very helpful for all the other optional output like email content – http://wpml.org/documentation/support/language-configuration-files/), but then another issue pops up:

    The notation on the checkout page then is at the product itself EUR 9.99 and at the total EUR 9,99

    Have you heard of any of these issues before? How is this normally solved?

    Looking forward to receiving some info on this.

    PS the theme that is used for this site is Restored, a themeforest theme, supposedly especially developed for your plugin.

    http://wordpress.org/extend/plugins/easy-digital-downloads/

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Pippin Williamson

    @mordauk

    Ah, I see why you’re having problems. There are a few areas where the number formatting isn’t applied correctly.

    I’ve just fixed the bugs and am going to push an update out later today or tomorrow. Once it’s out, your issues should be fixed.

    Fantastic news Pippin, thanks so much!

    btw, if you want I can send you the complete language configuration file that I made for your plugin. Once you add it to the plugin’s directory WPML will pick it up. People who don’t use WPML will never know the difference.

    Plugin Author Pippin Williamson

    @mordauk

    That would be great if you could send that. If you’re are familiar with Github, create and issue or pull request: https://github.com/pippinsplugins/Easy-Digital-Downloads

    The latest version does not solve the pricing problem.

    When you set the decimal separator to a comma (,) you still need to use a dot (.) in the pricing of the download configuration. Only then will the backend (products list) and the frontend show a comma.

    BUT, when on the checkout page, the price is still rounded down (basically everything after the decimal separator is completely ignored and replaced with 00.

    Example:
    Settings – thousand separator is a dot, decimal separator is a comma
    Download Configuration of Single Product – price needs to be set with a dot: 7.99
    Backend Product list shows prices with a comma: 7,99
    Frontend shows prices with a comma and with the correct amount on most pages, only checkout page the total is shown as 7,00

    screenshot: http://img.skitch.com/20120916-f185kxa74fdeuac961bdq2511d.jpg

    an additional problem is that now on the single product pages the currency no longer shows.

    Plugin Author Pippin Williamson

    @mordauk

    I see the problem and am working on it.

    Plugin Author Pippin Williamson

    @mordauk

    Pretty sure I have this all fixed and working great now. Would you be willing to test the deve version on Github?

    Yes, I am willing to do that and will let you know the results soon.

    Currency is back and as long as you write the price in the backend with a dot (.), the price shows correct on the backend and frontend with a comma (,).

    Clicking on checkout after buying now indeed shows the correct price on both the product line as the total line.

    The only warning to existing users is that all prices of existing products have been multiplied by 100.
    In other words, if you have previously added a product as 12,99 in the download configuration settings, after installing the update that price has become 1299,00

    This happens on both prices separated with a dot and with a comma. For a user like me (still in development) obviously not a huge problem, but for people with 100’s of downloads this would be terrible.

    not entirely correct.

    if you choose a comma to be he decimal separator then in the download configuration you need to set the price with a comma too. After saving the price will show with a dot, but on the backend products list it shows with a comma and the frontend is correct too.

    Plugin Author Pippin Williamson

    @mordauk

    The multiplication is definitely not supposed to be happening. I was working on this while half asleep last night, so I most likely missed something simple 🙂

    A note about setting up prices: if you set the thousands separator to be a “.”, then you should use a . in the price option. The same goes for the decimal separator.

    I’ll be working on this bug more today.

    On my development environment I have adjusted all the prices to commas too now and it works perfectly actually.

    Once saved it still shows the price with a dot (in the download configuration box; everywhere else it shows the comma), but that is ok with me

    The multiplication only happens if you set the decimal separator to be a comma and then input prices with a dot.

    Plugin Author Pippin Williamson

    @mordauk

    The meta box should never change what you insert, so if you set the price with a comma, the comma will be saved. if you set the price with a decimal, the decimal will be saved. If this is not the behavior you’re seeing, then I need to address that as well.

    this is indeed not the behavior I am seeing. I input a comma, after saving it outputs a dot, but everything else is showing the comma.

    I am sorry that I seem to have opened a horn’s nest…

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Resolved] [Plugin: Easy Digital Downloads] how to get thousand/decimal separator to work on multilingual site?’ is closed to new replies.
Skip to toolbar