Needs work
Project:
Ubercart Discounts (Alternative)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2010 at 08:16 UTC
Updated:
21 Dec 2011 at 17:11 UTC
Hi,
Say order total before discount is 20€.
After applying a 20€ discount that shall bring order total to zero (i.e. free order), user still have to enter credit card info for a 0€ payment.
Module installed :
Thanks
Laurent
Comments
Comment #1
agence web coheractio commentedAny ideas ?
Thanks
Comment #2
aelling commentedI am also looking for a solution to this.
Comment #3
julient commentedsame setup, same problem
Comment #4
agence web coheractio commentedFound the problem :
uc_free_order us triggered when #edit-panes-payment-current-total on the payment panel is equal to zero .This id corresponds a hidden field that holds the total amount of the order.
However this field is calculated in a way that doesn't support all cases. For example, if you have VAT set up (uc_vat), the value of this field is wrong hence doesn't trigger uc_free_order when needed.
To fix this, I have changed "current total" to equal to the vat value. Hence if order subtotal is zero, VAT is zero and "current total" is also zero. Obviously, the "current total" is no longer the actual order total...
My quick fix is the following in ubercart/payment/uc_payment/uc_payment.js
You will have to change tax_2 to match the id of your tax.
Of course a nicer fix would be better
In the meantime, hope this helps
Laurent
Comment #5
rkeppner commentedI was running into the same issue, but with the standard uc_taxes module. Taxes are only added for the merchant's home state, but if a customer had an order total of $0 (through a discount) and lived in the taxed state, they got the dreaded "We cannot process your order without payment" error message.
I finally came up with a simple workaround. I edited the conditions for sales tax in conditional actions. Where I originally checked that the order balance was greater than $0 and the billing state was the same as the merchant, I added one more condition: that the payment method was NOT Free order. That took care of the problem.
I'm documenting this here in the hopes of helping someone else before they spend another 3 hours trying to figure this out.
Comment #6
rbosscher commentedthis is what i had to do to make it work:
Comment #7
jrust commentedNeeds to be done in a way that doesn't hard-code the tax line item id.
Comment #8
elc commentedSee http://drupal.org/product/uc_free_order
.. works for me.
Comment #9
mediacube.sk commentedI had the same problem on D7, I wanted to skip billing and payments at checkout if their price is 0. And after recoding uc_free_order to work with D7...it was still not the one. Then I realized it can be done by mymodule_form_alter hook like this:
So what I'm actually doing is deleting the panes dynamically based on the total price of the order. I have a subscription page, so there is never more than 1 product/subscription in a cart, but this solution works for any number of prods.
Hope it helps someone.