Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Warning: number_format() expects parameter 1 to be double, string given funktiossa _payment_method_adjustment() (rivi 271 tiedostossa /home/biovasa/biovasa.fi/sites/all/modules/uc_pma/uc_pma.module).
This is repeated for every order (Thus giving hundreds of orders)
Comment | File | Size | Author |
---|---|---|---|
#3 | uc_pma-1687740-empty_adjustment.patch | 685 bytes | xurizaemon |
#2 | uc_pma-1687740-number_format_warning.patch | 864 bytes | xurizaemon |
Comments
Comment #1
ryank76 CreditAttribution: ryank76 commentedI'm getting this too:
.
Comment #2
xurizaemonWithout digging TOO deeply, it seems like round() is the right thing to do here, not number_format()?
Try this, let me know if it applies discounts properly. Untested.
Comment #3
xurizaemonHmm, also apparently a dupe in #964156: Warning: number_format() expects parameter 1 to be double, the fix there may be more appropriate (but may need updating for D7).
Was this happening when the adjustment was zero, or when there was some adjustment being applied?
If for zero adjustments, you might prefer to use the fix from that issue, updated to D7 here.
Comment #4
ryank76 CreditAttribution: ryank76 commentedThat patch totally worked - thanks!
Comment #5
xurizaemonGuessing you mean the first patch, based on the time of our comments here?
Comment #6
kopeboy CreditAttribution: kopeboy commentedI applyed the patch, but this is not right IMHO! It causes a problem for the end user to solve a trivial problem in the admin logs.
The problem is now the customer see the line item with the fee even if adjustment is not present.
BEFORE:
Example with COD (I want to apply a fee):
Subtotal: 100
Discount 1: -10
COD fee: 5
Order total: 95
+ Errors in the log.
BEFORE:
Example with paypal (I apply no fee):
Subtotal: 100
Discount 1: -10
Order total: 90
+ Errors in the log.
NOW:
Example with paypal (I apply no fee):
Subtotal: 100
Discount 1: -10
PayPal Website Payments Standard fee: 0
Order total: 90
No errors in the log, but HORRIBLE for the user.
Comment #7
xurizaemon@kopeboy / @ryank76, can you confirm which of the above patches you were trying?
Ryan you posted a few minutes after I added a second patch so I wondered if you used the first instead?
Kopeboy if patch #3 didn't work for you try the eearlier one.
Remember to mark RTBC if it works for you, that's how you can help things get committed :D
Comment #8
kopeboy CreditAttribution: kopeboy commentedI applied the "empty adjustment" one..
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commented#3 works and should be committed
Comment #10
xurizaemonThanks for reviewing.
Comment #12
ladinusamad CreditAttribution: ladinusamad commented#3
thx!
worked for me
Comment #13
ParisLiakos CreditAttribution: ParisLiakos commented