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.
If a uc_coupon is used to take off 100% of the value the price becomes £0.
But this also causes the payment pane to reload. Reloading causes the JavaScript click that was attached to the hidden form field $('#edit-panes-payment-current-total').click(function() { free_order_check_total(this.value); });
to be lost during the AHAH reload.
In 6.x i think this can be resolved with Drupals "behaviors" feature?
So we end up with a total of £0 but still the option to pay because the free_order_check_total() JS call never got executed when the payment pane was re-loaded.
Comment | File | Size | Author |
---|---|---|---|
#11 | missing-pane-setting.patch | 3.01 KB | scotwith1t |
#9 | warn_about_total_in_preview_pane_disabled-525238.patch | 4.66 KB | scotwith1t |
#8 | warn_about_total_in_preview_pane_disabled-525238.patch | 1.64 KB | scotwith1t |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedI don't understand why the behavior you're describing is happening unless the uc_coupon module is doing something funny here. The whole pane shouldn't be reloading, and since the hidden current total field is outside of the line items div (that's what should actually be getting reloaded) it isn't affected by a normal line item update. Perhaps the coupon module is doing its own reloading that overwrites this?
Comment #2
Agence Web CoherActio CreditAttribution: Agence Web CoherActio commentedI have the same issue with uc_discounts_alt on 6.x beta 4
Example :
Product price is 10€.
Applied discount of 10€.
Hence total is 0€.
Payment pane is not refreshed. Actually, it seems to be hanging (3 elements waiting to be loaded in status bar of Safari)
Thanks
Laurent
Comment #3
julient CreditAttribution: julient commentedI have a similar issue.
Using conditional action, I make sure that only the Free order payment method is visible when the total is 0.
Flow goes like that:
- payment is $10
- discount for $10 is applied and total is now 0
- only free payment method is visible
- you submit and on the order review page, despite a total of 0 it reads payment will be done with Paypal.
- you click submit and indeed you are taken to Paypal.
Comment #4
Agence Web CoherActio CreditAttribution: Agence Web CoherActio commentedI have posted a quick fix for this. See http://drupal.org/node/683216#comment-2541426
Of course, a more flexible solution would be better : the issue is coming from the calculation of current total in ubercart/payment/uc_payment/uc_payment.js which doesn't support VAT properly
Laurent
Comment #5
raefrog CreditAttribution: raefrog commentedI tried this fix and couldn't get it to work. I am wondering if I don't have the right id for taxes. Can you tell me where I would find the id? I am using the default tax module from Ubercart.
Comment #6
drupeo CreditAttribution: drupeo commentedNot sure if this helps anyone but I've just found that the free order module relies on the setting "Show the order total preview on the payment pane" being on at admin/store/settings/checkout/edit/panes
Comment #7
orianasarac CreditAttribution: orianasarac commented@drupeo - that is totally helpful, thx!
Comment #8
scotwith1tdear Lord, I spent FAR too long trying to figure this out and somehow overlooked this post (probably the title, so I'm retitling) AND posting the fix for anyone who wants it...this will at least WARN the user that they need to enable that setting for this to work...right now it just checks if the payment PANE is set, which it almost always will be unless it's disabled in admin/store/settings/checkout/edit/panes. but just to clarify @drupeo's comment, on this same page, there is a collapsible fieldset for Payment Method Settings and the "Show order total preview" MUST be checked as this module depends on that preview to work as it sets the ['current_total'] part of the payment pane's array. Anyway, here's a simple patch that anyone can use...I got a bit carried away with the drupal_set_message probably, but there will be no mistaking why you're experiencing what I did for the last 5 hours. Hopefully save someone else's time in the future.
Comment #9
scotwith1tcrap. patch didn't work. this one should be right. sorry, new to patching, but figure it's about time. :)
Comment #10
scotwith1tComment #11
scotwith1tok, the formatting was terrible, it broke it even worse and i think was against the beta release...sorry for the messy posting, new to git too...but I think I got it this time and against dev...(i hope so, this is becoming embarrassing)...wish you could delete an uploaded file