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

A non well formed numeric value encountered #180

Closed
audetcameron opened this issue May 17, 2019 · 3 comments
Closed

A non well formed numeric value encountered #180

audetcameron opened this issue May 17, 2019 · 3 comments

Comments

@audetcameron
Copy link

audetcameron commented May 17, 2019

error: A non well formed numeric value encountered exception when calling getTotal() and cart value is over 1000 with a condition applied.
example exception: Darryldecode\Cart\CartCondition->apply('1,154.00', '-10.00')

I was able to fix it by adding-
$totalOrSubTotalOrPrice = str_replace(',', '', $totalOrSubTotalOrPrice);
on line 191 CartCondition.php

@pdois
Copy link

pdois commented Jul 18, 2019

#187

@afbora
Copy link

afbora commented May 5, 2020

@audetcameron You can get total value without formatted like that: Cart::getTotal(false)

@audetcameron
Copy link
Author

@audetcameron You can get total value without formatted like that: Cart::getTotal(false)

thanks @afbora , I see I should be doing that from the start.

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

3 participants