Support from Acquia helps fund testing for Drupal Acquia logo

Comments

break9’s picture

I second that

oweno’s picture

FileSize
778 bytes

I made two small changes to uc_free_order.module to make this work in drupal 6.
There is a patch attached. or you can just make the following changes to uc_free_order.module:

line 22:
function uc_free_order_form_alter($form_id, &$form) {
TO:
function uc_free_order_form_alter(&$form, &$form_state, $form_id) {

and

line 72:
function uc_payment_method_free_order($op, &$arg1) {
TO:
function uc_payment_method_free_order($op, &$arg1, $silent = FALSE) {

I tested a little, and it seemed to work. Let me know if it is troublesome.

kleinmp’s picture

Here's an update to the upgrade patch.

It adds in the uc_free_order patch from the following issue:
http://drupal.org/node/334832

EasyEC’s picture

I would really like to see this as well.

Does the unofficial patch work ok?

Regards
EC

belmondo’s picture

+1 for the upgrade to D6, this is a great little add-on for Ubercart.

kleinmp’s picture

@EasyEC - this patch has been working for us, although we are not using the latest version of ubercart, which has been changed a lot since we last updated it a couple of months ago.

willvincent’s picture

FileSize
1.4 KB

The change to line 72 seems unnecessary to me. What is $silent referring to? The only thing that function does is return the string to continue with checkout to complete the free order.

This patch works just fine in the latest (6.10) drupal release.

nextpulse’s picture

This does not work with D6 and Ubcart2 if the total is $0.

Although the payment panel is hidden - it is still validated during 'review order'.

rkeppner’s picture

I applied all of the previous patches, and everything works for me for Drupal 6.10 and Ubercart 2.0-beta5. I've attached both a complete patch and a tarball. If this works for others, please create a 6.x version.

Agileware’s picture

Thanks @rkeppner the D6 module works for me. Love the community :-)

TwistedLincoln’s picture

Category: task » bug

The module posted by rkeppner on #9 has an unfortunate bug: the javascript in uc_free_order.js automatically selects the first available payment method when Free Order is not active. The side effect of this is that when you try to select a payment method other than the first one, the first payment method is selected instead... You then have to re-select the payment method you want in order for it to take effect.

This can be avoided by commenting out lines 30, 31, 34, 35 and 38 in uc_free_order.js. Then everything works fine, however the result is that NO payment method is selected by default when Free Order is not in effect. So customers will be forced to select a payment method before they can checkout.

rszrama’s picture

Status: Active » Fixed

I couldn't reproduce the bugs as you described them, though I did find a bug related to the ordering of the payment methods. If the free order payment method was first in your list when sorted by weight and it was disabled, it was still being selected as the default option when customers were required to submit payment. I've fixed this and tidied up a couple other things. The D6 port has been committed to CVS and is available as a beta version until I'm sure it's good to go. That depends on good user feedback, so feel free to pipe up if it works for you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.