Bids are not possible because any bid triggers the "Your Bid must be a multiple of x" error. As a workaround I commented out that test in the script.
I have global settings for min bid of $1 and increments of $1. Tried other values and setting values with same result.

Comments

onyxnz’s picture

Fix:
in uc_auction.js
line 84/85:
// Is the bid value a multiple of the bid increment value? Fixed by multiplying by 100 as modulus would fail with floating point 'bug'; by Onyx.

else if ((100*bidVal) % (Drupal.settings.ucAuction.bidIncrement*100) !== 0) {

HydroZ’s picture

Hi,

i tried to find some glues, that lead to the validation error ("You must place at least a multiple of ...").
I was wondering, why the message is "You must place at least a multiple of EUR 1,00,EUR 1,00, EUR 1,00...". Therefore I made a litte research with FireBug, found the related script:

  // When the bid form is submitted, let's do some client-side verification
  // (don't worry, we're checking things server-side too).
$('#uc-auction-bid-table-form').submit(function() {
  // The below is analogous to _uc_auction_uncurrency().
  var bidVal = Number($('#edit-user-bid').val().replace(Drupal.settings.ucAuction.currencyThou, '').replace(Drupal.settings.ucAuction.currencyDec, '.').replace(/[^\d\.\-]/g, ''));
  // Is the bid value below the minimum bid value?
  if (bidVal < Drupal.settings.ucAuction.minBid) {
    alert(Drupal.t('The current minimum bid value is @val.', {'@val': Drupal.settings.ucAuction.minBidF}));
    $('#edit-user-bid').val(Drupal.settings.ucAuction.minBidFNoSign).addClass('error').focus();
    return false;
}
  // Is the bid value above the maximum bid value? (Ignore this if the
  // minimum bid value is greater than the maximum bid value.)
else if (Drupal.settings.ucAuction.maxBid > Drupal.settings.ucAuction.minBid && bidVal > Drupal.settings.ucAuction.maxBid) {
   alert(Drupal.t('The current maximum bid value is @val.', {'@val': Drupal.settings.ucAuction.maxBidF}));
   $('#edit-user-bid').val(Drupal.settings.ucAuction.maxBidFNoSign).addClass('error').focus();
   return false;
}
   // Is the bid value a multiple of the bid increment value?
else if (bidVal % Drupal.settings.ucAuction.bidIncrement !== 0) {
   alert(Drupal.t('Your bid must be a multiple of @inc to be accepted.', {'@inc': Drupal.settings.ucAuction.bidIncrementF}));
   $('#edit-user-bid').addClass('error').focus();
   return false;
}
// Allow the form to be submitted.
return true;
}); 
  • Drupal.settings.ucAuction.minBid is an array with these values: [506, 35001, 501] (This are my bids, before the error occured)
  • Drupal.settings.ucAuction.bidIncrement is an array with these values: [1, 1, 1] (This are the bid increments of the auctions on whose i bid before...)
  • bidVal is not an array and has the value: 510 (This is the value I try to submit, as the errors annoys...)

Obviously, the following variables or what ever they are (I am really poor in JS and Object-Stuff) must no be arrays.

  • Drupal.settings.ucAuction.minBid
  • Drupal.settings.ucAuction.bidIncrement

The last If-Clause will become TRUE, because
bidVal % Drupal.settings.ucAuction.bidIncrement
will produce "NaN" and this is not equal to ZERO...

This is definitly the reason why the error occours. The script (above) was not written do compare the values of the above mentioned arrays.

Sadly, I have no glue, where those (Drupal.settings.ucAuction.minBid, Drupal.settings.ucAuction.bidIncremen) come from, but hopefully, I have saved someone more professional like me a little bit of time...

jepster_’s picture

The buggy function is

_uc_auction_mod_zero();

ca. at line 1253 in file uc_auction.module

I've changed it to

function _uc_auction_mod_zero($big, $small = NULL) {
  if ($small === NULL) {
    $small = variable_get('uc_auction_bid_increment', .25);
  }
  $div = $big / $small;

  if(!is_numeric(strpos($div, '.')) === true){
    return true;
  } else {
    return false;
  }
}

now it works for me. hope for you, too. send me some feedback!

jepster_’s picture

Status: Active » Fixed

Marking this as fixed, because of the 1.0 release.

Status: Fixed » Closed (fixed)

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