0

I am facing an odd issue, below is my "Membership Confirmation & Receipt" but it is missing the transaction ID, and it is missing the check number when I record the transaction as a check. But I cannot find "Membership Confirmation & Receipt in my message templates in the system workflow message templates page.

So where would I go to add those two field? I'm lost as to where I can edit this template when it isn't in the place it should be.

Thanks! Matt

enter image description here

UPDATED INFORMATION -- 2017 JAN 18

Below is the HTML format for the Message Template for the Contributions - Receipt (off-line) at least what is available to me.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title></title>
</head>
<body>

{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}

<center>
 <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">

  <!-- BEGIN HEADER -->
  <!-- You can add table row(s) here with logo or other header elements -->
  <!-- END HEADER -->

  <!-- BEGIN CONTENT -->

  <tr>
   <td>

    {if $formValues.receipt_text}
     <p>{$formValues.receipt_text|htmlize}</p>
    {else}
     <p>{ts}Thank you for your support.{/ts}</p>
    {/if}

    <p>{ts}Please print this receipt for your records.{/ts}</p>

   </td>
  </tr>
  <tr>
   <td>
    <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
     <tr>
      <th {$headerStyle}>
       {ts}Contribution Information{/ts}
      </th>
     </tr>
     <tr>
      <td {$labelStyle}>
       {ts}Financial Type{/ts}
      </td>
      <td {$valueStyle}>
       {$formValues.contributionType_name}
      </td>
     </tr>

     {if $lineItem and !$is_quick_config}
      {foreach from=$lineItem item=value key=priceset}
       <tr>
        <td colspan="2" {$valueStyle}>
         <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
          <tr>
           <th>{ts}Item{/ts}</th>
           <th>{ts}Qty{/ts}</th>
           <th>{ts}Each{/ts}</th>
           {if $getTaxDetails}
             <th>{ts}Subtotal{/ts}</th>
             <th>{ts}Tax Rate{/ts}</th>
             <th>{ts}Tax Amount{/ts}</th>
           {/if}
           <th>{ts}Total{/ts}</th>
          </tr>
          {foreach from=$value item=line}
           <tr>
            <td>
            {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
            </td>
            <td>
             {$line.qty}
            </td>
            <td>
             {$line.unit_price|crmMoney:$currency}
            </td>
            {if $getTaxDetails}
              <td>
                {$line.unit_price*$line.qty|crmMoney:$currency}
              </td>
              {if $line.tax_rate != "" || $line.tax_amount != ""}
                <td>
                  {$line.tax_rate|string_format:"%.2f"}%
                </td>
                <td>
                  {$line.tax_amount|crmMoney:$currency}
                </td>
              {else}
                <td></td>
                <td></td>
              {/if}
            {/if}
            <td>
             {$line.line_total+$line.tax_amount|crmMoney:$currency}
            </td>
           </tr>
          {/foreach}
         </table>
        </td>
       </tr>
      {/foreach}
     {/if}
     {if $getTaxDetails && $dataArray}
       <tr>
         <td {$labelStyle}>
           {ts} Amount before Tax : {/ts}
         </td>
         <td {$valueStyle}>
           {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
         </td>
       </tr>

      {foreach from=$dataArray item=value key=priceset}
        <tr>
        {if $priceset ||  $priceset == 0 || $value != ''}
          <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
          <td>&nbsp;{$value|crmMoney:$currency}</td>
        {else}
          <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
          <td>&nbsp;{$value|crmMoney:$currency}</td>
        {/if}
        </tr>
      {/foreach}
     {/if}

     {if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
      <tr>
        <td {$labelStyle}>
          {ts}Total Tax Amount{/ts}
        </td>
        <td {$valueStyle}>
          {$totalTaxAmount|crmMoney:$currency}
        </td>
      </tr>
     {/if}

     <tr>
      <td {$labelStyle}>
       {ts}Total Amount{/ts}
      </td>
      <td {$valueStyle}>
       {$formValues.total_amount|crmMoney:$currency}
      </td>
     </tr>

     {if $receive_date}
      <tr>
       <td {$labelStyle}>
        {ts}Date Received{/ts}
       </td>
       <td {$valueStyle}>
        {$receive_date|truncate:10:''|crmDate}
       </td>
      </tr>
     {/if}

      {if $receipt_date}
      <tr>
       <td {$labelStyle}>
        {ts}Receipt Date{/ts}
       </td>
       <td {$valueStyle}>
        {$receipt_date|truncate:10:''|crmDate}
       </td>
      </tr>
     {/if}

     {if $formValues.paidBy and !$formValues.hidden_CreditCard}
      <tr>
       <td {$labelStyle}>
        {ts}Paid By{/ts}
       </td>
       <td {$valueStyle}>
        {$formValues.paidBy}
       </td>
      </tr>
      {if $formValues.check_number}
       <tr>
        <td {$labelStyle}>
         {ts}Check Number{/ts}
        </td>
        <td {$valueStyle}>
         {$formValues.check_number}
        </td>
       </tr>
      {/if}
     {/if}

     {if $formValues.trxn_id}
      <tr>
       <td {$labelStyle}>
        {ts}Transaction ID{/ts}
       </td>
       <td {$valueStyle}>
        {$formValues.trxn_id}
       </td>
      </tr>
     {/if}

     {if $ccContribution}
      <tr>
       <th {$headerStyle}>
        {ts}Billing Name and Address{/ts}
       </th>
      </tr>
      <tr>
       <td colspan="2" {$valueStyle}>
        {$billingName}<br />
        {$address|nl2br}
       </td>
      </tr>
      <tr>
       <th {$headerStyle}>
        {ts}Credit Card Information{/ts}
       </th>
      </tr>
      <tr>
       <td colspan="2" {$valueStyle}>
        {$credit_card_type}<br />
        {$credit_card_number}<br />
        {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
       </td>
      </tr>
     {/if}

     {if $softCreditTypes and $softCredits}
      {foreach from=$softCreditTypes item=softCreditType key=n}
       <tr>
        <th {$headerStyle}>
         {$softCreditType}
        </th>
       </tr>
       {foreach from=$softCredits.$n item=value key=label}
         <tr>
          <td {$labelStyle}>
           {$label}
          </td>
          <td {$valueStyle}>
           {$value}
          </td>
         </tr>
        {/foreach}
       {/foreach}
     {/if}

     {if $customGroup}
      {foreach from=$customGroup item=value key=customName}
       <tr>
        <th {$headerStyle}>
         {$customName}
        </th>
       </tr>
       {foreach from=$value item=v key=n}
        <tr>
         <td {$labelStyle}>
          {$n}
         </td>
         <td {$valueStyle}>
          {$v}
         </td>
        </tr>
       {/foreach}
      {/foreach}
     {/if}

     {if $formValues.product_name}
      <tr>
       <th {$headerStyle}>
        {ts}Premium Information{/ts}
       </th>
      </tr>
      <tr>
       <td colspan="2" {$labelStyle}>
        {$formValues.product_name}
       </td>
      </tr>
      {if $formValues.product_option}
       <tr>
        <td {$labelStyle}>
         {ts}Option{/ts}
        </td>
        <td {$valueStyle}>
         {$formValues.product_option}
        </td>
       </tr>
      {/if}
      {if $formValues.product_sku}
       <tr>
        <td {$labelStyle}>
         {ts}SKU{/ts}
        </td>
        <td {$valueStyle}>
         {$formValues.product_sku}
        </td>
       </tr>
      {/if}
      {if $fulfilled_date}
       <tr>
        <td {$labelStyle}>
         {ts}Sent{/ts}
        </td>
        <td {$valueStyle}>
         {$fulfilled_date|truncate:10:''|crmDate}
        </td>
       </tr>
      {/if}
     {/if}

    </table>
   </td>
  </tr>

 </table>
</center>

</body>
</html>
  • 1
    Looks like you pasted from the Contributions - Receipt (off-line) template. But your screenshot is referencing Memberships so perhaps you are looking at the wrong template which is why what you pasted has "Contribution Information" in it but your screenshot has "Membership Information" – petednz - fuzion Jan 18 '17 at 18:48
1

If you go to civicrm/admin/messageTemplates?reset=1 you should see two tabs, one of which should say 'System Workflow Messages'. If you click on that you should find a list such as "Contributions - Receipt (off-line)"

If you Edit those you should then be able to insert tokens such as {$contributionID} in to the 'header' section. Such as we use the following so we can either say

Invoice: 23456

or

Receipt: 23456

depending on whether the payment was completed or not

{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} No:{$contributionID}

and that goes after we have put in the client logo and address etc in between the BEGIN and END HEADER

If that is not working for you then you might need to tell us your civi version and consider upgrading to latest version (as i recall some earlier versions had issues similar to this).

  • I find the item you mentioned, but it doesn't show up in the same formatting as displayed in the email. None of the static wording is the same. I'll post the updated information above and currently I am using version 4.7.15 – Matthew Jan 18 '17 at 7:42
  • I edited above to include an example string using the token. hth – petednz - fuzion Jan 18 '17 at 18:05

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.