[php8-compat] Update smarty templates and some php files to get the api_v3_contributi...
authorSeamus Lee <seamuslee001@gmail.com>
Sat, 5 Jun 2021 03:22:24 +0000 (03:22 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 5 Jun 2021 23:18:05 +0000 (23:18 +0000)
23 files changed:
CRM/Contribute/BAO/ContributionPage.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Core/Payment/AuthorizeNet.php
CRM/Event/BAO/Event.php
tests/templates/message_templates/contribution_online_receipt_html.tpl
tests/templates/message_templates/event_online_receipt_text.tpl
xml/templates/message_templates/contribution_invoice_receipt_html.tpl
xml/templates/message_templates/contribution_offline_receipt_html.tpl
xml/templates/message_templates/contribution_offline_receipt_text.tpl
xml/templates/message_templates/contribution_online_receipt_html.tpl
xml/templates/message_templates/contribution_online_receipt_text.tpl
xml/templates/message_templates/event_offline_receipt_html.tpl
xml/templates/message_templates/event_offline_receipt_text.tpl
xml/templates/message_templates/event_online_receipt_html.tpl
xml/templates/message_templates/event_online_receipt_subject.tpl
xml/templates/message_templates/event_online_receipt_text.tpl
xml/templates/message_templates/event_registration_receipt_html.tpl
xml/templates/message_templates/event_registration_receipt_text.tpl
xml/templates/message_templates/membership_offline_receipt_html.tpl
xml/templates/message_templates/membership_offline_receipt_text.tpl
xml/templates/message_templates/membership_online_receipt_html.tpl
xml/templates/message_templates/membership_online_receipt_text.tpl
xml/templates/message_templates/payment_or_refund_notification_html.tpl

index d5bfdb00a49a98954020eddf74f26e0992fc710c..806e8aa6834d74e0bb696eb134968ed91464a3e2 100644 (file)
@@ -365,6 +365,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio
         'pay_later_receipt' => $values['pay_later_receipt'] ?? NULL,
         'honor_block_is_active' => $values['honor_block_is_active'] ?? NULL,
         'contributionStatus' => $values['contribution_status'] ?? NULL,
+        'currency' => CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $values['contribution_id'], 'currency') ?? CRM_Core_Config::singleton()->defaultCurrency,
       ];
 
       if (!empty($values['financial_type_id'])) {
index 7af892ce3d6cf53528f6e0bef55c4e446322af47..81a133d6963fa85813bb050eaa69a136ab5e10b3 100644 (file)
@@ -1568,7 +1568,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
    */
   protected function postProcessMembership(
     $membershipParams, $contactID, &$form, $premiumParams,
-    $customFieldsFormatted = NULL, $includeFieldTypes = NULL, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
+    $customFieldsFormatted, $includeFieldTypes, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
     $isProcessSeparateMembershipTransaction, $financialTypeID, $unprocessedLineItems) {
 
     $membershipContribution = NULL;
index 664ce502c1ea86d8273a4264285b5f6e000df568..e28bdbf900a5f4487e50a316495b431a11e8719a 100644 (file)
@@ -545,7 +545,7 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
    * @return bool|object
    * @throws \Civi\Payment\Exception\PaymentProcessorException
    */
-  public function cancelSubscription(&$message = '', $params) {
+  public function cancelSubscription(&$message = '', $params = []) {
     $template = CRM_Core_Smarty::singleton();
 
     $template->assign('subscriptionType', 'cancel');
index 267a00644f37c1715e74a9f0c0ca8d0560993779..8f347dce0a3920071bac23c07964133017b16d8b 100644 (file)
@@ -1160,6 +1160,7 @@ WHERE civicrm_event.is_active = 1
           'credit_card_exp_date' => CRM_Utils_Date::mysqlToIso(CRM_Utils_Date::format(CRM_Utils_Array::value('credit_card_exp_date', $participantParams))),
           'selfcancelxfer_time' => abs($values['event']['selfcancelxfer_time']),
           'selfservice_preposition' => $values['event']['selfcancelxfer_time'] < 0 ? 'after' : 'before',
+          'currency' => $values['event']['currency'] ?? CRM_Core_Config::singleton()->defaultCurrency,
         ]);
 
         // CRM-13890 : NOTE wait list condition need to be given so that
index 753af958bf40185ee24ccdd36e194bb7f1487130..c9cdcdb8201a05be0853129905c068577212b0fe 100644 (file)
@@ -5,7 +5,9 @@
 <body>
   receive_date:::{$receive_date}
   receipt_date:::{$receipt_date}
+  {if !empty($receipt_text)}
   receipt_text:::{$receipt_text}
+  {/if}
   is_pay_later:::{$is_pay_later}
   displayName:::{$displayName}
   financialTypeId:::{$financialTypeId}
   contactID:::{$contactID}
   contributionID:::{$contributionID}
   amount:::{$amount}
+  {if isset($amount_level)}
   amount_level:::{$amount_level}
+  {/if}
+  {if isset($pay_later_receipt)}
   pay_later_receipt:::{$pay_later_receipt}
+  {/if}
+  {if isset($headerstyle)}
   headerStyle:::{$headerStyle}
+  {/if}
+  {if isset($valueStyle)}
   valueStyle:::{$valueStyle}
+  {/if}
+  {if isset($labelStyle)}
   labelStyle:::{$labelStyle}
+  {/if}
   priceSetID:::{$priceSetID}
   currency:::{$currency}
+  {if !empty($is_quick_config)}
   is_quick_config:::{$is_quick_config}
+  {/if}
+  {if !empty($getTaxDetails)}
   getTaxDetails:::{$getTaxDetails}
   totalTaxAmount:::{$totalTaxAmount}
+  {/if}
+  {if isset($is_monetary)}
   is_monetary:::{$is_monetary}
+  {/if}
+  {if isset($isShare)}
   isShare:::{$isShare}
+  {/if}
   honor_block_is_active:::{$honor_block_is_active}
+  {if $honor_block_is_active}
   soft_credit_type:::{$soft_credit_type}
+  {/if}
+  {if isset($is_recur)}
   is_recur:::{$is_recur}
+  {/if}
+  {if isset($contributeMode)}
   contributeMode:::{$contributeMode}
+  {/if}
+  {if isset($trxn_id)}
   trxn_id:::{$trxn_id}
+  {/if}
+  {if isset($cancelSubscriptionUrl)}
   cancelSubscriptionUrl:::{$cancelSubscriptionUrl}
   updateSubscriptionBillingUrl:::{$updateSubscriptionBillingUrl}
   updateSubscriptionUrl:::{$updateSubscriptionUrl}
+  {/if}
+  {if isset($priceset)}
   priceset:::{$priceset}
+  {/if}
+  {if isset($taxTerm)}
   taxTerm:::{$taxTerm}
+  {/if}
+  {if !empty($pcpBlock)}
   pcpBlock:::{$pcpBlock}
   pcp_display_in_roll:::{$pcp_display_in_roll}
   pcp_roll_nickname:::{$pcp_roll_nickname}
   pcp_personal_note:::{$pcp_personal_note}
+  {/if}
+  {if isset($onBehalfProfile_grouptitle)}
   onBehalfProfile_grouptitle:::{$onBehalfProfile_grouptitle}
+  {/if}
   email:::{$email}
+  {if isset($contributionPageId)}
   contributionPageId:::{$contributionPageId}
   title:::{$title}
+  {/if}
+  {if isset($isBillingAddressRequiredForPayLater)}
   isBillingAddressRequiredForPayLater:::{$isBillingAddressRequiredForPayLater}
+  {/if}
+  {if isset($billingName)}
   billingName:::{$billingName}
   address:::{$address}
+  {/if}
+  {if isset($credit_card_type)}
   credit_card_type:::{$credit_card_type}
   credit_card_number:::{$credit_card_number}
   credit_card_exp_date:::{$credit_card_exp_date}
+  {/if}
+  {if isset($selectPremium)}
   selectPremium:::{$selectPremium}
   product_name:::{$product_name}
   option:::{$option}
   sku:::{$sku}
+  {/if}
+  {if isset($start_date)}
   start_date:::{$start_date}
   end_date:::{$end_date}
+  {/if}
+  {if isset($is_deductible)}
   is_deductible:::{$is_deductible}
+  {/if}
+  {if isset($contact_email)}
   contact_email:::{$contact_email}
+  {/if}
+  {if isset($contact_phone)}
   contact_phone:::{$contact_phone}
+  {/if}
+  {if isset($price)}
   price:::{$price}
+  {/if}
+  {if isset($customPre_grouptitle)}
   customPre_grouptitle:::{$customPre_grouptitle}
+  {/if}
+  {if isset($customPost_grouptitle)}
   customPost_grouptitle:::{$customPost_grouptitle}
+  {/if}
   contributionStatus:::{$contributionStatus}
+ {if isset($lineItem)}
  {foreach from=$lineItem item=value key=priceset}
   {foreach from=$value item=line}
      line.html_type:::{$line.html_type}
      line.description:::{$line.description}
      line.qty:::{$line.qty}
      line.unit_price:::{$line.unit_price}
+     {if isset($line.tax_rate)}
      line.tax_rate:::{$line.tax_rate}
      line.tax_amount:::{$line.tax_amount}
+     {/if}
      line.line_total:::{$line.line_total}
   {/foreach}
  {/foreach}
+ {/if}
+ {if !empty($dataArray)}
  {foreach from=$dataArray item=value key=priceset}
     dataArray: priceset:::$priceset
     dataArray: value:::$value
  {/foreach}
+ {/if}
+ {if !empty($honoreeProfile)}
  {foreach from=$honoreeProfile item=value key=label}
     honoreeProfile: label:::$label
     honoreeProfile: value:::$value
  {/foreach}
+ {/if}
+ {if !empty($softCreditTypes)}
  {foreach from=$softCreditTypes item=softCreditType key=n}
     softCreditType:::$softCreditType
   {foreach from=$softCredits.$n item=value key=label}
      softCredits: value:::$value
   {/foreach}
  {/foreach}
+ {/if}
+ {if !empty($onBehalfProfile)}
  {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
     onBehalfName:::$onBehalfName
     onBehalfValue:::$onBehalfValue
  {/foreach}
+ {/if}
+ {if !empty($customPre)}
  {foreach from=$customPre item=customValue key=customName}
     customPre: customName:::$customName
     customPre: customValue:::$customValue
  {/foreach}
+ {/if}
+ {if !empty($customPost)}
  {foreach from=$customPost item=customValue key=customName}
     customPost: customName:::$customName
     customPost: customValue:::$customValue
  {/foreach}
+ {/if}
+ {if !empty($trackingFields)}
  {foreach from=$trackingFields item=trackingValue key=trackingName}
    trackingName:::$trackingName
    trackingValue:::$trackingValue
  {/foreach}
+ {/if}
 
 </body>
 </html>
index 5b9646a6b9dd9a4abf78398ac966fdcb239720cf..370b9de737a66736a7b585ed1abbe6f532aab78a 100644 (file)
@@ -1,34 +1,66 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
 
 contactID:::{$contactID}
+{if !empty($event.confirm_email_text)}
 event.confirm_email_text:::{$event.confirm_email_text}
+{/if}
+{if isset($isOnWaitlist)}
 isOnWaitlist:::{$isOnWaitlist}
+{/if}
+{if isset($isRequireApproval)}
 isRequireApproval:::{$isRequireApproval}
+{/if}
 participant_status:::{$participant_status}
+{if isset($pricesetFieldsCount)}
 pricesetFieldsCount:::{$pricesetFieldsCount}
+{/if}
 isPrimary:::{$isPrimary}
+{if isset($conference_sessions)}
 conference_sessions:::{$conference_sessions}
+{/if}
+{if isset($is_pay_later)}
 is_pay_later:::{$is_pay_later}
+{/if}
+{if isset($isAmountzero)}
 isAmountzero:::{$isAmountzero}
+{/if}
+{if isset($isAdditionalParticipant)}
 isAdditionalParticipant:::{$isAdditionalParticipant}
+{/if}
+{if isset($pay_later_receipt)}
 pay_later_receipt:::{$pay_later_receipt}
+{/if}
 event.event_title:::{$event.event_title}
 event.event_start_date:::{$event.event_start_date|date_format:"%A"}
 event.event_end_date:::{$event.event_end_date|date_format:"%Y%m%d"}
+{if isset($event.is_monetary)}
 event.is_monetary:::{$event.is_monetary}
+{/if}
+{if !empty($event.fee_label)}
 event.fee_label:::{$event.fee_label}
+{/if}
+{if !empty($conference_sessions)}
 conference_sessions:::{$conference_sessions}
-event.participant_role::{$event.participant_role}
-defaultRole:::{$defaultRole}
+{/if}
+{if !empty($event.participant_role)}
+  event.participant_role::{$event.participant_role}
+  defaultRole:::{$defaultRole}
+{/if}
+{if !empty($isShowLocation)}
 isShowLocation:::{$isShowLocation}
 location.address.1.display:::{$location.address.1.display}
 location.phone.1.phone:::{$location.phone.1.phone}
 location.phone.1.phone_type_display:::{$location.phone.1.phone_type_display}
 location.phone.1.phone_ext:::{$location.phone.1.phone_ext}
 location.email.1.email:::{$location.email.1.email}
+{/if}
+{if !empty($event.is_public)}
 event.is_public:::{$event.is_public}
+{/if}
+{if !empty($payer.name)}
 payer.name:::{$payer.name}
-lineitem:::{if $lineItem}
+{/if}
+lineitem:::{if !empty($lineItem)}
  {foreach from=$lineItem item=value key=priceset}
   {foreach from=$value item=line}
      line.html_type:::{$line.html_type}
@@ -37,37 +69,67 @@ lineitem:::{if $lineItem}
      line.description:::{$line.description}
      line.qty:::{$line.qty}
      line.unit_price:::{$line.unit_price}
+     {if isset($line.tax_rate)}
      line.tax_rate:::{$line.tax_rate}
      line.tax_amount:::{$line.tax_amount}
+     {/if}
      line.line_total:::{$line.line_total}
   {/foreach}
  {/foreach}
 {/if}
 
+{if !empty($part)}
 part:::{foreach from=$part item=value key=key}
 {$key}{$value}
 {/foreach}
+{/if}
 
+{if !empty($dataArray)}
 dataArray:::{$dataArray}
+{/if}
 
+{if isset($totalTaxAmount)}
 totalTaxAmount:::{$totalTaxAmount}
-amounts:::{$amounts}
+{/if}
+{if !empty($amounts)}
+{foreach from=$amounts item=amountValue key=amountKey}
+amounts:::$amountKey $amountValue
+{/foreach}
+{/if}
 register_date:::{$register_date|crmDate}
+{if !empty($receive_date)}
 receive_date:::{$receive_date|crmDate}
+{/if}
+{if !empty($financialTypeName)}
 financialTypeName:::{$financialTypeName}
+{/if}
+{if !empty($trxn_id)}
 trxn_id:::{$trxn_id}
+{/if}
+{if !empty($paidBy)}
 paidBy:::{$paidBy}
+{/if}
+{if isset($checkNumber)}
 checkNumber:::{$checkNumber}
+{/if}
+{if isset($billingName)}
 billingName:::{$billingName}
+{/if}
+{if isset($credit_card_type)}
 credit_card_type:::{$credit_card_type}
 credit_card_number:::{$credit_card_number}
 address:::{$address}
 credit_card_exp_date:::{$credit_card_exp_date}
+{/if}
+{if !empty($customPre)}
 {foreach from=$customPre item=customValue key=customName}
   customPre: customName:::$customName
   customPre: customValue:::$customValue
 {/foreach}
+{/if}
+{if !empty($customPost)}
 {foreach from=$customPost item=customValue key=customName}
   customPost: customName:::$customName
   customPost: customValue:::$customValue
 {/foreach}
+{/if}
index cd5733cc6a52642d239e93ee4f436d9dbfea861d..c9d2f9e25172f0687f2eff052b5edddfd706dafe 100644 (file)
                 <td style="text-align:right;"><font size="1">{ts}Sub Total{/ts}</font></td>
                 <td style="text-align:right;"><font size="1">{$subTotal|crmMoney:$currency}</font></td>
               </tr>
+              {if !empty($dataArray)}
               {foreach from=$dataArray item=value key=priceset}
                 <tr>
                   <td colspan="3"></td>
                     {elseif $priceset == 0}
                       <td style="text-align:right;white-space: nowrap"><font size="1">{ts 1=$taxTerm}TOTAL %1{/ts}</font></td>
                       <td style="text-align:right"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
+                    {/if}
                 </tr>
-              {/if}
               {/foreach}
+              {/if}
               <tr>
                 <td colspan="3"></td>
                 <td style="text-align:right;white-space: nowrap"><b><font size="1">{ts 1=$currency}TOTAL %1{/ts}</font></b></td>
                 <td style="padding-left:28px;text-align:right;"><font size="1">{ts}Sub Total{/ts}</font></td>
                 <td style="padding-left:28px;text-align:right;"><font size="1">{$subTotal|crmMoney:$currency}</font></td>
               </tr>
+              {if !empty($dataArray)}
               {foreach from=$dataArray item=value key=priceset}
                 <tr>
                   <td colspan="3"></td>
                   {elseif $priceset == 0}
                     <td style="padding-left:28px;text-align:right;"><font size="1">{ts 1=$taxTerm}TOTAL NO %1{/ts}</font></td>
                     <td style="padding-left:28px;text-align:right;"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
+                  {/if}
                 </tr>
-                {/if}
               {/foreach}
+              {/if}
               <tr>
                 <td colspan="3"></td>
                 <td colspan="2"><hr></hr></td>
index 4f7b8819f3bcee8a36bfb359cbeb7adf193f3ab2..d8b9ba9bbe34c7468316da8136ff72d2577ab2bc 100644 (file)
@@ -22,7 +22,7 @@
   <tr>
    <td>
     {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
-    {if $formValues.receipt_text}
+    {if !empty($formValues.receipt_text)}
      <p>{$formValues.receipt_text|htmlize}</p>
     {else}
      <p>{ts}Below you will find a receipt for this contribution.{/ts}</p>
@@ -54,7 +54,7 @@
       </td>
      </tr>
 
-     {if $lineItem and !$is_quick_config}
+     {if !empty($lineItem) and empty($is_quick_config)}
       {foreach from=$lineItem item=value key=priceset}
        <tr>
         <td colspan="2" {$valueStyle}>
@@ -63,7 +63,7 @@
            <th>{ts}Item{/ts}</th>
            <th>{ts}Qty{/ts}</th>
            <th>{ts}Each{/ts}</th>
-           {if $getTaxDetails}
+           {if !empty($getTaxDetails)}
              <th>{ts}Subtotal{/ts}</th>
              <th>{ts}Tax Rate{/ts}</th>
              <th>{ts}Tax Amount{/ts}</th>
             <td>
              {$line.unit_price|crmMoney:$currency}
             </td>
-            {if $getTaxDetails}
+            {if !empty($getTaxDetails)}
               <td>
                 {$line.unit_price*$line.qty|crmMoney:$currency}
               </td>
-              {if $line.tax_rate != "" || $line.tax_amount != ""}
+              {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
                 <td>
                   {$line.tax_rate|string_format:"%.2f"}%
                 </td>
        </tr>
       {/foreach}
      {/if}
-     {if $getTaxDetails && $dataArray}
+     {if !empty($getTaxDetails) && !empty($dataArray)}
        <tr>
          <td {$labelStyle}>
            {ts} Amount before Tax : {/ts}
       </td>
      </tr>
 
-     {if $receive_date}
+     {if !empty($receive_date)}
       <tr>
        <td {$labelStyle}>
         {ts}Date Received{/ts}
       </tr>
      {/if}
 
-     {if $formValues.paidBy and !$formValues.hidden_CreditCard}
+     {if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}
       <tr>
        <td {$labelStyle}>
         {ts}Paid By{/ts}
         {$formValues.paidBy}
        </td>
       </tr>
-      {if $formValues.check_number}
+      {if !empty($formValues.check_number)}
        <tr>
         <td {$labelStyle}>
          {ts}Check Number{/ts}
       {/if}
      {/if}
 
-     {if $formValues.trxn_id}
+     {if !empty($formValues.trxn_id)}
       <tr>
        <td {$labelStyle}>
         {ts}Transaction ID{/ts}
       </tr>
      {/if}
 
-     {if $ccContribution}
+     {if !empty($ccContribution)}
       <tr>
        <th {$headerStyle}>
         {ts}Billing Name and Address{/ts}
       </tr>
      {/if}
 
-     {if $softCreditTypes and $softCredits}
+     {if !empty($softCreditTypes) and !empty($softCredits)}
       {foreach from=$softCreditTypes item=softCreditType key=n}
        <tr>
         <th {$headerStyle}>
        {/foreach}
      {/if}
 
-     {if $customGroup}
+     {if !empty($customGroup)}
       {foreach from=$customGroup item=value key=customName}
        <tr>
         <th {$headerStyle}>
       {/foreach}
      {/if}
 
-     {if $formValues.product_name}
+     {if !empty($formValues.product_name)}
       <tr>
        <th {$headerStyle}>
         {ts}Premium Information{/ts}
index 50e0cd4e3708dec1b4946cdd6568e8064c34133b..846d1a4498a3855227c6086cc6ea6990d767d50c 100644 (file)
@@ -1,6 +1,6 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
 
-{if $formValues.receipt_text}
+{if !empty($formValues.receipt_text)}
 {$formValues.receipt_text}
 {else}{ts}Below you will find a receipt for this contribution.{/ts}{/if}
 
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_qty}{ts}Qty{/ts}{/capture}
 {capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $getTaxDetails}
+{if !empty($getTaxDetails)}
 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
 {/if}
 {capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $getTaxDetails} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($getTaxDetails)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
 ----------------------------------------------------------
 {foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $getTaxDetails}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} %   {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if} {/if}   {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($getTaxDetails)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} %   {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if} {/if}   {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
 {/foreach}
 {/foreach}
 {/if}
 
-{if $getTaxDetails && $dataArray}
+{if !empty($getTaxDetails) && !empty($dataArray)}
 {ts}Amount before Tax{/ts} : {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
 
 {foreach from=$dataArray item=value key=priceset}
 {ts}Total Tax Amount{/ts} : {$totalTaxAmount|crmMoney:$currency}
 {/if}
 {ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}
-{if $receive_date}
+{if !empty($receive_date)}
 {ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
 {/if}
 {if $receipt_date}
 {ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
 {/if}
-{if $formValues.paidBy and !$formValues.hidden_CreditCard}
+{if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}
 {ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
+{if !empty($formValues.check_number)}
 {ts}Check Number{/ts}: {$formValues.check_number}
 {/if}
 {/if}
-{if $formValues.trxn_id}
+{if !empty($formValues.trxn_id)}
 {ts}Transaction ID{/ts}: {$formValues.trxn_id}
 {/if}
 
-{if $ccContribution}
+{if !empty($ccContribution)}
 ===========================================================
 {ts}Billing Name and Address{/ts}
 
@@ -78,7 +78,7 @@
 {$credit_card_number}
 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
 {/if}
-{if $customGroup}
+{if !empty($customGroup)}
 {foreach from=$customGroup item=value key=customName}
 ===========================================================
 {$customName}
@@ -89,7 +89,7 @@
 {/foreach}
 {/if}
 
-{if $softCreditTypes and $softCredits}
+{if !empty($softCreditTypes) and !empty($softCredits)}
 {foreach from=$softCreditTypes item=softCreditType key=n}
 ===========================================================
 {$softCreditType}
 {/foreach}
 {/if}
 
-{if $formValues.product_name}
+{if !empty($formValues.product_name)}
 ===========================================================
 {ts}Premium Information{/ts}
 
index fd9c0b8e847ad25ea09d0ce075f69722fcf96f07..280e236f5376653ae9d9eda3cf7d0bf4617362d0 100644 (file)
   <tr>
    <td>
      {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
-    {if $receipt_text}
+    {if !empty($receipt_text)}
      <p>{$receipt_text|htmlize}</p>
     {/if}
 
     {if $is_pay_later}
-     <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+     <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
     {/if}
 
    </td>
@@ -44,7 +44,7 @@
        </th>
       </tr>
 
-      {if $lineItem and $priceSetID and !$is_quick_config}
+      {if !empty($lineItem) and !empty($priceSetID) and empty($is_quick_config)}
 
        {foreach from=$lineItem item=value key=priceset}
         <tr>
@@ -54,7 +54,7 @@
             <th>{ts}Item{/ts}</th>
             <th>{ts}Qty{/ts}</th>
             <th>{ts}Each{/ts}</th>
-            {if $dataArray}
+            {if !empty($dataArray)}
              <th>{ts}Subtotal{/ts}</th>
              <th>{ts}Tax Rate{/ts}</th>
              <th>{ts}Tax Amount{/ts}</th>
              <td>
               {$line.unit_price|crmMoney:$currency}
              </td>
-             {if $getTaxDetails}
+             {if !empty($getTaxDetails)}
               <td>
                {$line.unit_price*$line.qty|crmMoney:$currency}
               </td>
-              {if $line.tax_rate != "" || $line.tax_amount != ""}
+              {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
                <td>
                 {$line.tax_rate|string_format:"%.2f"}%
                </td>
@@ -97,7 +97,7 @@
          </td>
         </tr>
        {/foreach}
-       {if $dataArray}
+       {if !empty($dataArray)}
         <tr>
          <td {$labelStyle}>
           {ts} Amount before Tax : {/ts}
         {/foreach}
 
        {/if}
-       {if $totalTaxAmount}
+       {if isset($totalTaxAmount)}
         <tr>
          <td {$labelStyle}>
           {ts}Total Tax{/ts}
 
       {else}
 
-      {if $totalTaxAmount}
+      {if !empty($totalTaxAmount)}
          <tr>
            <td {$labelStyle}>
              {ts}Total Tax Amount{/ts}
          {ts}Amount{/ts}
         </td>
         <td {$valueStyle}>
-         {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
+         {$amount|crmMoney:$currency} {if isset($amount_level)} - {$amount_level}{/if}
         </td>
        </tr>
 
      {/if}
 
 
-     {if $receive_date}
+     {if !empty($receive_date)}
       <tr>
        <td {$labelStyle}>
         {ts}Date{/ts}
       </tr>
      {/if}
 
-     {if $is_monetary and $trxn_id}
+     {if !empty($is_monetary) and !empty($trxn_id)}
       <tr>
        <td {$labelStyle}>
         {ts}Transaction #{/ts}
       </tr>
      {/if}
 
-    {if $is_recur}
+    {if !empty($is_recur)}
       <tr>
         <td  colspan="2" {$labelStyle}>
           {ts}This is a recurring contribution.{/ts}
          </td>
         </tr>
       {/foreach}
-      {elseif $softCreditTypes and $softCredits}
+      {elseif !empty($softCreditTypes) and !empty($softCredits)}
       {foreach from=$softCreditTypes item=softCreditType key=n}
        <tr>
         <th {$headerStyle}>
        {/foreach}
      {/if}
 
-     {if $pcpBlock}
+     {if !empty($pcpBlock)}
       <tr>
        <th {$headerStyle}>
         {ts}Personal Campaign Page{/ts}
       {/if}
      {/if}
 
-     {if $onBehalfProfile}
+     {if !empty($onBehalfProfile)}
       <tr>
        <th {$headerStyle}>
         {$onBehalfProfile_grouptitle}
       {/foreach}
      {/if}
 
-     {if $isShare}
+     {if !empty($isShare)}
       <tr>
         <td colspan="2" {$valueStyle}>
             {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
       </tr>
      {/if}
 
-     {if $billingName}
+     {if !empty($billingName)}
        <tr>
         <th {$headerStyle}>
          {ts}Billing Name and Address{/ts}
          {$email}
         </td>
        </tr>
-     {elseif $email}
+     {elseif !empty($email)}
        <tr>
         <th {$headerStyle}>
          {ts}Registered Email{/ts}
        </tr>
      {/if}
 
-     {if $credit_card_type}
+     {if !empty($credit_card_type)}
       <tr>
        <th {$headerStyle}>
         {ts}Credit Card Information{/ts}
       </tr>
      {/if}
 
-     {if $selectPremium}
+     {if !empty($selectPremium)}
       <tr>
        <th {$headerStyle}>
         {ts}Premium Information{/ts}
         </td>
        </tr>
       {/if}
-      {if $contact_email OR $contact_phone}
+      {if !empty($contact_email) OR !empty($contact_phone)}
        <tr>
         <td colspan="2" {$valueStyle}>
          <p>{ts}For information about this premium, contact:{/ts}</p>
-         {if $contact_email}
+         {if !empty($contact_email)}
           <p>{$contact_email}</p>
          {/if}
-         {if $contact_phone}
+         {if !empty($contact_phone)}
           <p>{$contact_phone}</p>
          {/if}
         </td>
        </tr>
       {/if}
-      {if $is_deductible AND $price}
+      {if !empty($is_deductible) AND !empty($price)}
         <tr>
          <td colspan="2" {$valueStyle}>
           <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
       {/if}
      {/if}
 
-     {if $customPre}
+     {if !empty($customPre)}
       <tr>
        <th {$headerStyle}>
         {$customPre_grouptitle}
        </th>
       </tr>
       {foreach from=$customPre item=customValue key=customName}
-       {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+       {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
         <tr>
          <td {$labelStyle}>
           {$customName}
       {/foreach}
      {/if}
 
-     {if $customPost}
+     {if !empty($customPost)}
       <tr>
        <th {$headerStyle}>
         {$customPost_grouptitle}
        </th>
       </tr>
       {foreach from=$customPost item=customValue key=customName}
-       {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+       {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
         <tr>
          <td {$labelStyle}>
           {$customName}
index 4c86a366c7bb9b868cc304ba2af53efc1f857c8c..8a0068d5f245a64b96ca757a422d3a9c29f8cf03 100644 (file)
@@ -1,11 +1,11 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $receipt_text}
+{if !empty($receipt_text)}
 {$receipt_text}
 {/if}
 {if $is_pay_later}
 
 ===========================================================
-{$pay_later_receipt}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
 ===========================================================
 {/if}
 
 {ts}Contribution Information{/ts}
 
 ===========================================================
-{if $lineItem and $priceSetID and !$is_quick_config}
+{if $lineItem and $priceSetID and empty($is_quick_config)}
 {foreach from=$lineItem item=value key=priceset}
 ---------------------------------------------------------
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_qty}{ts}Qty{/ts}{/capture}
 {capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
 {/if}
 {capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
 ----------------------------------------------------------
 {foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($dataArray)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
 {/foreach}
 {/foreach}
 
-{if $dataArray}
+{if !empty($dataArray)}
 {ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
 
 {foreach from=$dataArray item=value key=priceset}
 {/foreach}
 {/if}
 
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
 {ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
 {/if}
 
 {ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
 {else}
-{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
+{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if isset($amount_level) } - {$amount_level} {/if}
 {/if}
 {/if}
-{if $receive_date}
+{if !empty($receive_date)}
 
 {ts}Date{/ts}: {$receive_date|crmDate}
 {/if}
-{if $is_monetary and $trxn_id}
+{if !empty($is_monetary) and !empty($trxn_id)}
 {ts}Transaction #{/ts}: {$trxn_id}
 {/if}
 
-{if $is_recur}
+{if !empty($is_recur)}
 {ts}This is a recurring contribution.{/ts}
 
 {if $cancelSubscriptionUrl}
@@ -94,7 +94,7 @@
 {foreach from=$honoreeProfile item=value key=label}
 {$label}: {$value}
 {/foreach}
-{elseif $softCreditTypes and $softCredits}
+{elseif !empty($softCreditTypes) and !empty($softCredits)}
 {foreach from=$softCreditTypes item=softCreditType key=n}
 ===========================================================
 {$softCreditType}
 {/foreach}
 {/foreach}
 {/if}
-{if $pcpBlock}
+{if !empty($pcpBlock)}
 ===========================================================
 {ts}Personal Campaign Page{/ts}
 
 {if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
 
 {/if}
-{if $onBehalfProfile}
+{if !empty($onBehalfProfile)}
 ===========================================================
 {ts}On Behalf Of{/ts}
 
 {/foreach}
 {/if}
 
-{if $billingName}
+{if !empty($billingName)}
 ===========================================================
 {ts}Billing Name and Address{/ts}
 
 {$address}
 
 {$email}
-{elseif $email}
+{elseif !empty($email)}
 ===========================================================
 {ts}Registered Email{/ts}
 
 ===========================================================
 {$email}
 {/if} {* End billingName or Email*}
-{if $credit_card_type}
+{if !empty($credit_card_type)}
 
 ===========================================================
 {ts}Credit Card Information{/ts}
 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
 {/if}
 
-{if $selectPremium }
+{if !empty($selectPremium )}
 ===========================================================
 {ts}Premium Information{/ts}
 
 {if $end_date}
 {ts}End Date{/ts}: {$end_date|crmDate}
 {/if}
-{if $contact_email OR $contact_phone}
+{if !empty($contact_email) OR !empty($contact_phone)}
 
 {ts}For information about this premium, contact:{/ts}
 
-{if $contact_email}
+{if !empty($contact_email)}
   {$contact_email}
 {/if}
-{if $contact_phone}
+{if !empty($contact_phone)}
   {$contact_phone}
 {/if}
 {/if}
-{if $is_deductible AND $price}
+{if !empty($is_deductible) AND !empty($price)}
 
 {ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
 {/if}
 
-{if $customPre}
+{if !empty($customPre)}
 ===========================================================
 {$customPre_grouptitle}
 
 ===========================================================
 {foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
 {/if}
 
 
-{if $customPost}
+{if !empty($customPost)}
 ===========================================================
 {$customPost_grouptitle}
 
 ===========================================================
 {foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
index 876a478e017532cdd51fb905994047aa5689e201..15fec07acc58f33b3f23ece9d95e6b749e176651 100644 (file)
    <td>
     {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
 
-    {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+    {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
      <p>{$event.confirm_email_text|htmlize}</p>
     {/if}
 
-    {if $isOnWaitlist}
+    {if !empty($isOnWaitlist)}
      <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
-     {if $isPrimary}
+     {if !empty($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}
+    {elseif !empty($isRequireApproval)}
      <p>{ts}Your registration has been submitted.{/ts}</p>
-     {if $isPrimary}
+     {if !empty($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 *}
+    {elseif !empty($is_pay_later)}
+     <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
     {/if}
 
    </td>
@@ -58,7 +58,7 @@
       </td>
      </tr>
 
-     {if $event.participant_role neq 'Attendee' and $defaultRole}
+     {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
       <tr>
        <td {$labelStyle}>
         {ts}Participant Role{/ts}
@@ -69,7 +69,7 @@
       </tr>
      {/if}
 
-     {if $isShowLocation}
+     {if !empty($isShowLocation)}
       <tr>
        <td colspan="2" {$valueStyle}>
         {$location.address.1.display|nl2br}
@@ -77,7 +77,7 @@
       </tr>
      {/if}
 
-     {if $location.phone.1.phone || $location.email.1.email}
+     {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
       <tr>
        <td colspan="2" {$labelStyle}>
         {ts}Event Contacts:{/ts}
       {/foreach}
      {/if}
 
-     {if $event.is_public}
+     {if !empty($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}
      {/if}
 
 
-     {if $event.is_monetary}
+     {if !empty($event.is_monetary)}
 
       <tr>
        <th {$headerStyle}>
-        {$event.fee_label}
+        {if !empty($event.fee_label)}{$event.fee_label}{/if}
        </th>
       </tr>
 
-      {if $lineItem}
+      {if !empty($lineItem)}
        {foreach from=$lineItem item=value key=priceset}
         {if $value neq 'skip'}
          {if $isPrimary}
              <th>{ts}Item{/ts}</th>
              <th>{ts}Qty{/ts}</th>
              <th>{ts}Each{/ts}</th>
-             {if $dataArray}
+             {if !empty($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}
+       {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
             </tr>
             {foreach from=$value item=line}
              <tr>
               <td>
                {$line.unit_price|crmMoney}
               </td>
-              {if $dataArray}
+              {if !empty($dataArray)}
                <td>
                 {$line.unit_price*$line.qty|crmMoney}
                </td>
               <td>
                {$line.line_total+$line.tax_amount|crmMoney}
               </td>
-        {if  $pricesetFieldsCount }
+        {if  !empty($pricesetFieldsCount) }
         <td>
     {$line.participant_count}
               </td>
          </tr>
         {/if}
        {/foreach}
-       {if $dataArray}
+       {if !empty($dataArray)}
         <tr>
          <td {$labelStyle}>
           {ts}Amount Before Tax:{/ts}
        {/if}
       {/if}
 
-      {if $amount && !$lineItem}
+      {if !empty($amount) && !$lineItem}
        {foreach from=$amount item=amnt key=level}
         <tr>
          <td colspan="2" {$valueStyle}>
         </tr>
        {/foreach}
       {/if}
-      {if $totalTaxAmount}
+      {if isset($totalTaxAmount)}
        <tr>
         <td {$labelStyle}>
          {ts}Total Tax Amount{/ts}
          {/if}
         </td>
         <td {$valueStyle}>
-         {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+         {if !empty($totalAmount)}{$totalAmount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
         </td>
        </tr>
-      {if $balanceAmount}
+      {if isset($balanceAmount)}
        <tr>
         <td {$labelStyle}>
          {ts}Balance{/ts}
         </td>
        </tr>
       {/if}
-       {if $pricesetFieldsCount }
+       {if !empty($pricesetFieldsCount) }
      <tr>
        <td {$labelStyle}>
    {ts}Total Participants{/ts}</td>
        </td>
      </tr>
      {/if}
-       {if $is_pay_later}
+       {if !empty($is_pay_later)}
         <tr>
          <td colspan="2" {$labelStyle}>
-          {$pay_later_receipt}
+          {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
          </td>
         </tr>
        {/if}
         </tr>
        {/if}
 
-       {if $receive_date}
+       {if !empty($receive_date)}
         <tr>
          <td {$labelStyle}>
           {ts}Transaction Date{/ts}
         </tr>
        {/if}
 
-       {if $financialTypeName}
+       {if !empty($financialTypeName)}
         <tr>
          <td {$labelStyle}>
           {ts}Financial Type{/ts}
         </tr>
        {/if}
 
-       {if $trxn_id}
+       {if !empty($trxn_id)}
         <tr>
          <td {$labelStyle}>
           {ts}Transaction #{/ts}
         </tr>
        {/if}
 
-       {if $paidBy}
+       {if !empty($paidBy)}
         <tr>
          <td {$labelStyle}>
           {ts}Paid By{/ts}
         </tr>
        {/if}
 
-       {if $checkNumber}
+       {if !empty($checkNumber)}
         <tr>
          <td {$labelStyle}>
           {ts}Check Number{/ts}
         </tr>
        {/if}
 
-       {if $billingName}
+       {if !empty($billingName)}
         <tr>
          <th {$headerStyle}>
           {ts}Billing Name and Address{/ts}
         </tr>
        {/if}
 
-       {if $credit_card_type}
+       {if !empty($credit_card_type)}
         <tr>
          <th {$headerStyle}>
           {ts}Credit Card Information{/ts}
 
      {/if} {* End of conditional section for Paid events *}
 
-     {if $customPre}
+     {if !empty($customPre)}
       <tr>
        <th {$headerStyle}>
         {$customPre_grouptitle}
        </th>
       </tr>
       {foreach from=$customPre item=value key=customName}
-       {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+       {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
         <tr>
          <td {$labelStyle}>
           {$customName}
       {/foreach}
      {/if}
 
-     {if $customPost}
+     {if !empty($customPost)}
       <tr>
        <th {$headerStyle}>
         {$customPost_grouptitle}
        </th>
       </tr>
       {foreach from=$customPost item=value key=customName}
-       {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+       {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
         <tr>
          <td {$labelStyle}>
           {$customName}
       {/foreach}
      {/if}
 
-     {if $customProfile}
+     {if !empty($customProfile)}
       {foreach from=$customProfile item=value key=customName}
        <tr>
         <th {$headerStyle}>
       {/foreach}
      {/if}
 
-     {if $customGroup}
+     {if !empty($customGroup)}
       {foreach from=$customGroup item=value key=customName}
        <tr>
         <th {$headerStyle}>
index e128670c91d03e7e7b5fbd3a9d754d5a5443ff87..2e8b682de605c28397dd8b7cb48ee31015678736 100644 (file)
@@ -1,10 +1,10 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+{if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
 {$event.confirm_email_text}
 {/if}
 
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($isOnWaitlist)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {ts}You have been added to the WAIT LIST for this event.{/ts}
 
 {ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
 
 {/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{elseif !empty($isRequireApproval)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {ts}Your registration has been submitted.{/ts}
 
 {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}
 
 {/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
-{elseif $is_pay_later}
+{elseif !empty($is_pay_later)}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {/if}
 
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {ts}Event Information and Location{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$event.event_title}
 {$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}
 
-{if $event.participant_role neq 'Attendee' and $defaultRole}
+{if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and empty($defaultRole)}
 {ts}Participant Role{/ts}: {$event.participant_role}
 {/if}
 
-{if $isShowLocation}
+{if !empty($isShowLocation)}
 {$location.address.1.display|strip_tags:false}
 {/if}{*End of isShowLocation condition*}
 
-{if $location.phone.1.phone || $location.email.1.email}
+{if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
 
 {ts}Event Contacts:{/ts}
 {foreach from=$location.phone item=phone}
 {ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
 {/if}
 
-{if $event.is_public}
+{if !empty($event.is_public)}
 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
 {ts}Download iCalendar File:{/ts} {$icalFeed}
 {/if}
 
-{if $email}
+{if !empty($email)}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {ts}Registered Email{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$email}
 {/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
+{if !empty($event.is_monetary)} {* This section for Paid events only.*}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($event.fee_label)}{$event.fee_label}{/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
+{if !empty($lineItem)}{foreach from=$lineItem item=value key=priceset}
 
 {if $value neq 'skip'}
-{if $isPrimary}
+{if !empty($isPrimary)}
 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
 {ts 1=$priceset+1}Participant %1{/ts}
 {/if}
 {/if}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+---------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
 
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_qty}{ts}Qty{/ts}{/capture}
 {capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
 {/if}
 {capture assign=ts_total}{ts}Total{/ts}{/capture}
-{capture assign=ts_participant_total}{if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+{capture assign=ts_participant_total}{if !empty($pricesetFieldsCount) }{ts}Total Participants{/ts}{/if}{/capture}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {if !empty($ts_participant_total)}{$ts_participant_total|string_format:"%10s"}{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
 
 {foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if}  {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {$ts_participant_count|string_format:"%10s"}
+{if !empty($pricesetFieldsCount) }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if}  {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {if !empty($ts_participant_count)}{$ts_participant_count|string_format:"%10s"}{/if}
 {/foreach}
 {/if}
 {/foreach}
 
-{if $dataArray}
+{if !empty($dataArray)}
 {ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
 
 {foreach from=$dataArray item=value key=priceset}
 {/if}
 {/if}
 
-{if $amount && !$lineItem}
+{if !empty($amount) && !$lineItem}
 {foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
 {/foreach}
 {/if}
 
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
 {ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
 {/if}
-{if $isPrimary}
+{if !empty($isPrimary)}
 
-{if $balanceAmount}{ts}Total Paid{/ts}{else}{ts}Total Amount{/ts}{/if}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+{if !empty($balanceAmount)}{ts}Total Paid{/ts}{else}{ts}Total Amount{/ts}{/if}: {if !empty($totalAmount)}{$totalAmount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
 
-{if $balanceAmount}
+{if !empty($balanceAmount)}
 {ts}Balance{/ts}: {$balanceAmount|crmMoney}
 {/if}
 
-{if $pricesetFieldsCount }
+{if !empty($pricesetFieldsCount) }
       {assign var="count" value= 0}
       {foreach from=$lineItem item=pcount}
       {assign var="lineItemCount" value=0}
 {ts}Total Participants{/ts}: {$count}
 {/if}
 
-{if $is_pay_later }
+{if !empty($is_pay_later) }
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {/if}
 
 {if $receive_date}
 {ts}Transaction Date{/ts}: {$receive_date|crmDate}
 {/if}
-{if $financialTypeName}
+{if !empty($financialTypeName)}
 {ts}Financial Type{/ts}: {$financialTypeName}
 {/if}
-{if $trxn_id}
+{if !empty($trxn_id)}
 {ts}Transaction #{/ts}: {$trxn_id}
 {/if}
-{if $paidBy}
+{if !empty($paidBy)}
 {ts}Paid By{/ts}: {$paidBy}
 {/if}
-{if $checkNumber}
+{if !empty($checkNumber)}
 {ts}Check Number{/ts}: {$checkNumber}
 {/if}
-{if $billingName}
+{if !empty($billingName)}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {ts}Billing Name and Address{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$billingName}
 {$address}
 {/if}
 
-{if $credit_card_type}
+{if !empty($credit_card_type)}
 ===========================================================
 {ts}Credit Card Information{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$credit_card_type}
 {$credit_card_number}
 {/if}
 {/if} {* End of conditional section for Paid events *}
 
-{if $customPre}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($customPre)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$customPre_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
 {$customName}: {$value}
 {/if}
 {/foreach}
 {/if}
 
-{if $customPost}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($customPost)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$customPost_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
 {$customName}: {$value}
 {/if}
 {/foreach}
 {/if}
-{if $customProfile}
+{if !empty($customProfile)}
 
 {foreach from=$customProfile item=value key=customName}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {ts 1=$customName+1}Participant Information - Participant %1{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {foreach from=$value item=val key=field}
 {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
 {if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
 
 {$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
 
 {else}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
 
 {$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
 
 {/if}
 {foreach from=$val item=v key=f}
 {/foreach}
 {/foreach}
 {/if}
-{if $customGroup}
+{if !empty($customGroup)}
 {foreach from=$customGroup item=value key=customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
+=========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {$customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
+=========================================================={if !empty($pricesetFieldsCount) }===================={/if}
 
 {foreach from=$value item=v key=n}
 {$n}: {$v}
index ef73f07f4c918f931d7d6612e3bb25f6e7f3cfc9..0d95412df9c9f593459e9d626301df93b0270866 100644 (file)
@@ -27,7 +27,7 @@
    <td>
      {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
 
-    {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+    {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
      <p>{$event.confirm_email_text|htmlize}</p>
 
     {else}
     {/if}
 
     <p>
-    {if $isOnWaitlist}
+    {if !empty($isOnWaitlist)}
      <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
-     {if $isPrimary}
+     {if !empty($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}
+    {elseif !empty($isRequireApproval)}
      <p>{ts}Your registration has been submitted.{/ts}</p>
-     {if $isPrimary}
+     {if !empty($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 && !$isAmountzero && !$isAdditionalParticipant}
-     <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+    {elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)}
+     <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
     {/if}
 
    </td>
@@ -91,7 +91,7 @@
       </tr>
      {/if}
 
-     {if $event.participant_role neq 'Attendee' and $defaultRole}
+     {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
       <tr>
        <td {$labelStyle}>
         {ts}Participant Role{/ts}
       </tr>
      {/if}
 
-     {if $isShowLocation}
+     {if !empty($isShowLocation)}
       <tr>
        <td colspan="2" {$valueStyle}>
         {$location.address.1.display|nl2br}
       </tr>
      {/if}
 
-     {if $location.phone.1.phone || $location.email.1.email}
+     {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
       <tr>
        <td colspan="2" {$labelStyle}>
         {ts}Event Contacts:{/ts}
       {/foreach}
      {/if}
 
-     {if $event.is_public}
+     {if !empty($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}
       </tr>
      {/if}
 
-    {if $event.is_share}
+    {if !empty($event.is_share)}
         <tr>
             <td colspan="2" {$valueStyle}>
                 {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&reset=1" a=true fe=1 h=1}{/capture}
             </td>
         </tr>
     {/if}
-    {if $payer.name}
+    {if !empty($payer.name)}
      <tr>
        <th {$headerStyle}>
          {ts}You were registered by:{/ts}
        </td>
      </tr>
     {/if}
-    {if $event.is_monetary and not $isRequireApproval}
+    {if !empty($event.is_monetary) and empty($isRequireApproval)}
 
       <tr>
        <th {$headerStyle}>
-        {$event.fee_label}
+        {if !empty($event.fee_label)}{$event.fee_label}{/if}
        </th>
       </tr>
 
-      {if $lineItem}
+      {if !empty($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} {$part.$priceset.info}
+             {ts 1=$priceset+1}Participant %1{/ts} {if !empty($part.$priceset)}{$part.$priceset.info}{/if}
             </td>
            </tr>
           {/if}
              <th>{ts}Item{/ts}</th>
              <th>{ts}Qty{/ts}</th>
              <th>{ts}Each{/ts}</th>
-             {if $dataArray}
+             {if !empty($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}
+       {if  !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
             </tr>
             {foreach from=$value item=line}
              <tr>
               <td {$tdStyle}>
                {$line.unit_price|crmMoney:$currency}
               </td>
-              {if $dataArray}
+              {if !empty($dataArray)}
                <td {$tdStyle}>
                 {$line.unit_price*$line.qty|crmMoney}
                </td>
-               {if $line.tax_rate != "" || $line.tax_amount != ""}
+               {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
                 <td {$tdStyle}>
                  {$line.tax_rate|string_format:"%.2f"}%
                 </td>
               <td {$tdStyle}>
                {$line.line_total+$line.tax_amount|crmMoney:$currency}
               </td>
-        {if $pricesetFieldsCount }<td {$tdStyle}>{$line.participant_count}</td> {/if}
+        {if !empty($pricesetFieldsCount) }<td {$tdStyle}>{$line.participant_count}</td> {/if}
              </tr>
             {/foreach}
-            {if $individual}
+            {if !empty($individual)}
               <tr {$participantTotal}>
                 <td colspan=3>{ts}Participant Total{/ts}</td>
                 <td colspan=2>{$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney}</td>
          </tr>
         {/if}
        {/foreach}
-       {if $dataArray}
+       {if !empty($dataArray)}
         <tr>
          <td {$labelStyle}>
           {ts} Amount Before Tax: {/ts}
        {/if}
       {/if}
 
-      {if $amounts && !$lineItem}
+      {if !empty($amounts) && empty($lineItem)}
        {foreach from=$amounts item=amnt key=level}
         <tr>
          <td colspan="2" {$valueStyle}>
        {/foreach}
       {/if}
 
-    {if $totalTaxAmount}
+    {if isset($totalTaxAmount)}
        <tr>
         <td {$labelStyle}>
          {ts}Total Tax Amount{/ts}
          {ts}Total Amount{/ts}
         </td>
         <td {$valueStyle}>
-         {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+         {if !empty($totalAmount)}{$totalAmount|crmMoney:$currency}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
         </td>
        </tr>
-       {if $pricesetFieldsCount }
+       {if !empty($pricesetFieldsCount) }
      <tr>
        <td {$labelStyle}>
       {ts}Total Participants{/ts}</td>
         </tr>
        {/if}
 
-       {if $receive_date}
+       {if !empty($receive_date)}
         <tr>
          <td {$labelStyle}>
           {ts}Transaction Date{/ts}
         </tr>
        {/if}
 
-       {if $financialTypeName}
+       {if !empty($financialTypeName)}
         <tr>
          <td {$labelStyle}>
           {ts}Financial Type{/ts}
         </tr>
        {/if}
 
-       {if $trxn_id}
+       {if !empty($trxn_id)}
         <tr>
          <td {$labelStyle}>
           {ts}Transaction #{/ts}
         </tr>
        {/if}
 
-       {if $paidBy}
+       {if !empty($paidBy)}
         <tr>
          <td {$labelStyle}>
           {ts}Paid By{/ts}
         </tr>
        {/if}
 
-       {if $checkNumber}
+       {if !empty($checkNumber)}
         <tr>
          <td {$labelStyle}>
           {ts}Check Number{/ts}
         </tr>
        {/if}
 
-       {if $billingName}
+       {if !empty($billingName)}
         <tr>
          <th {$headerStyle}>
           {ts}Billing Name and Address{/ts}
         </tr>
        {/if}
 
-       {if $credit_card_type}
+       {if !empty($credit_card_type)}
         <tr>
          <th {$headerStyle}>
           {ts}Credit Card Information{/ts}
      {/if} {* End of conditional section for Paid events *}
 
 
-{if $customPre}
+{if !empty($customPre)}
 {foreach from=$customPre item=customPr key=i}
    <tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
    {foreach from=$customPr item=customValue key=customName}
-   {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+   {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
      <tr>
          <td {$labelStyle}>{$customName}</td>
          <td {$valueStyle}>{$customValue}</td>
 {/foreach}
 {/if}
 
-{if $customPost}
+{if !empty($customPost)}
 {foreach from=$customPost item=customPos key=j}
    <tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
    {foreach from=$customPos item=customValue key=customName}
-   {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+   {if (!empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
      <tr>
          <td {$labelStyle}>{$customName}</td>
          <td {$valueStyle}>{$customValue}</td>
 {/foreach}
 {/if}
 
-{if $customProfile}
+{if !empty($customProfile)}
 {foreach from=$customProfile.profile item=eachParticipant key=participantID}
      <tr><th {$headerStyle}>{ts 1=$participantID+2}Participant %1{/ts} </th></tr>
      {foreach from=$eachParticipant item=eachProfile key=pid}
 {/if}
 
     </table>
-    {if $event.allow_selfcancelxfer }
+    {if !empty($event.allow_selfcancelxfer) }
      <tr>
       <td colspan="2" {$valueStyle}>
-        {ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}<br />
+        {ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if !empty($totalAmount)}{ts}Cancellations are not refundable.{/ts}{/if}<br />
         {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}"  h=0 a=1 fe=1}{/capture}
         <a href="{$selfService}">{ts}Click here to transfer or cancel your registration.{/ts}</a>
       </td>
index 7bb27306377a75307af7c30c9f2d313d60cd2b2e..da1dab7259d0c8149603df0d72d4a517e8294771 100644 (file)
@@ -1 +1 @@
-{if $isOnWaitlist}{ts}Wait List Confirmation{/ts}{elseif $isRequireApproval}{ts}Registration Request Confirmation{/ts}{else}{ts}Registration Confirmation{/ts}{/if} - {$event.event_title} - {contact.display_name}
+{if !empty($isOnWaitlist)}{ts}Wait List Confirmation{/ts}{elseif !empty($isRequireApproval)}{ts}Registration Request Confirmation{/ts}{else}{ts}Registration Confirmation{/ts}{/if} - {$event.event_title} - {contact.display_name}
index adca08ff5f4b8afcb89f5e9530c2417ec5f7ec01..04f25cf5146858f4cfb396fcf7b1a1c18b2fd65a 100644 (file)
@@ -1,26 +1,26 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+{if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
 {$event.confirm_email_text}
 
 {else}
   {ts}Thank you for your registration.{/ts}
   {if $participant_status}{ts 1=$participant_status}This is a confirmation that your registration has been received and your status has been updated to %1.{/ts}
-  {else}{if $isOnWaitlist}{ts}This is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}
+  {else}{if !empty($isOnWaitlist)}{ts}This is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}
   {/if}
 {/if}
 
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($isOnWaitlist)}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {ts}You have been added to the WAIT LIST for this event.{/ts}
 
-{if $isPrimary}
+{if !empty($isPrimary)}
 {ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
 {/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{elseif !empty($isRequireApproval)}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {ts}Your registration has been submitted.{/ts}
 
 {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}
 
 {/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
-{elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
+{elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {/if}
 
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {ts}Event Information and Location{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {$event.event_title}
 {$event.event_start_date|date_format:"%A"} {$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|date_format:"%A"} {$event.event_end_date|crmDate}{/if}{/if}
-{if $conference_sessions}
+{if !empty($conference_sessions)}
 
 
 {ts}Your schedule:{/ts}
 {/foreach}
 {/if}
 
-{if $event.participant_role neq 'Attendee' and $defaultRole}
+{if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
 {ts}Participant Role{/ts}: {$event.participant_role}
 {/if}
 
-{if $isShowLocation}
+{if !empty($isShowLocation)}
 {$location.address.1.display|strip_tags:false}
 {/if}{*End of isShowLocation condition*}
 
-{if $location.phone.1.phone || $location.email.1.email}
+{if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
 
 {ts}Event Contacts:{/ts}
 {foreach from=$location.phone item=phone}
 {ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
 {/if}
 
-{if $event.is_public}
+{if !empty($event.is_public)}
 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
 {ts}Download iCalendar File:{/ts} {$icalFeed}
 {/if}
 
-{if $payer.name}
+{if !empty($payer.name)}
 You were registered by: {$payer.name}
 {/if}
-{if $event.is_monetary and not $isRequireApproval} {* This section for Paid events only.*}
+{if !empty($event.is_monetary) and empty($isRequireApproval)} {* This section for Paid events only.*}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty ($event.fee_label)}{$event.fee_label}{/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
+{if !empty($lineItem)}{foreach from=$lineItem item=value key=priceset}
 
 {if $value neq 'skip'}
 {if $isPrimary}
@@ -112,33 +112,33 @@ You were registered by: {$payer.name}
 
 {/if}
 {/if}
------------------------------------------------------------{if $pricesetFieldsCount }-----------------------------------------------------{/if}
+-----------------------------------------------------------{if !empty($pricesetFieldsCount)}-----------------------------------------------------{/if}
 
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_qty}{ts}Qty{/ts}{/capture}
 {capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
 {/if}
 {capture assign=ts_total}{ts}Total{/ts}{/capture}
-{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
------------------------------------------------------------{if $pricesetFieldsCount }-----------------------------------------------------{/if}
+{if !empty($pricesetFieldsCount) }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {if !empty($ts_participant_total)}{$ts_participant_total|string_format:"%10s"}{/if}
+-----------------------------------------------------------{if !empty($pricesetFieldsCount)}-----------------------------------------------------{/if}
 
 {foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
+{if !empty($pricesetFieldsCount) }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}  {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}{if !empty($ts_participant_count)}{$ts_participant_count|string_format:"%10s"}{/if}
 {/foreach}
 ----------------------------------------------------------------------------------------------------------------
-{if $individual}{ts}Participant Total{/ts} {$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%29s"} {$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%33s"} {$individual.$priceset.totalAmtWithTax|crmMoney:$currency|string_format:"%12s"}{/if}
+{if !empty($individual)}{ts}Participant Total{/ts} {$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%29s"} {$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%33s"} {$individual.$priceset.totalAmtWithTax|crmMoney:$currency|string_format:"%12s"}{/if}
 {/if}
 {""|string_format:"%120s"}
 {/foreach}
 {""|string_format:"%120s"}
 
-{if $dataArray}
+{if !empty($dataArray)}
 {ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
 
 {foreach from=$dataArray item=value key=priceset}
@@ -151,19 +151,19 @@ You were registered by: {$payer.name}
 {/if}
 {/if}
 
-{if $amounts && !$lineItem}
+{if !empty($amounts) && empty($lineItem)}
 {foreach from=$amounts item=amnt key=level}{$amnt.amount|crmMoney:$currency} {$amnt.label}
 {/foreach}
 {/if}
 
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
 {ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
 {/if}
-{if $isPrimary }
+{if !empty($isPrimary) }
 
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+{ts}Total Amount{/ts}: {if !empty($totalAmount)}{$totalAmount|crmMoney:$currency}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
 
-{if $pricesetFieldsCount }
+{if !empty($pricesetFieldsCount) }
       {assign var="count" value= 0}
       {foreach from=$lineItem item=pcount}
       {assign var="lineItemCount" value=0}
@@ -184,39 +184,39 @@ You were registered by: {$payer.name}
 {if $register_date}
 {ts}Registration Date{/ts}: {$register_date|crmDate}
 {/if}
-{if $receive_date}
+{if !empty($receive_date)}
 {ts}Transaction Date{/ts}: {$receive_date|crmDate}
 {/if}
-{if $financialTypeName}
+{if !empty($financialTypeName)}
 {ts}Financial Type{/ts}: {$financialTypeName}
 {/if}
-{if $trxn_id}
+{if !empty($trxn_id)}
 {ts}Transaction #{/ts}: {$trxn_id}
 {/if}
-{if $paidBy}
+{if !empty($paidBy)}
 {ts}Paid By{/ts}: {$paidBy}
 {/if}
-{if $checkNumber}
+{if !empty($checkNumber)}
 {ts}Check Number{/ts}: {$checkNumber}
 {/if}
-{if $billingName}
+{if !empty($billingName)}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {ts}Billing Name and Address{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {$billingName}
 {$address}
 {/if}
 
-{if $credit_card_type}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($credit_card_type)}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {ts}Credit Card Information{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {$credit_card_type}
 {$credit_card_number}
@@ -225,49 +225,49 @@ You were registered by: {$payer.name}
 {/if}
 {/if} {* End of conditional section for Paid events *}
 
-{if $customPre}
+{if !empty($customPre)}
 {foreach from=$customPre item=customPr key=i}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {$customPre_grouptitle.$i}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {foreach from=$customPr item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
 {/foreach}
 {/if}
 
-{if $customPost}
+{if !empty($customPost)}
 {foreach from=$customPost item=customPos key=j}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {$customPost_grouptitle.$j}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {foreach from=$customPos item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
 {/foreach}
 {/if}
-{if $customProfile}
+{if !empty($customProfile)}
 
 {foreach from=$customProfile.profile item=eachParticipant key=participantID}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {ts 1=$participantID+2}Participant Information - Participant %1{/ts}
 
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
 
 {foreach from=$eachParticipant item=eachProfile key=pid}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount)}--------------------{/if}
 
 {$customProfile.title.$pid}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount)}--------------------{/if}
 
 {foreach from=$eachProfile item=val key=field}
 {foreach from=$val item=v key=f}
@@ -278,8 +278,8 @@ You were registered by: {$payer.name}
 {/foreach}
 {/if}
 
-{if $event.allow_selfcancelxfer }
-{ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}
+{if !empty($event.allow_selfcancelxfer) }
+{ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if !empty($totalAmount)}{ts}Cancellations are not refundable.{/ts}{/if}
    {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}"  h=0 a=1 fe=1}{/capture}
 {ts}Transfer or cancel your registration:{/ts} {$selfService}
 {/if}
index 022805658116ec155dd5940c639b58840b1a79d1..2040b451fca78e61335d1eb270b9f0a9102517a4 100644 (file)
@@ -21,7 +21,7 @@
     {/if}
 
     {if $is_pay_later}
-      <p>{$pay_later_receipt}</p>
+      <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p>
     {/if}
 
     <p>Your order number is #{$transaction_id}. {if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
index 8a58ea90c0fb88426d96b1c731a8d0354b8038e2..5a6807609e65be01a9dc05229bbacb38f8f6abab 100644 (file)
@@ -7,7 +7,7 @@
 {/if}
 
 {if $is_pay_later}
-  {$pay_later_receipt}
+  {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
 {/if}
 
   Your order number is #{$transaction_id}. {if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
index 3cc8fe6f4c30c4458036ffc66de93786f82bb6c3..2fd5ec20d97c78ae0e3f7d8f58a41e6d0c5a2dfa 100644 (file)
@@ -24,9 +24,9 @@
     <tr>
       <td>
         {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
-        {if $formValues.receipt_text_signup}
+        {if !empty($formValues.receipt_text_signup)}
           <p>{$formValues.receipt_text_signup|htmlize}</p>
-        {elseif $formValues.receipt_text_renewal}
+        {elseif !empty($formValues.receipt_text_renewal)}
           <p>{$formValues.receipt_text_renewal|htmlize}</p>
         {else}
           <p>{ts}Thank you for this contribution.{/ts}</p>
@@ -36,7 +36,7 @@
     <tr>
       <td>
         <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
-          {if !$lineItem}
+          {if empty($lineItem)}
             <tr>
               <th {$headerStyle}>
                 {ts}Membership Information{/ts}
@@ -51,8 +51,8 @@
               </td>
             </tr>
           {/if}
-          {if ! $cancelled}
-            {if !$lineItem}
+          {if empty($cancelled)}
+            {if empty($lineItem)}
               <tr>
                 <td {$labelStyle}>
                   {ts}Membership Start Date{/ts}
@@ -87,7 +87,7 @@
                 </tr>
               {/if}
 
-              {if $lineItem}
+              {if !empty($lineItem)}
                 {foreach from=$lineItem item=value key=priceset}
                   <tr>
                     <td colspan="2" {$valueStyle}>
@@ -95,7 +95,7 @@
                         <tr>
                           <th>{ts}Item{/ts}</th>
                           <th>{ts}Fee{/ts}</th>
-                          {if $dataArray}
+                          {if !empty($dataArray)}
                             <th>{ts}SubTotal{/ts}</th>
                             <th>{ts}Tax Rate{/ts}</th>
                             <th>{ts}Tax Amount{/ts}</th>
                             <td>
                               {$line.line_total|crmMoney}
                             </td>
-                            {if $dataArray}
+                            {if !empty($dataArray)}
                               <td>
                                 {$line.unit_price*$line.qty|crmMoney}
                               </td>
-                              {if $line.tax_rate != "" || $line.tax_amount != ""}
+                              {if $line.tax_rate and ($line.tax_rate != "" || $line.tax_amount != "")}
                                 <td>
                                   {$line.tax_rate|string_format:"%.2f"}%
                                 </td>
                     </td>
                   </tr>
                 {/foreach}
-                {if $dataArray}
+                {if !empty($dataArray)}
                   <tr>
                     <td {$labelStyle}>
                       {ts}Amount Before Tax:{/ts}
                   {$formValues.total_amount|crmMoney}
                 </td>
               </tr>
-              {if $receive_date}
+              {if !empty($receive_date)}
                 <tr>
                   <td {$labelStyle}>
                     {ts}Date Received{/ts}
                   </td>
                 </tr>
               {/if}
-              {if $formValues.paidBy}
+              {if !empty($formValues.paidBy)}
                 <tr>
                   <td {$labelStyle}>
                     {ts}Paid By{/ts}
                     {$formValues.paidBy}
                   </td>
                 </tr>
-                {if $formValues.check_number}
+                {if !empty($formValues.check_number)}
                   <tr>
                     <td {$labelStyle}>
                       {ts}Check Number{/ts}
       </td>
     </tr>
 
-    {if $isPrimary}
+    {if !empty($isPrimary)}
       <tr>
         <td>
           <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
 
-            {if $billingName}
+            {if !empty($billingName)}
               <tr>
                 <th {$headerStyle}>
                   {ts}Billing Name and Address{/ts}
               </tr>
             {/if}
 
-            {if $credit_card_type}
+            {if !empty($credit_card_type)}
               <tr>
                 <th {$headerStyle}>
                   {ts}Credit Card Information{/ts}
       </tr>
     {/if}
 
-    {if $customValues}
+    {if !empty($customValues)}
       <tr>
         <td>
           <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
index 802deb0238d6ed84fdbba339726eca8536b285d7..a35591eb3f03811e63b8ceb932df3d13c25a2509 100644 (file)
@@ -1,20 +1,20 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
 
-{if $formValues.receipt_text_signup}
+{if !empty($formValues.receipt_text_signup)}
 {$formValues.receipt_text_signup}
-{elseif $formValues.receipt_text_renewal}
+{elseif !empty($formValues.receipt_text_renewal)}
 {$formValues.receipt_text_renewal}
 {else}{ts}Thank you for this contribution.{/ts}{/if}
 
-{if !$lineItem}
+{if empty($lineItem)}
 ===========================================================
 {ts}Membership Information{/ts}
 
 ===========================================================
 {ts}Membership Type{/ts}: {$membership_name}
 {/if}
-{if ! $cancelled}
-{if !$lineItem}
+{if empty($cancelled)}
+{if empty($lineItem)}
 {ts}Membership Start Date{/ts}: {$mem_start_date}
 {ts}Membership End Date{/ts}: {$mem_end_date}
 {/if}
 {if $formValues.contributionType_name}
 {ts}Financial Type{/ts}: {$formValues.contributionType_name}
 {/if}
-{if $lineItem}
+{if !empty($lineItem)}
 {foreach from=$lineItem item=value key=priceset}
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_total}{ts}Fee{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
 {/if}
 {capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
 {capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
+{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
 --------------------------------------------------------------------------------------------------
 
 {foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"}  {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"}  {else}                  {/if}   {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"}  {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"}  {else}                  {/if}   {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
 {/foreach}
 {/foreach}
 
-{if $dataArray}
+{if !empty($dataArray)}
 {ts}Amount before Tax{/ts}: {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
 
 {foreach from=$dataArray item=value key=priceset}
 {/if}
 
 {ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
-{if $receive_date}
+{if !empty($receive_date)}
 {ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
 {/if}
-{if $formValues.paidBy}
+{if !empty($formValues.paidBy)}
 {ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
+{if !empty($formValues.check_number)}
 {ts}Check Number{/ts}: {$formValues.check_number}
 {/if}
 {/if}
 {/if}
 {/if}
 
-{if $isPrimary }
-{if $billingName}
+{if !empty($isPrimary) }
+{if !empty($billingName)}
 
 ===========================================================
 {ts}Billing Name and Address{/ts}
@@ -89,7 +89,7 @@
 {$address}
 {/if}
 
-{if $credit_card_type}
+{if !empty($credit_card_type)}
 ===========================================================
 {ts}Credit Card Information{/ts}
 
 {/if}
 {/if}
 
-{if $customValues}
+{if !empty($customValues)}
 ===========================================================
 {ts}Membership Options{/ts}
 
index 3e8073b30d405934c53a8bec0359cc45b7239432..a2b1b461332efe9211b97e11d0870031ee6a7462 100644 (file)
   <tr>
    <td>
      {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
-    {if $receipt_text}
+    {if !empty($receipt_text)}
      <p>{$receipt_text|htmlize}</p>
     {/if}
 
     {if $is_pay_later}
-     <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+     <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
     {/if}
 
    </td>
@@ -79,7 +79,7 @@
        </th>
       </tr>
 
-      {if !$useForMember and $membership_amount and $is_quick_config}
+      {if !$useForMember and isset($membership_amount) and !empty($is_quick_config)}
 
        <tr>
         <td {$labelStyle}>
          </tr>
        {/if}
 
-      {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config}
+      {elseif empty($useForMember) && !empty($lineItem) and $priceSetID and empty($is_quick_config)}
 
        {foreach from=$lineItem item=value key=priceset}
         <tr>
        </tr>
 
       {else}
-       {if $useForMember && $lineItem and !$is_quick_config}
+       {if $useForMember && $lineItem and empty($is_quick_config)}
        {foreach from=$lineItem item=value key=priceset}
         <tr>
          <td colspan="2" {$valueStyle}>
            <tr>
             <th>{ts}Item{/ts}</th>
             <th>{ts}Fee{/ts}</th>
-            {if $dataArray}
+            {if !empty($dataArray)}
               <th>{ts}SubTotal{/ts}</th>
               <th>{ts}Tax Rate{/ts}</th>
               <th>{ts}Tax Amount{/ts}</th>
              <td>
               {$line.line_total|crmMoney}
              </td>
-             {if $dataArray}
+             {if !empty($dataArray)}
               <td>
                {$line.unit_price*$line.qty|crmMoney}
               </td>
-              {if $line.tax_rate != "" || $line.tax_amount != ""}
+              {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
                <td>
                 {$line.tax_rate|string_format:"%.2f"}%
                </td>
          </td>
         </tr>
        {/foreach}
-       {if $dataArray}
+       {if !empty($dataArray)}
         <tr>
          <td {$labelStyle}>
           {ts}Amount Before Tax:{/ts}
         {/foreach}
        {/if}
        {/if}
-       {if $totalTaxAmount}
+       {if isset($totalTaxAmount)}
         <tr>
          <td {$labelStyle}>
           {ts}Total Tax Amount{/ts}
          {ts}Amount{/ts}
         </td>
         <td {$valueStyle}>
-         {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
+         {$amount|crmMoney} {if isset($amount_level)} - {$amount_level}{/if}
         </td>
        </tr>
 
       {/if}
 
 
-     {elseif $membership_amount}
+     {elseif isset($membership_amount)}
 
 
       <tr>
 
      {/if}
 
-     {if $receive_date}
+     {if !empty($receive_date)}
       <tr>
        <td {$labelStyle}>
         {ts}Date{/ts}
       </tr>
      {/if}
 
-     {if $is_monetary and $trxn_id}
+     {if !empty($is_monetary) and !empty($trxn_id)}
       <tr>
        <td {$labelStyle}>
         {ts}Transaction #{/ts}
       </tr>
      {/if}
 
-     {if $membership_trx_id}
+     {if !empty($membership_trx_id)}
       <tr>
        <td {$labelStyle}>
         {ts}Membership Transaction #{/ts}
        </td>
       </tr>
      {/if}
-     {if $is_recur}
+     {if !empty($is_recur)}
        <tr>
         <td colspan="2" {$labelStyle}>
          {ts}This membership will be renewed automatically.{/ts}
       {/foreach}
      {/if}
 
-     {if $pcpBlock}
+     {if !empty($pcpBlock)}
       <tr>
        <th {$headerStyle}>
         {ts}Personal Campaign Page{/ts}
       {/if}
      {/if}
 
-     {if $onBehalfProfile}
+     {if !empty($onBehalfProfile)}
       <tr>
        <th {$headerStyle}>
         {$onBehalfProfile_grouptitle}
       {/foreach}
      {/if}
 
-     {if $billingName}
+     {if !empty($billingName)}
        <tr>
          <th {$headerStyle}>
            {ts}Billing Name and Address{/ts}
           {$email}
         </td>
       </tr>
-    {elseif $email}
+    {elseif !empty($email)}
       <tr>
         <th {$headerStyle}>
           {ts}Registered Email{/ts}
       </tr>
     {/if}
 
-     {if $credit_card_type}
+     {if !empty($credit_card_type)}
       <tr>
        <th {$headerStyle}>
         {ts}Credit Card Information{/ts}
       </tr>
      {/if}
 
-     {if $selectPremium}
+     {if !empty($selectPremium)}
       <tr>
        <th {$headerStyle}>
         {ts}Premium Information{/ts}
         </td>
        </tr>
       {/if}
-      {if $contact_email OR $contact_phone}
+      {if !empty($contact_email) OR !empty($contact_phone)}
        <tr>
         <td colspan="2" {$valueStyle}>
          <p>{ts}For information about this premium, contact:{/ts}</p>
-         {if $contact_email}
+         {if !empty($contact_email)}
           <p>{$contact_email}</p>
          {/if}
-         {if $contact_phone}
+         {if !empty($contact_phone)}
           <p>{$contact_phone}</p>
          {/if}
         </td>
        </tr>
       {/if}
-      {if $is_deductible AND $price}
+      {if !empty($is_deductible) AND !empty($price)}
         <tr>
          <td colspan="2" {$valueStyle}>
           <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
       {/if}
      {/if}
 
-     {if $customPre}
+     {if !empty($customPre)}
       <tr>
        <th {$headerStyle}>
         {$customPre_grouptitle}
        </th>
       </tr>
       {foreach from=$customPre item=customValue key=customName}
-       {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+       {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
         <tr>
          <td {$labelStyle}>
           {$customName}
       {/foreach}
      {/if}
 
-     {if $customPost}
+     {if !empty($customPost)}
       <tr>
        <th {$headerStyle}>
         {$customPost_grouptitle}
        </th>
       </tr>
       {foreach from=$customPost item=customValue key=customName}
-       {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+       {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
         <tr>
          <td {$labelStyle}>
           {$customName}
index 3c97b7e00002374723944b059b0f207f9900b86b..d1647bdbe20fdb61854e4b865cb214d4ea63d03b 100644 (file)
@@ -1,11 +1,11 @@
 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $receipt_text}
+{if !empty($receipt_text)}
 {$receipt_text}
 {/if}
 {if $is_pay_later}
 
 ===========================================================
-{$pay_later_receipt}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
 ===========================================================
 {/if}
 
 {ts}Membership Fee{/ts}
 
 ===========================================================
-{if !$useForMember && $membership_amount && $is_quick_config}
+{if !$useForMember && isset($membership_amount) && !empty($is_quick_config)}
 {ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
 {if $amount && !$is_separate_payment }
 {ts}Contribution Amount{/ts}: {$amount|crmMoney}
 -------------------------------------------
 {ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
 {/if}
-{elseif !$useForMember && $lineItem and $priceSetID & !$is_quick_config}
+{elseif !$useForMember && !empty($lineItem) and !empty($priceSetID) & empty($is_quick_config)}
 {foreach from=$lineItem item=value key=priceset}
 ---------------------------------------------------------
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 
 {ts}Total Amount{/ts}: {$amount|crmMoney}
 {else}
-{if $useForMember && $lineItem && !$is_quick_config}
+{if $useForMember && $lineItem && empty($is_quick_config)}
 {foreach from=$lineItem item=value key=priceset}
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_total}{ts}Fee{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
 {/if}
 {capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
 {capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
+{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
 --------------------------------------------------------------------------------------------------
 
 {foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"}  {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}   {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"}  {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}  {$line.tax_rate|string_format:"%.2f"} %  {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else}                  {/if}   {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
 {/foreach}
 {/foreach}
 
-{if $dataArray}
+{if !empty($dataArray)}
 {ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
 
 {foreach from=$dataArray item=value key=priceset}
 --------------------------------------------------------------------------------------------------
 {/if}
 
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
 {ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
 {/if}
 
-{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
+{ts}Amount{/ts}: {$amount|crmMoney} {if isset($amount_level) } - {$amount_level} {/if}
 {/if}
-{elseif $membership_amount}
+{elseif isset($membership_amount)}
 ===========================================================
 {ts}Membership Fee{/ts}
 
 {ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
 {/if}
 
-{if $receive_date}
+{if !empty($receive_date)}
 
 {ts}Date{/ts}: {$receive_date|crmDate}
 {/if}
-{if $is_monetary and $trxn_id}
+{if !empty($is_monetary) and !empty($trxn_id)}
 {ts}Transaction #{/ts}: {$trxn_id}
 
 {/if}
-{if $membership_trx_id}
+{if !empty($membership_trx_id)}
 {ts}Membership Transaction #{/ts}: {$membership_trx_id}
 
 {/if}
-{if $is_recur}
+{if !empty($is_recur)}
 {ts}This membership will be renewed automatically.{/ts}
 {if $cancelSubscriptionUrl}
 
 {/foreach}
 
 {/if}
-{if $pcpBlock}
+{if !empty($pcpBlock)}
 ===========================================================
 {ts}Personal Campaign Page{/ts}
 
 {if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
 
 {/if}
-{if $onBehalfProfile}
+{if !empty($onBehalfProfile)}
 ===========================================================
 {ts}On Behalf Of{/ts}
 
 {/foreach}
 {/if}
 
-{if $billingName}
+{if !empty($billingName)}
 ===========================================================
 {ts}Billing Name and Address{/ts}
 
 {$address}
 
 {$email}
-{elseif $email}
+{elseif !empty($email)}
 ===========================================================
 {ts}Registered Email{/ts}
 
 ===========================================================
 {$email}
 {/if} {* End billingName or email *}
-{if $credit_card_type}
+{if !empty($credit_card_type)}
 
 ===========================================================
 {ts}Credit Card Information{/ts}
 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
 {/if}
 
-{if $selectPremium }
+{if !empty($selectPremium)}
 ===========================================================
 {ts}Premium Information{/ts}
 
 {if $end_date}
 {ts}End Date{/ts}: {$end_date|crmDate}
 {/if}
-{if $contact_email OR $contact_phone}
+{if !empty($contact_email) OR !empty($contact_phone)}
 
 {ts}For information about this premium, contact:{/ts}
 
-{if $contact_email}
+{if !empty($contact_email)}
   {$contact_email}
 {/if}
-{if $contact_phone}
+{if !empty($contact_phone)}
   {$contact_phone}
 {/if}
 {/if}
-{if $is_deductible AND $price}
+{if !empty($is_deductible) AND !empty($price)}
 
 {ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
 {/if}
 
-{if $customPre}
+{if !empty($customPre)}
 ===========================================================
 {$customPre_grouptitle}
 
 ===========================================================
 {foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
 {/if}
 
 
-{if $customPost}
+{if !empty($customPost)}
 ===========================================================
 {$customPost_grouptitle}
 
 ===========================================================
 {foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
index 8a09aef437dea0a675f59080cc7a07b4d5c3a817..025d2f7b871aaa4e7ea3a978bde4a24da6cae341 100644 (file)
       </td>
     </tr>
 
-    {if $event.participant_role}
+    {if !empty($event.participant_role)}
     <tr>
       <td {$labelStyle}>
         {ts}Participant Role{/ts}
     </tr>
     {/if}
 
-    {if $isShowLocation}
+    {if !empty($isShowLocation)}
     <tr>
       <td colspan="2" {$valueStyle}>
         {$location.address.1.display|nl2br}
     </tr>
     {/if}
 
-    {if $location.phone.1.phone || $location.email.1.email}
+    {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
     <tr>
       <td colspan="2" {$labelStyle}>
         {ts}Event Contacts:{/ts}