1

I'm having trouble getting the event.balance token to display properly in emails. I've tried {event.balance} (which breaks Smarty so it doesn't send the email) and {$event.balance} (which is returned with [blank]). Is there some smarty capture or other declaration that I need to do?

My test participant shows $300 paid of $1000 total fee, so I am expecting the token to resolve to "$700.00"

Civi 4.7.21 Joomla 3.7.5

  • Can you add the context in which you try to add the token ? – samuelsov Sep 29 '17 at 18:43
  • The context is sending participant emails through Find Participants. If, as you say, event tokens are only available in scheduled reminders, that explains why Event Balance isn't available isn't in the token drop-down. That seems like a real limitation, though. I'd rather not schedule my reminders, but I want to let participants know how much they still owe. It also seems strange that Balance is an Event token, rather than Participant. – Phil Morice Brubaker Sep 29 '17 at 19:34
2

This Fuzion extension would be worth checking out, and if it doesn't provide the required token, could have a PR with the required code, which might be better than a standalone extension for this problem

| improve this answer | |
  • Thanks for the suggestion. I already have this extension installed, but looking at it again, I see "it will also pick up extra token files if you define a custom php folder and put the token files in it. ie. it will look in $customPHPPathDir/tokens and pick up files ending in .inc in that folder". I'll have to figure out how to make use of that! – Phil Morice Brubaker Oct 2 '17 at 14:14
  • maybe worth a +1 as a helpful answer? StackExchange doesn't like Questions that have Answers that all have 0 – petednz - fuzion Oct 2 '17 at 18:50
  • i ask because otherwise these 0 tickets just keep being bounced back to the top of the list by SE until they get some sort of ranking. You can even +1 both answers if they have both been helpful even if not the full/correct solution – petednz - fuzion Oct 2 '17 at 18:51
0

First, tokens do not contain $ sign so it should be {event.balance} but :

  1. you should use the token dropdown list to insert the code when possible to avoid problems

  2. the only way to use event tokens is in schedule reminders apparently - it could be good to have them when doing letters from the participant search but it doesn't seems to be implemented yet

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.