If you wish to change the suggested donation amounts of your Tamaro widget, the following code snippets can serve as a template.
Change one time donation amounts
You can set the default amounts for a one time donation via this code snippet:
<script>
window.rnw.tamaro.runWidget('.rnw-widget-container', {
amounts: [
"20", "50", "100", "200"
],
});
</script>
The field for a custom amount will appear automatically. You can choose the number of amounts you would like to predetermine yourself. We recommend using 3 to 4.
Change recurring donation amounts
You can adjust the amounts for each recurring interval separately. The following code snippets help you do this:
<script>
window.rnw.tamaro.runWidget('.rnw-widget-container', {
amounts: [
{
"if": "recurringInterval() == monthly",
"then": [10,20,50,100],
},
{
"if": "recurringInterval() == quarterly",
"then": [15,30,50,100],
},
{
"if": "recurringInterval() == semestral",
"then": [15,20,80,100],
},
{
"if": "recurringInterval() == yearly",
"then": [40,75,130,200,300],
},
],
});
</script>
The same applies to recurring donation amounts: you can choose the number of amounts that you predefine and the field for custom amount will be there by default.
If you want to determine the amounts in condition to the currency that is selected, you will find a code example in this article.
Comments
0 comments
Please sign in to leave a comment.