Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18508

State/Province not shown in Event Confirmation Emails

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.16, 4.7.6
    • Fix Version/s: 4.7.11
    • Component/s: CiviEvent
    • Labels:
    • Documentation Required?:
      None
    • Sprint:
      4.7.10 Events, 4.7.14 CiviEvent
    • Funding Source:
      Contributed Code

      Description

      Two CiviEvent confirmation email templates ("Events - Registration Confirmation and Receipt (on-line)" & "Events - Registration Confirmation and Receipt (off-line)") do not list the state/province of the event location. There are simply no Smarty calls to display this data.

      Adding variations of existing Smarty calls {$location.address.1.state_province} doesn't work ... state_province_name and state_province_abbreviation return nothing, with only state_province_id returning the expected id# from the address table. Thus it seems that the join between the tables civicrm_address and civicrm_state_province isn't happening.

      Borrowing from the EventInfoBlock.tpl, we can replace the various calls to the address with " {$location.address.1.display|nl2br}"

      Thus ..

      {{{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.state_province} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
              {/if}
             </td>
            </tr>
           {/if}}}

      Becomes:

      {{     {if $isShowLocation}
            <tr>
             <td colspan="2" {$valueStyle}>
                {$location.address.1.display|nl2br}
                 <br />
             </td>
            </tr>
           {/if}}}
      

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              mason Eliot Mason
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: