If a user selects "no reward" and enters any amount, the last two zeros are considered decimal and are parsed the same way the goal amount is parsed. For example 1580 will be 15.80
I was also wondering why the goal is designed to be entered that way.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | crowdfunding-pledge-amount-fix-2405833-2.patch | 640 bytes | tabestan |
Comments
Comment #1
shadysamir commentedSame for when you select a reward and set the value greater than that of the reward, in that case it uses the field value and is parsed the same way.
Comment #2
AMP23 commentedI know we shouldn't be hacking modules, but if anyone needs a quick fix for this issue, I simply edited the file PledgeSelection.php found in lib/Drupal/crowdfunding/FormControllers at line 99 from:
to:
Comment #3
joaogarin commentedYou could try to provide a patch with this fix. I haven't reached this point but will try to test this and provide a patch
You can see how to make patches here : https://www.drupal.org/node/707484
Comment #4
Yuri commentedI think that this module should be used: https://www.drupal.org/project/commerce_currency taking into account that crowdfunding is generally not limited to one currency or country.
Comment #5
tabestan commentedHere's the patch for #2.
Comment #6
pedrorocha commentedComment #7
pedrorocha commentedFixed and commited.