impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
346 stars 191 forks source link

Need to add better support for the use of a space as thousands separator value #696

Closed Benunc closed 8 years ago

Benunc commented 8 years ago

In many cultures/currencies, a space is used as the value separator for thousands. In order to enter a space in Give, users have to know the HTML entity code of  

Can we create a way for that input to not sanitize out the space?

Further, once you use that in the settings field, it breaks the layout by wrapping the text on especially large donation amounts (which I realize is an edge case). This would be related to #693 and #650

screen shot 2016-07-07 at 6 06 03 am
Benunc commented 8 years ago

break/wrapping issue can be fixed by making the width of that span "auto" instead of "125px"

DevinWalker commented 8 years ago

I did not know so many nations use a space for large numbers. https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html

@ravinderk I assume Woo supports a space? If so, how does they do it?

ravinderk commented 8 years ago

@DevinWalker They store space in database for thousand separator if user want to and use this value in price formatting in number_format function https://github.com/woothemes/woocommerce/blob/master/includes/wc-formatting-functions.php#L419

screen shot 2016-07-08 at 9 12 41 pm
DevinWalker commented 8 years ago

This is resolved with https://github.com/WordImpress/Give/pull/734

ravinderk commented 8 years ago

@DevinWalker I found one issue if you check ben's screenshot you will see that if we set larger donation amount without having any custom donation then donation amount breaks in design.

screen shot 2016-07-20 at 5 06 54 pm

Pull request to fix this issue : https://github.com/WordImpress/Give/pull/777