Just a note for anyone using this module, it is currently not compatible with the Conditional Payments module. As soon as conditional payments loads, it clears all payment options and recreates them, thus un-hiding the free order option.

I realize that the patch needs to be made on the Conditional Payments end, but just hoping to save anyone else 2 hours of banging their head against the wall.

Comments

ani7a’s picture

Hi!
i've added this lines in uc_conditional_payments.js

free_order_initialized = false;
using_free_order = false;
$('#edit-panes-payment-current-total').click();

Inside this function:

 success: function(data) {

}

Hope it works for you too!

waltercat’s picture

This did not work for me. Did I do this right? I changed this:

      success: function(data) {

        $('#payment-pane .form-radios').empty().append($(data).find('#payment-pane .form-radios'));

        // uc_pma support.
        if (window.update_method_line_item) {
          $("input:radio[@name='panes[payment][payment_method]']").click(function() {
            update_method_line_item(this.value);
          });
        }

to this

      success: function(data) {
free_order_initialized = false;
using_free_order = false;
$('#edit-panes-payment-current-total').click();
        $('#payment-pane .form-radios').empty().append($(data).find('#payment-pane .form-radios'));

        // uc_pma support.
        if (window.update_method_line_item) {
          $("input:radio[@name='panes[payment][payment_method]']").click(function() {
            update_method_line_item(this.value);
          });
        }
budalokko’s picture

It worked for me placing the code at the end of the 'success' function, this way:

      success: function(data) {
        $('#payment-pane .form-radios').empty().append($(data).find('#payment-pane .form-radios'));

        // uc_pma support.
        if (window.update_method_line_item) {
          $("input:radio[@name='panes[payment][payment_method]']").click(function() {
            update_method_line_item(this.value);
          });
        }

        if (payment_method != $('#payment-pane input:checked').val()) {
          $('#payment-pane input:checked').click();
        }

        free_order_initialized = false;
        using_free_order = false;
        $('#edit-panes-payment-current-total').click();
      }