1

As a workflow message for a contribution confirmation, i use the following template. All values are displayed, except $financial_type_id and $source. Both stay empty in the output table. How come only those two are not displayed, while the others are? When I use total_amount (a database field) instead of amount (not a database field), the output is also empty.

{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}

    <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
    <tr><th {$headerStyle}>
        Detail Contribution
    </th></tr>
    <tr>
        <td {$labelStyle}>{ts}Financial type{/ts}</td>
        <td {$valueStyle}>{$financial_type_id}</td> <!-- IS EMPTY -->
    </tr>
    <tr>
        <td {$labelStyle}>{ts}Total Amount{/ts}</td>
        <td {$valueStyle}>{$amount|crmMoney:$currency}</td>
    </tr>
    <tr>
        <td {$labelStyle}>Year</td>
        <td {$valueStyle}>{$source}</td> <!-- IS EMPTY -->
    </tr>
    <tr>
        <td {$labelStyle}>{ts}Receive Date{/ts}</td>
        <td {$valueStyle}>{$receive_date|truncate:10:''|crmDate}</td>
    </tr>
    <tr>
        <td {$labelStyle}>{ts}Receipt Date{/ts}</td>
        <td {$valueStyle}>{$receipt_date|truncate:10:''|crmDate}</td>
    </tr>
    <tr>
        <td {$labelStyle}>{ts}Transaction #{/ts}</td>
        <td {$valueStyle}>{$trxn_id}</td>
    </tr>
    </table>
  • Try prefixing the blank ones with contribution, e.g. $contribution.financial_type_id – Demerit Feb 16 at 17:11
  • @Dement. Thanks for the suggestion. Adding "contribution" as you suggested, did not help. The values stay empty. – MarkDQ Feb 16 at 21:16
  • This question seems similar? civicrm.stackexchange.com/questions/8905/…. Maybe without the $ or see the part about formValues. – Demerit Feb 16 at 21:42
  • @Demert. All the suggestions did not work. {$formValues.xxx} is for the offline confirmation (based on a form). The online version is the template used with a query (for instance, the n latest imported contributions),and is no form. I tried the different names {$contribution.xxx}, {contribution.xxx} where xxx = "financial_type" or "financial_type_id". Also {financial_type_id} without $. Same problem with "source" or "paidBy". – MarkDQ Feb 16 at 22:46

Your Answer

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

Browse other questions tagged or ask your own question.