Project:
Gift CertificateCategory:
bug reportPriority:
normalAssigned:
UnassignedStatus:
activeCame across a floating point precision problem in uc_payment_method_zero_total()
if ($total != 0) {
$result[] = array(
'pass' => FALSE,
'message' => t("Your final order total is $total, not $0. Please go back and select a different method of payment.")
);
Testing against ZERO is bad and might fail, this should be replaced by something like
if ($total > 0.001)
At least this fix worked for me.
More info here: http://www.ubercart.org/forum/bug_reports/4620/uc_order_get_total_roundi...


Re: Checking order_total against zero (floating point precision)
I wonder if you should just disable the zero total payment method in here and use my free order payment method available here.
Re: Re: Checking order_total against zero (floating point precis
I think Zero Total payment method is part of the gift certificate module. If it's easy enough to change the module so that it interacts with your free order payment method, I'd like to know how it's done
Honestly I haven't dug that much into it so that might be kind of a silly question to ask, so I will check out your link as well. Thanks, Ryan!
Re: Re: Re: Checking order_total against zero (floating point pr
The free order one was what I put together as a result of some work for WBR. I don't think I knew there was a payment method in here, too. However, if the gift certificate module did it properly as a payment method, you should just be able to disable the one and enable the free order. Of course, if it's not broken, there's no reason to fix it.