Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

will not accept comma in cart #308

Open
ianwilliams7158 opened this issue Dec 15, 2018 · 2 comments
Open

will not accept comma in cart #308

ianwilliams7158 opened this issue Dec 15, 2018 · 2 comments

Comments

@ianwilliams7158
Copy link

Hi

I have several thousand products in my database and many of them are above £1000, resulting in a comma, ie £1,999.99.

When this is passed to minicart, it displays NaN and will not process forward. Any amount under £1000, and therefore not using a comma goes through perfectly and I can checkout as expected.

How can I force the minicart to accept the comma? I know paypal understands them as I'm using the exact same code as on my test site that does not have minicart installed and amounts over £1000 go through successfully.

Can anyone help?

@robliberty
Copy link

Add in a quick jQuery replace function to strip the commas before passing to cart

var noCommas = $('.money').text().replace(/,/g, '');

@ianwilliams7158
Copy link
Author

perfect! thanks very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants