jQuery(document).ready jQuery('#edit-order-id').val() call fails and should be jQuery('[name=order_id]').val()

Comments

bwynants’s picture

Status: Active » Needs review

uc_payment.js

jQuery(document).ready(
  function() {

    // attach a progressbar if requested
    if (Drupal.settings.ucShowProgressBar) {
      show_progressBar('#line-items-div');
    }

    // disable the submission buttons and get payment details
    if (Drupal.settings.ucOrderInitiate) {
      add_order_save_hold();
      get_payment_details(Drupal.settings.ucURL.adminOrders + jQuery('[name=order_id]').val() + '/payment_details/' + jQuery('#edit-payment-method').val());
    }
  }
)

you need #1187018: javascript function missing to get at that point if #1187018: javascript function missing isn't added the code breaks earlier....

bwynants’s picture

StatusFileSize
new698 bytes

and an official patch

bwynants’s picture

StatusFileSize
new1.01 KB

When editing the payment on an order via admin edit an error happens and the payment pane does not get updated correctly

correct patch now

longwave’s picture

Status: Needs review » Fixed

Committed this change and removed the order hold parts, but I don't think this fully solves the problem, you can't just inject new parts into forms in D7 without rebuilding the form object properly - changing the payment method now works, but any details attached to the new method don't get saved. This is already an open task: #1182520: Convert order creation and editing forms to D7 Ajax

Status: Fixed » Closed (fixed)

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