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

pp_express.php + coupon discount. #1324

Closed
chufrog opened this issue Apr 9, 2014 · 0 comments
Closed

pp_express.php + coupon discount. #1324

chufrog opened this issue Apr 9, 2014 · 0 comments

Comments

@chufrog
Copy link

chufrog commented Apr 9, 2014

OpenCart - v1.5.6

I have a webshop

  • checkout product "A" with paypal express => no problem
  • checkout prodcct "A" with paypal express + 40% discount coupon => a "A non well formed numeric value encountered in .." error throw on catalog/model/paypment/pp_express.php line 267

Potential problem (wait for your confirm):
on pp_express.php - line 261:
$item_total = number_format($item_total + $item_price, 2);

it call number_format on the $item_total repeatedly (within a foreach loop).
but number_format return a string, it cause lots of problem on the next iteration and mess up the result of $item_total.

Suggestion:
change line 261 from
$item_total = number_format($item_total + $item_price, 2);
to
$item_total = $item_total + $item_price;

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