Below we have compiled commonly requested liquid blocks that can be used in various places in our system. To use any of them, simply copy and paste the code block into the desired location. In all these examples, be sure to replace the text in red with the desired content.
Donation Recipient Logic
This code block returns different text depending on if the donation recipient is a fundraiser, a team, or the campaign (a general donation). This code block works for the Donation Confirmation email and in the post-donation thank you page.
{% if Donation.Recipient.Member_Id > 0 %}Text for personal donation here{% elsif Donation.Recipient.Team_Id > 0 %}Text for team donation here{% else %}Text for general donation here{% endif %}
Retrieve Tax-Deductible Amount
This code block returns the total amount eligible for tax deduction in a single ticketing transaction. This code block works for the Ticket Purchased Confirmation email and other locations where a ticket purchase is applicable.
{% assign eligibleAmount = Donation.Amount %}
{% for ticket in Tickets %}
{% assign eligibleAmount = eligibleAmount | minus: ticket.Price %}
{% assign eligibleAmount = eligibleAmount | plus: ticket.Amount_Discounted %}
{% assign eligibleAmount = eligibleAmount | plus: ticket.Tax_Deductible_Amt %}
{% endfor %}
Eligible amount is: {{ eligibleAmount }}
Change Currency Format
This code block converts the formatting of a donation amount from the U.S. standard to that of other countries by replacing the decimal with a comma, and appending the dollar symbol instead of prepending. For example, instead of "$12.67", using this code block would output "12,67 $".
{% capture newDonationAmount %}{{ Donation.Amount }}{% endcapture %}{{ newDonationAmount | split: '.' | first }},{{ newDonationAmount | split: '.' | last }}
$
{% if Donation.Recipient.Amount_Raised < 1000 %} CONTENT HERE {% endif%}
Or, if Donation recippient is not available in your email tempalte, please use the code below.
{% if Fundraiser.Amount_Raised < 1000 %} CONENT HERE {% endif%}
% if Primary_Registrant.Is_Team_Captain %} CONTENT HERE {% endif %}