Background of the issue:
I am trying to calculate a price for a form using Gravity Forms in EUR format (€ 2,50). I found an issue where the decimal is ignored, rendering the price as € 2,00 on the front-end.
I found that the fix was to remove the floatval from this function, but i do not know the further implications of the change:
private function getRawPrice( $price ) {
While my colleague reviews your ticket, I’d be happy to assist you in the meantime.
Could you please confirm whether you’ve tried the solution provided on the errata page? If it resolves the issue, we recommend following the steps outlined there until a permanent fix is released.
The fix is currently scheduled for inclusion in GFML 1.9.0.
Yes I tried that as I said in the first comment and it even breaks the form even more. In stead of the €2,50, I get 0 than, so i did not end up using that.
But my issue is not that it loses the price. Instead it changes it, because of the comma (,) decimal (wich is common in Netherlands). So € 2,50 becomes €2,00 if GFML is enabled.
So the issue is that you can not use a comma (,) in a price in GF when GFML is active, because of the floatval in the function.
For now I fixed it by using the period (.) as the decimal seperator. But I should be able to use a comma (,) as the seperator too.
Hope it is clear what the issue is.
For the next 3 weeks I will be on vacation, so might be a while before I reply back again.
It might be that you are reporting a new issue or an extension of the known problem. We need to replicate this issue on a fresh WordPress installation. Then I'll be able to escalate it to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link:
hidden link
With this link, you'll be directly logged in.
I've configured WPML to have Dutch as the default language and English as the second language. Also, the Gravity Forms plugin is installed (but not active yet.)
Please Gravity Forms and WooCommerce as set on your site (just the basic configurations needed to replicate the issue are enough).
When everything is finished and you can replicate the problem, please let us know.
Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.
I'm setting this ticket as escalated to our second-tier supporters to prevent it from being closed, as you mentioned you'll be on vacation for 3 weeks. If the sandbox site is not active when you check it, please let me know.
Our sandbox system automatically removes unused sandbox sites that have not been accessed for over a week.
We have recently released new versions of our plugins. Please update WPML and its add-ons, as well as the Gravity Forms plugins, to their latest versions and check if the issue has been resolved. You can see that we have new versions by clicking the Check for updates button on your site here: hidden link.
If the problem persists, then here is a new sandbox site you can use: hidden link
We suspect a collision with the theme or another plugin might cause this problem. If possible, get your site into a minimum environment, switching to a default WordPress theme like TwentyTwenty-Four and having no plugins activated except WPML.
First, you must check if the problem persists when just the theme is switched to TwentyTwenty-Four (for example). If the issue persists, deactivate all plugins except WPML and its add-ons, as well as Gravity Forms without any extensions (especially without the GP eCommerce Fields plugin). Then, please check if the problem persists. If the issue does not continue, start by activating the plugins individually and check when the issue comes back; then report to me which plugin was the culprit.
**** Important! Please make a full site backup (files and DB) before you proceed with those steps****
If your site is live, consider trying those procedures in a staging environment, a snapshot of your site on your local server, or another server. ***
Regards,
Itamar.
The topic ‘[Closed] Gravity forms multilingual no decimals in EUR format like (2,50)’ is closed to new replies.