#1 by R800377803
The payment structure for my experiment has 3 components. There is the round-level "p.payoff" which I need for feedback and display purposes. only certain rounds are set as paying rounds, in which case the p.payoff is added to a variable "p.cumulative_payoff" that increments over the course of each app. At the end of each app p.cumulative_payoff is added to "participant.vars[total_payoff] which determines payment for the session. currently the structure is calculating beautifully for the participant, but the "payments" tab of Heroku continues to increment "p.payoff" each round, ignoring whether it is a paying round. There is no way for my cashier to access the correct amount, short of looking at each participants screen at the end of the session. I have tried adding a total_payments variable in vars_for_template on my payment page, in hopes that it will display under the "data" tab in heroku, but with no success. any advice? suggestions? Thank you for answering my amateur questions.
#2
by
BonnEconLab
If you make the total_payments variable a player field and then set player.total_payments = player.participant.vars[total_payoff] in vars_for_template of your payment page, it should be displayed in the “data” tab.
#3 by R800377803
this is working well now! thank you!