Simple Donate is WordPress plugin to make requesting and receiving donations painless. Simple Donate allows multiple donation levels, custom donation amounts and donation maximums. It does this through a simple shortcode that has a generator built into the editor.
Demo
Output
Shortcode
|
1 |
[simpledonate item_name="Feeding Ethoseo's Caffeine Addiction" amt1="2" label1="One Coffee ($2)" amt2="10" label2="Pound of Coffee" label_other="Other:" button_text="Feed Our Caffeine Addiction" ] |
[Simplified] Output Code
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<form id="sd_paypalform" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<ul class="sd_hidden_form">
<li><label class="sd_label_radio"> <input class="sd_object sd_usermod sd_radio" type="radio" name="sd_radio" value="2" />One Coffee ($2)
</label></li>
<li><label class="sd_label_radio"> <input class="sd_object sd_usermod sd_radio" type="radio" name="sd_radio" value="10" />Pound of Coffee
</label></li>
<li><label class="sd_label_radio donate_other_radio_label"> <input class="sd_object sd_usermod sd_radio donate_other_radio" type="radio" name="sd_radio" value="donateother" /> <input class="sd_object other_amt sd_usermod" type="number" name="other_amt" /> </label></li>
</ul>
<input id="cmd" type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="tax" value="0" />
<input class="sd_object paypal_object" type="hidden" name="business" value="info@ethoseo.com" />
<input class="sd_object paypal_object" type="hidden" name="bn" value="Ethoseo Internet Marketing" />
<input class="sd_object paypal_object" type="hidden" name="item_name" value="Feeding Ethoseo's Caffeine Addiction" />
<input class="sd_object paypal_object" type="hidden" name="currency_code" value="USD" />
<input id="paypal_amount" class="sd_object paypal_object" type="hidden" name="amount" value="" />
<input id="sd_submit" class="sd_object" type="submit" name="submit" value="Feed Our Caffeine Addiction" />
</form> |
This is the (tidied) html after the page loads and Javascript is executed. Javascipt controls the amount after it is confirmed that Javascript is enabled.
Docs
Shortcode Attributes
item_name
The name of the item displayed on the PayPal Invoice
amt – label pairs
The shortcode can contain any number of amt/label pairs (e.g. amt1 label1, amt2 label2…)
label_other
The label displayed for the “other” field.
other_step
As the other field uses the new HTML field number you can specify a minimum step size. This will also act as the minimum denomination (if you set the step to 10 donors can only donate in increments of 10: 10,20,100…).
button_text
The text on the submit button.
debug
If set to true, various things will be logged by console.debug() and the plugin attributes will be output in a <pre> after the shortcode.
