Support » Plugin: Donate Plus » [Plugin: Donate Plus] Minimum Donations

  • trizzant


    I am looking for a way to limit the minimum donation amount. I tested a few .01 donations and it worked. The problem is that people may leave meaningless donations just to post comments. Without going into too much detail I have competition who can be very malicious. Multiple .01 donation would keep me busy removing comments and possibly suspend my account if combined with Paypal disputes.

    So I was thinking that the amount box in the donation form could be made to only accept values greater than X. X being $10 or whatever I decide on. Could this be a line I could add to the php. I am not a programmer but I can modify code if shown the right way. Any help is much appreciated, Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • trizzant


    Paid a dev on Freelancer to do it. Here you go.

    Changes should be in donate-plus.php <–

    <span id=”errd”></span>

    ^ That next to the amount input field tag

    <script type=’text/javascript’>
    jQuery(‘#donateplusform’).submit(function() {

    if (jQuery(‘#amount’).val() >= “.$dplus[‘default_value’].”)
    return true;
    jQuery(‘#errd’).css(‘color’, ‘red’);
    jQuery(‘#errd’).text(‘Error: $”.$dplus[‘default_value’].” Minimum ‘).show();

    return false;

    ^ That just below the donation form…



    Thank you for sharing it.

    I have made the suggested changes and now the donate-plus-php looks like the following:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    But the page doesn’t load (error).. Can anyone tell me where I have made the mistake?

    (I don’t know anything about PHP..)

    Thank you in advance



    Sorry, I didn’t know the Forum Rules on pasting code.

    To see code click here:

    Thank you

    Hi Trizzant, I have followed your instructions but I was not able to make donate-plus work. Could you please tell me after which line of code your code is put in donate-plus.php? Thank you. Andreas

    I have studied PHP in the meantime and I have got the answer myself.

    You should add the ‘<span>xxxx</span>’ code above in donation-plus.php to:

    ‘<small>(‘.__(‘Currency: ‘,’dplus’).$cur.’)<span id=”errd”></span></small></p>’;’

    And add between ‘endif;’ and ‘return $output;’ the following code:

    ‘$output.=”–copy here code–“;’

    Where –copy code here– is the code listed above.

    I am surprised an indian freelance expert asked me $100 to do this trick, I am proud that I have saved money while learning a whole lot of PHP!! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Donate Plus] Minimum Donations’ is closed to new replies.