There is still some remnant of the old code in here I believe, in that the uc_varprice_show_arb.js has references to ids with -arb- in them when this has been removed from the code. Can't do patches yet (I'll get there, promise!!), but this is the correct code for that file that shows/hides the other amount box when that option is selected. Maybe this is right in dev, but there's not a dev version shown on the project page...

// $Id$

/**
 * @file
 * Customer-facing JavaScript for UC Variable Price.
 */

Drupal.behaviors.ucVarPriceShowArb = function(context) {
  var varpriceSel = $('#edit-varprice-sel');
  if (varpriceSel.length) {
    // Using drop-down menu
    if (varpriceSel.val() !== 'other') {
      $('#edit-varprice-wrapper:not(.processed)').addClass('processed').hide();
    }
    varpriceSel.change(function() {
      if ($(this).val() === 'other') {
        $('#edit-varprice-wrapper').show('fast');
        $('#edit-varprice').focus();
      }
      else {
        $('#edit-varprice-wrapper').hide('fast');
      }
    });
  }
  else {
    // Using radio buttons
    if ($('input[name="varprice_sel"]:checked').val() !== 'other') {
      $('#edit-varprice-wrapper:not(.processed)').addClass('processed').hide();
    }
    $('input[name="varprice_sel"]').change(function() {
      if ($('input[name="varprice_sel"]:checked').val() === 'other') {
        $('#edit-varprice-wrapper').show('fast');
        $('#edit-varprice').focus();
      }
      else {
        $('#edit-varprice-wrapper').hide('fast');
      }
    });
  }
};
CommentFileSizeAuthor
#3 fix_show_arb_js-1509018-2.patch1.63 KBscotwith1t

Comments

scotwith1t’s picture

Status: Active » Reviewed & tested by the community

It's really a simple change, others can confirm it works, but this oughta be a clear and quick commit since it negates the usefulness of the 1.1 version's arbitrary value option.

scotwith1t’s picture

bump. have to edit this js file every time i use this module and with all the D6 sites with ubercart needing arbitrary donations, i'm having to fix this for every site...will try and provide an actual patch soon, maybe that will help get committed sooner.

scotwith1t’s picture

StatusFileSize
new1.63 KB

Here's an actual patch...someone test please? The arbitrary amount hide/show part doesn't work without this change.

jrust’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, patch applied.

scotwith1t’s picture

Status: Fixed » Closed (fixed)

Awesome. New version taboot. :)