Answers.Body: <p>I'd copy the current code and save it in a file. Then Revert to Default the message template and see if this gives you the results you want. Then you can edit the code to anything custom that they want. For me, I find it easier sometimes to start fresh then to try to figure out someone's custom work (especially not knowing what they wanted the custom code to do). Civi may have changed some things in the backend since the custom was written, so it no longer behaves per the clients desired outcome.</p>
  
  <p>Also, reverting the code will show you if this is the template being used. You might be barking up the wrong tree with any edits to that template. You could add some simple html at the bottom to test this part out if you do not want to Revert to Default. Add <code>&lt;p&gt;Can you see me now?&lt;/p&gt;</code></p>
  
  <p>If that does not do the job, answer back with what they need the custom code to accomplish. The Fee structure for the event might also be helpful. You can always put the current code back in later and be right back where you are now.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-11T23:46:51.240Z
Answers.LastActivityDate: 2019-03-11T23:46:51.240Z
Answers.UserDisplayName: Iowa Boy
Body: <p>I have to work an a website with CiviCRM. The client noticed that on the event registration mail, there seems to be happening something strange. In the picture you can see  that there is a price in yellow. I don't know where this price comes from, but it shouldn't be shown, only the €50 total amount should be shown. I have 2 system workflow messages that I think create this mail: Events - Registration Confirmation and Receipt offline and online. Below is the code for the online one. Any help is appreciated</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
   &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
   &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  {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}
  &lt;center&gt;
   &lt;table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;"&gt;
    &lt;!-- BEGIN HEADER --&gt;
    &lt;!-- You can add table row(s) here with logo or other header elements --&gt;
    &lt;!-- END HEADER --&gt;
    &lt;!-- BEGIN CONTENT --&gt;
    &lt;tr&gt;
     &lt;td&gt;
      &lt;p&gt;{contact.email_greeting}&lt;/p&gt;
      {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
       &lt;p&gt;{$event.confirm_email_text|htmlize}&lt;/p&gt;
      {/if}
      {if $isOnWaitlist}
       &lt;p&gt;{ts}You have been added to the WAIT LIST for this event.{/ts}&lt;/p&gt;
       {if $isPrimary}
         &lt;p&gt;{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}&lt;/p&gt;
       {/if}
      {elseif $isRequireApproval}
       &lt;p&gt;{ts}Your registration has been submitted.{/ts}&lt;/p&gt;
       {if $isPrimary}
        &lt;p&gt;{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}&lt;/p&gt;
       {/if}
      {elseif $is_pay_later}
       &lt;p&gt;{$pay_later_receipt}&lt;/p&gt; {* FIXME: this might be text rather than HTML *}
      {else}
       &lt;p&gt;{ts}Please print this confirmation for your records.{/ts}&lt;/p&gt;
      {/if}
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
     &lt;td&gt;
      &lt;table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;"&gt;
       &lt;tr&gt;
        &lt;th {$headerStyle}&gt;
         {ts}Event Information and Location{/ts}
        &lt;/th&gt;
       &lt;/tr&gt;
       &lt;tr&gt;
        &lt;td colspan="2" {$valueStyle}&gt;
         {$event.event_title}&lt;br /&gt;
         {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
        &lt;/td&gt;
       &lt;/tr&gt;
       {if $event.participant_role neq 'Attendee' and $defaultRole}
        &lt;tr&gt;
         &lt;td {$labelStyle}&gt;
          {ts}Participant Role{/ts}
         &lt;/td&gt;
         &lt;td {$valueStyle}&gt;
          {$event.participant_role}
         &lt;/td&gt;
        &lt;/tr&gt;
       {/if}
       {if $isShowLocation}
        &lt;tr&gt;
         &lt;td colspan="2" {$valueStyle}&gt;
          {if $location.address.1.name}
           {$location.address.1.name}&lt;br /&gt;
          {/if}
          {if $location.address.1.street_address}
           {$location.address.1.street_address}&lt;br /&gt;
          {/if}
          {if $location.address.1.supplemental_address_1}
           {$location.address.1.supplemental_address_1}&lt;br /&gt;
          {/if}
          {if $location.address.1.supplemental_address_2}
           {$location.address.1.supplemental_address_2}&lt;br /&gt;
          {/if}
          {if $location.address.1.city}
           {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}&lt;br /&gt;
          {/if}
         &lt;/td&gt;
        &lt;/tr&gt;
       {/if}
       {if $location.phone.1.phone || $location.email.1.email}
        &lt;tr&gt;
         &lt;td colspan="2" {$labelStyle}&gt;
          {ts}Event Contacts:{/ts}
         &lt;/td&gt;
        &lt;/tr&gt;
        {foreach from=$location.phone item=phone}
         {if $phone.phone}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {if $phone.phone_type}
             {$phone.phone_type_display}
            {else}
             {ts}Phone{/ts}
            {/if}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$phone.phone} {if $phone.phone_ext}&amp;nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
        {/foreach}
        {foreach from=$location.email item=eventEmail}
         {if $eventEmail.email}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Email{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$eventEmail.email}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
        {/foreach}
       {/if}
       {if $event.is_public}
        &lt;tr&gt;
         &lt;td colspan="2" {$valueStyle}&gt;
          {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&amp;id=`$event.id`" h=0 a=1 fe=1}{/capture}
          &lt;a href="{$icalFeed}"&gt;{ts}Download iCalendar File{/ts}&lt;/a&gt;
         &lt;/td&gt;
        &lt;/tr&gt;
       {/if}
       {if $email}
        &lt;tr&gt;
         &lt;th {$headerStyle}&gt;
          {ts}Registered Email{/ts}
         &lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
         &lt;td colspan="2" {$valueStyle}&gt;
          {$email}
         &lt;/td&gt;
        &lt;/tr&gt;
       {/if}
       {if $event.is_monetary}
        &lt;tr&gt;
         &lt;th {$headerStyle}&gt;
          {$event.fee_label}
         &lt;/th&gt;
        &lt;/tr&gt;
        {if $lineItem}
         {foreach from=$lineItem item=value key=priceset}
          {if $value neq 'skip'}
           {if $isPrimary}
            {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
             &lt;tr&gt;
              &lt;td colspan="2" {$labelStyle}&gt;
               {ts 1=$priceset+1}Participant %1{/ts}
              &lt;/td&gt;
             &lt;/tr&gt;
            {/if}
           {/if}
           &lt;tr&gt;
            &lt;td colspan="2" {$valueStyle}&gt;
             &lt;table&gt; {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
              &lt;tr&gt;
               &lt;th&gt;{ts}Item{/ts}&lt;/th&gt;
               &lt;th&gt;{ts}Qty{/ts}&lt;/th&gt;
               &lt;th&gt;{ts}Each{/ts}&lt;/th&gt;
               {if $dataArray}
                &lt;th&gt;{ts}SubTotal{/ts}&lt;/th&gt;
                &lt;th&gt;{ts}Tax Rate{/ts}&lt;/th&gt;
                &lt;th&gt;{ts}Tax Amount{/ts}&lt;/th&gt;
               {/if}
               &lt;th&gt;{ts}Total{/ts}&lt;/th&gt;
         {if $pricesetFieldsCount }&lt;th&gt;{ts}Total Participants{/ts}&lt;/th&gt;{/if}
              &lt;/tr&gt;
              {foreach from=$value item=line}
               &lt;tr&gt;
                &lt;td&gt;
          {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}&lt;div&gt;{$line.description|truncate:30:"..."}&lt;/div&gt;{/if}
                &lt;/td&gt;
                &lt;td&gt;
                 {$line.qty}
                &lt;/td&gt;
                &lt;td&gt;
                 {$line.unit_price|crmMoney}
                &lt;/td&gt;
                {if $dataArray}
                 &lt;td&gt;
                  {$line.unit_price*$line.qty|crmMoney}
                 &lt;/td&gt;
                 {if $line.tax_rate != "" || $line.tax_amount != ""}
                  &lt;td&gt;
                   {$line.tax_rate|string_format:"%.2f"}%
                  &lt;/td&gt;
                  &lt;td&gt;
                   {$line.tax_amount|crmMoney}
                  &lt;/td&gt;
                 {else}
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;/td&gt;
                 {/if}
                {/if}
                &lt;td&gt;
                 {$line.line_total+$line.tax_amount|crmMoney}
                &lt;/td&gt;
          {if  $pricesetFieldsCount }
          &lt;td&gt;
      {$line.participant_count}
                &lt;/td&gt;
          {/if}
               &lt;/tr&gt;
              {/foreach}
             &lt;/table&gt;
            &lt;/td&gt;
           &lt;/tr&gt;
          {/if}
         {/foreach}
         {if $dataArray}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Amount Before Tax:{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$totalAmount-$totalTaxAmount|crmMoney}
           &lt;/td&gt;
          &lt;/tr&gt;
          {foreach from=$dataArray item=value key=priceset}
            &lt;tr&gt;
             {if $priceset || $priceset == 0}
              &lt;td&gt;&amp;nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;{$value|crmMoney:$currency}&lt;/td&gt;
             {else}
              &lt;td&gt;&amp;nbsp;{ts}No{/ts} {$taxTerm}&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;{$value|crmMoney:$currency}&lt;/td&gt;
             {/if}
            &lt;/tr&gt;
          {/foreach}
         {/if}
        {/if}
        {if $amount &amp;&amp; !$lineItem}
         {foreach from=$amount item=amnt key=level}
          &lt;tr&gt;
           &lt;td colspan="2" {$valueStyle}&gt;
            {$amnt.amount|crmMoney} {$amnt.label}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/foreach}
        {/if}
        {if $totalTaxAmount}
         &lt;tr&gt;
          &lt;td {$labelStyle}&gt;
           {ts}Total Tax Amount{/ts}
          &lt;/td&gt;
          &lt;td {$valueStyle}&gt;
           {$totalTaxAmount|crmMoney:$currency}
          &lt;/td&gt;
         &lt;/tr&gt;
        {/if}
        {if $isPrimary}
         &lt;tr&gt;
          &lt;td {$labelStyle}&gt;
          {if $balanceAmount}
             {ts}Total Paid{/ts}
          {else}
             {ts}Total Amount{/ts}
           {/if}
          &lt;/td&gt;
          &lt;td {$valueStyle}&gt;
           {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
          &lt;/td&gt;
         &lt;/tr&gt;
        {if $balanceAmount}
         &lt;tr&gt;
          &lt;td {$labelStyle}&gt;
           {ts}Balance{/ts}
          &lt;/td&gt;
          &lt;td {$valueStyle}&gt;
           {$balanceAmount|crmMoney}
          &lt;/td&gt;
         &lt;/tr&gt;
        {/if}
         {if $pricesetFieldsCount }
       &lt;tr&gt;
         &lt;td {$labelStyle}&gt;
     {ts}Total Participants{/ts}&lt;/td&gt;
         &lt;td {$valueStyle}&gt;
     {assign var="count" value= 0}
           {foreach from=$lineItem item=pcount}
           {assign var="lineItemCount" value=0}
           {if $pcount neq 'skip'}
             {foreach from=$pcount item=p_count}
             {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
             {/foreach}
             {if $lineItemCount &lt; 1 }
             assign var="lineItemCount" value=1}
             {/if}
             {assign var="count" value=$count+$lineItemCount}
           {/if}
           {/foreach}
     {$count}
         &lt;/td&gt;
       &lt;/tr&gt;
       {/if}
         {if $is_pay_later}
          &lt;tr&gt;
           &lt;td colspan="2" {$labelStyle}&gt;
            {$pay_later_receipt}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $register_date}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Registration Date{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$register_date|crmDate}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $receive_date}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Transaction Date{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$receive_date|crmDate}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $financialTypeName}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Financial Type{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$financialTypeName}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $trxn_id}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Transaction #{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$trxn_id}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $paidBy}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Paid By{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
           {$paidBy}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $checkNumber}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {ts}Check Number{/ts}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$checkNumber}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
          &lt;tr&gt;
           &lt;th {$headerStyle}&gt;
            {ts}Billing Name and Address{/ts}
           &lt;/th&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
           &lt;td colspan="2" {$valueStyle}&gt;
            {$billingName}&lt;br /&gt;
            {$address|nl2br}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
         {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
          &lt;tr&gt;
           &lt;th {$headerStyle}&gt;
            {ts}Credit Card Information{/ts}
           &lt;/th&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
           &lt;td colspan="2" {$valueStyle}&gt;
            {$credit_card_type}&lt;br /&gt;
            {$credit_card_number}&lt;br /&gt;
            {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
        {/if}
       {/if} {* End of conditional section for Paid events *}
       {if $customPre}
        &lt;tr&gt;
         &lt;th {$headerStyle}&gt;
          {$customPre_grouptitle}
         &lt;/th&gt;
        &lt;/tr&gt;
        {foreach from=$customPre item=value key=customName}
         {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {$customName}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$value}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
        {/foreach}
       {/if}
       {if $customPost}
        &lt;tr&gt;
         &lt;th {$headerStyle}&gt;
          {$customPost_grouptitle}
         &lt;/th&gt;
        &lt;/tr&gt;
        {foreach from=$customPost item=value key=customName}
         {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {$customName}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$value}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/if}
        {/foreach}
       {/if}
       {if $customProfile}
        {foreach from=$customProfile item=value key=customName}
         &lt;tr&gt;
          &lt;th {$headerStyle}&gt;
           {ts 1=$customName+1}Participant Information - Participant %1{/ts}
          &lt;/th&gt;
         &lt;/tr&gt;
         {foreach from=$value item=val key=field}
          {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
           &lt;tr&gt;
            &lt;td colspan="2" {$labelStyle}&gt;
             {if $field eq 'additionalCustomPre'}
              {$additionalCustomPre_grouptitle}
             {else}
              {$additionalCustomPost_grouptitle}
             {/if}
            &lt;/td&gt;
           &lt;/tr&gt;
           {foreach from=$val item=v key=f}
            &lt;tr&gt;
             &lt;td {$labelStyle}&gt;
              {$f}
             &lt;/td&gt;
             &lt;td {$valueStyle}&gt;
              {$v}
             &lt;/td&gt;
            &lt;/tr&gt;
           {/foreach}
          {/if}
         {/foreach}
        {/foreach}
       {/if}
       {if $customGroup}
        {foreach from=$customGroup item=value key=customName}
         &lt;tr&gt;
          &lt;th {$headerStyle}&gt;
           {$customName}
          &lt;/th&gt;
         &lt;/tr&gt;
         {foreach from=$value item=v key=n}
          &lt;tr&gt;
           &lt;td {$labelStyle}&gt;
            {$n}
           &lt;/td&gt;
           &lt;td {$valueStyle}&gt;
            {$v}
           &lt;/td&gt;
          &lt;/tr&gt;
         {/foreach}
        {/foreach}
       {/if}
      &lt;/table&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/table&gt;
  &lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://i.sstatic.net/17nBX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/17nBX.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-08T16:20:43.530Z
Comments.Text: It also shows "Array" at the bottom of the receipt, suggesting an empty variable. Is this a customized template that maybe didn't get fully upgraded when an upgrade was done, or something like that?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-10T16:43:34.963Z
Comments.Text: The template code that you pasted is not the code that generated this receipt. In this code there is no {ts}Event Fee(s){/ts} or {ts}Array{/ts} like your receipt has for section headers.  It might be helpful to know which version of Civi and what CMS you are working with.
Comments.UserDisplayName: Iowa Boy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-11T08:32:48.537Z
Comments.Text: Hi, I believe this piece of code makes the header:  {if $event.is_monetary}
        <tr>
         <th {$headerStyle}>
          {$event.fee_label}
         </th>
        </tr>
Comments.UserDisplayName: Julie Velghe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-11T08:35:35.247Z
Comments.Text: I'm working on Wordpress 5.0.3 with Civicrm plugin 5.9.1. I believe it is a customized template because I can see the button 'Revert to default'. I don't have more information because it is a project that was transferred to us without any transfer of knowledge on the whole CiviCRM setup.
Comments.UserDisplayName: Julie Velghe
Tags: <civievent>
Title: Event fees not showing correctly
ThreadText: # Event fees not showing correctly
  
  (Asked by: username_0 on 2019-03-08)
  
  I have to work an a website with CiviCRM. The client noticed that on the event registration mail, there seems to be happening something strange. In the picture you can see that there is a price in yellow. I don't know where this price comes from, but it shouldn't be shown, only the €50 total amount should be shown. I have 2 system workflow messages that I think create this mail: Events - Registration Confirmation and Receipt offline and online. Below is the code for the online one. Any help is appreciated
  
  ```
  <!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="500" 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>
      <p>{contact.email_greeting}</p>
      {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
       <p>{$event.confirm_email_text|htmlize}</p>
      {/if}
      {if $isOnWaitlist}
       <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
       {if $isPrimary}
         <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
       {/if}
      {elseif $isRequireApproval}
       <p>{ts}Your registration has been submitted.{/ts}</p>
       {if $isPrimary}
        <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
       {/if}
      {elseif $is_pay_later}
       <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
      {else}
       <p>{ts}Please print this confirmation for your records.{/ts}</p>
      {/if}
     </td>
    </tr>
    <tr>
     <td>
      <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
       <tr>
        <th {$headerStyle}>
         {ts}Event Information and Location{/ts}
        </th>
       </tr>
       <tr>
        <td colspan="2" {$valueStyle}>
         {$event.event_title}<br />
         {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
        </td>
       </tr>
       {if $event.participant_role neq 'Attendee' and $defaultRole}
        <tr>
         <td {$labelStyle}>
          {ts}Participant Role{/ts}
         </td>
         <td {$valueStyle}>
          {$event.participant_role}
         </td>
        </tr>
       {/if}
       {if $isShowLocation}
        <tr>
         <td colspan="2" {$valueStyle}>
          {if $location.address.1.name}
           {$location.address.1.name}<br />
          {/if}
          {if $location.address.1.street_address}
           {$location.address.1.street_address}<br />
          {/if}
          {if $location.address.1.supplemental_address_1}
           {$location.address.1.supplemental_address_1}<br />
          {/if}
          {if $location.address.1.supplemental_address_2}
           {$location.address.1.supplemental_address_2}<br />
          {/if}
          {if $location.address.1.city}
           {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
          {/if}
         </td>
        </tr>
       {/if}
       {if $location.phone.1.phone || $location.email.1.email}
        <tr>
         <td colspan="2" {$labelStyle}>
          {ts}Event Contacts:{/ts}
         </td>
        </tr>
        {foreach from=$location.phone item=phone}
         {if $phone.phone}
          <tr>
           <td {$labelStyle}>
            {if $phone.phone_type}
             {$phone.phone_type_display}
            {else}
             {ts}Phone{/ts}
            {/if}
           </td>
           <td {$valueStyle}>
            {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
           </td>
          </tr>
         {/if}
        {/foreach}
        {foreach from=$location.email item=eventEmail}
         {if $eventEmail.email}
          <tr>
           <td {$labelStyle}>
            {ts}Email{/ts}
           </td>
           <td {$valueStyle}>
            {$eventEmail.email}
           </td>
          </tr>
         {/if}
        {/foreach}
       {/if}
       {if $event.is_public}
        <tr>
         <td colspan="2" {$valueStyle}>
          {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
          <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
         </td>
        </tr>
       {/if}
       {if $email}
        <tr>
         <th {$headerStyle}>
          {ts}Registered Email{/ts}
         </th>
        </tr>
        <tr>
         <td colspan="2" {$valueStyle}>
          {$email}
         </td>
        </tr>
       {/if}
       {if $event.is_monetary}
        <tr>
         <th {$headerStyle}>
          {$event.fee_label}
         </th>
        </tr>
        {if $lineItem}
         {foreach from=$lineItem item=value key=priceset}
          {if $value neq 'skip'}
           {if $isPrimary}
            {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
             <tr>
              <td colspan="2" {$labelStyle}>
               {ts 1=$priceset+1}Participant %1{/ts}
              </td>
             </tr>
            {/if}
           {/if}
           <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 $dataArray}
                <th>{ts}SubTotal{/ts}</th>
                <th>{ts}Tax Rate{/ts}</th>
                <th>{ts}Tax Amount{/ts}</th>
               {/if}
               <th>{ts}Total{/ts}</th>
         {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
              </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}
                </td>
                {if $dataArray}
                 <td>
                  {$line.unit_price*$line.qty|crmMoney}
                 </td>
                 {if $line.tax_rate != "" || $line.tax_amount != ""}
                  <td>
                   {$line.tax_rate|string_format:"%.2f"}%
                  </td>
                  <td>
                   {$line.tax_amount|crmMoney}
                  </td>
                 {else}
                  <td></td>
                  <td></td>
                 {/if}
                {/if}
                <td>
                 {$line.line_total+$line.tax_amount|crmMoney}
                </td>
          {if  $pricesetFieldsCount }
          <td>
      {$line.participant_count}
                </td>
          {/if}
               </tr>
              {/foreach}
             </table>
            </td>
           </tr>
          {/if}
         {/foreach}
         {if $dataArray}
          <tr>
           <td {$labelStyle}>
            {ts}Amount Before Tax:{/ts}
           </td>
           <td {$valueStyle}>
            {$totalAmount-$totalTaxAmount|crmMoney}
           </td>
          </tr>
          {foreach from=$dataArray item=value key=priceset}
            <tr>
             {if $priceset || $priceset == 0}
              <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}
        {if $amount && !$lineItem}
         {foreach from=$amount item=amnt key=level}
          <tr>
           <td colspan="2" {$valueStyle}>
            {$amnt.amount|crmMoney} {$amnt.label}
           </td>
          </tr>
         {/foreach}
        {/if}
        {if $totalTaxAmount}
         <tr>
          <td {$labelStyle}>
           {ts}Total Tax Amount{/ts}
          </td>
          <td {$valueStyle}>
           {$totalTaxAmount|crmMoney:$currency}
          </td>
         </tr>
        {/if}
        {if $isPrimary}
         <tr>
          <td {$labelStyle}>
          {if $balanceAmount}
             {ts}Total Paid{/ts}
          {else}
             {ts}Total Amount{/ts}
           {/if}
          </td>
          <td {$valueStyle}>
           {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
          </td>
         </tr>
        {if $balanceAmount}
         <tr>
          <td {$labelStyle}>
           {ts}Balance{/ts}
          </td>
          <td {$valueStyle}>
           {$balanceAmount|crmMoney}
          </td>
         </tr>
        {/if}
         {if $pricesetFieldsCount }
       <tr>
         <td {$labelStyle}>
     {ts}Total Participants{/ts}</td>
         <td {$valueStyle}>
     {assign var="count" value= 0}
           {foreach from=$lineItem item=pcount}
           {assign var="lineItemCount" value=0}
           {if $pcount neq 'skip'}
             {foreach from=$pcount item=p_count}
             {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
             {/foreach}
             {if $lineItemCount < 1 }
             assign var="lineItemCount" value=1}
             {/if}
             {assign var="count" value=$count+$lineItemCount}
           {/if}
           {/foreach}
     {$count}
         </td>
       </tr>
       {/if}
         {if $is_pay_later}
          <tr>
           <td colspan="2" {$labelStyle}>
            {$pay_later_receipt}
           </td>
          </tr>
         {/if}
         {if $register_date}
          <tr>
           <td {$labelStyle}>
            {ts}Registration Date{/ts}
           </td>
           <td {$valueStyle}>
            {$register_date|crmDate}
           </td>
          </tr>
         {/if}
         {if $receive_date}
          <tr>
           <td {$labelStyle}>
            {ts}Transaction Date{/ts}
           </td>
           <td {$valueStyle}>
            {$receive_date|crmDate}
           </td>
          </tr>
         {/if}
         {if $financialTypeName}
          <tr>
           <td {$labelStyle}>
            {ts}Financial Type{/ts}
           </td>
           <td {$valueStyle}>
            {$financialTypeName}
           </td>
          </tr>
         {/if}
         {if $trxn_id}
          <tr>
           <td {$labelStyle}>
            {ts}Transaction #{/ts}
           </td>
           <td {$valueStyle}>
            {$trxn_id}
           </td>
          </tr>
         {/if}
         {if $paidBy}
          <tr>
           <td {$labelStyle}>
            {ts}Paid By{/ts}
           </td>
           <td {$valueStyle}>
           {$paidBy}
           </td>
          </tr>
         {/if}
         {if $checkNumber}
          <tr>
           <td {$labelStyle}>
            {ts}Check Number{/ts}
           </td>
           <td {$valueStyle}>
            {$checkNumber}
           </td>
          </tr>
         {/if}
         {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
          <tr>
           <th {$headerStyle}>
            {ts}Billing Name and Address{/ts}
           </th>
          </tr>
          <tr>
           <td colspan="2" {$valueStyle}>
            {$billingName}<br />
            {$address|nl2br}
           </td>
          </tr>
         {/if}
         {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
          <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}
       {/if} {* End of conditional section for Paid events *}
       {if $customPre}
        <tr>
         <th {$headerStyle}>
          {$customPre_grouptitle}
         </th>
        </tr>
        {foreach from=$customPre item=value key=customName}
         {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
          <tr>
           <td {$labelStyle}>
            {$customName}
           </td>
           <td {$valueStyle}>
            {$value}
           </td>
          </tr>
         {/if}
        {/foreach}
       {/if}
       {if $customPost}
        <tr>
         <th {$headerStyle}>
          {$customPost_grouptitle}
         </th>
        </tr>
        {foreach from=$customPost item=value key=customName}
         {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
          <tr>
           <td {$labelStyle}>
            {$customName}
           </td>
           <td {$valueStyle}>
            {$value}
           </td>
          </tr>
         {/if}
        {/foreach}
       {/if}
       {if $customProfile}
        {foreach from=$customProfile item=value key=customName}
         <tr>
          <th {$headerStyle}>
           {ts 1=$customName+1}Participant Information - Participant %1{/ts}
          </th>
         </tr>
         {foreach from=$value item=val key=field}
          {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
           <tr>
            <td colspan="2" {$labelStyle}>
             {if $field eq 'additionalCustomPre'}
              {$additionalCustomPre_grouptitle}
             {else}
              {$additionalCustomPost_grouptitle}
             {/if}
            </td>
           </tr>
           {foreach from=$val item=v key=f}
            <tr>
             <td {$labelStyle}>
              {$f}
             </td>
             <td {$valueStyle}>
              {$v}
             </td>
            </tr>
           {/foreach}
          {/if}
         {/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}
      </table>
     </td>
    </tr>
   </table>
  </center>
  </body>
  </html>
  
  ```
  
  [![enter image description here](https://i.sstatic.net/17nBX.png)](https://i.sstatic.net/17nBX.png)
  
  **Tags:** civievent
  
  > **Comments:**
  > **username_1**: It also shows "Array" at the bottom of the receipt, suggesting an empty variable. Is this a customized template that maybe didn't get fully upgraded when an upgrade was done, or something like that?  
  > **username_2**: The template code that you pasted is not the code that generated this receipt. In this code there is no {ts}Event Fee(s){/ts} or {ts}Array{/ts} like your receipt has for section headers.  It might be helpful to know which version of Civi and what CMS you are working with.  
  > **username_0**: Hi, I believe this piece of code makes the header:  {if $event.is_monetary}       <tr>        <th {$headerStyle}>         {$event.fee_label}        </th>       </tr>  
  > **username_0**: I'm working on Wordpress 5.0.3 with Civicrm plugin 5.9.1. I believe it is a customized template because I can see the button 'Revert to default'. I don't have more information because it is a project that was transferred to us without any transfer of knowledge on the whole CiviCRM setup.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-03-11. Score: 3
  
  I'd copy the current code and save it in a file. Then Revert to Default the message template and see if this gives you the results you want. Then you can edit the code to anything custom that they want. For me, I find it easier sometimes to start fresh then to try to figure out someone's custom work (especially not knowing what they wanted the custom code to do). Civi may have changed some things in the backend since the custom was written, so it no longer behaves per the clients desired outcome.
  
  Also, reverting the code will show you if this is the template being used. You might be barking up the wrong tree with any edits to that template. You could add some simple html at the bottom to test this part out if you do not want to Revert to Default. Add `<p>Can you see me now?</p>`
  
  If that does not do the job, answer back with what they need the custom code to accomplish. The Fee structure for the event might also be helpful. You can always put the current code back in later and be right back where you are now.
  
  
  ---
  
  