From 2bed01af2ea77e2c5e914b6b1cabbba8756e48d9 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 10 Nov 2023 18:23:57 +1300 Subject: [PATCH] Blank out membership_online_receipt - text version As with the offline event receipt this reduces the maintenance effort, given that we generate a text version anyway --- CRM/Upgrade/Incremental/MessageTemplates.php | 4 +- .../CRM/Core/Payment/AuthorizeNetIPNTest.php | 76 +++--- .../phpunit/CRM/Core/Payment/BaseIPNTest.php | 8 +- .../CRM/Upgrade/Incremental/BaseTest.php | 53 ++-- tests/phpunit/api/v3/ContributionPageTest.php | 17 +- .../membership_online_receipt_text.tpl | 237 ------------------ 6 files changed, 85 insertions(+), 310 deletions(-) diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 22ae1f1098..146da9e35c 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -519,10 +519,10 @@ class CRM_Upgrade_Incremental_MessageTemplates { /** * Update message templates. */ - public function updateTemplates() { + public function updateTemplates(): void { $templates = $this->getTemplatesToUpdate(); foreach ($templates as $template) { - $workFlowID = CRM_Core_DAO::singleValueQuery("SELECT MAX(id) as id FROM civicrm_option_value WHERE name = %1", [ + $workFlowID = CRM_Core_DAO::singleValueQuery('SELECT MAX(id) as id FROM civicrm_option_value WHERE name = %1', [ 1 => [$template['name'], 'String'], ]); $content = file_get_contents(\Civi::paths()->getPath('[civicrm.root]/xml/templates/message_templates/' . $template['name'] . '_' . $template['type'] . '.tpl')); diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php index a22d702443..a5b03da146 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php @@ -307,14 +307,19 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { $IPN = new CRM_Core_Payment_AuthorizeNetIPN($this->getRecurTransaction()); $IPN->main(); $mut->checkAllMailLog([ - 'Membership Type: General', + 'Membership Type', + 'General', 'Mr. Anthony Anderson II" ', - 'Amount: $200.00', - 'Membership Start Date:', + 'Amount', + '$200.00', + 'Membership Start Date', 'Supporter Profile', - 'First Name: Anthony', - 'Last Name: Anderson', - 'Email Address: anthony_anderson@civicrm.org', + 'First Name', + 'Anthony', + 'Last Name', + 'Anderson', + 'Email Address', + 'anthony_anderson@civicrm.org', 'Honor', 'This membership will be automatically renewed every', 'Dear Anthony', @@ -331,16 +336,22 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { $IPN->main(); $mut->checkAllMailLog([ - 'Membership Type: General', + 'Membership Type', + 'General', 'Mrs. Antonia Anderson II', 'antonia_anderson@civicrm.org', - 'Amount: $200.00', - 'Membership Start Date:', - 'Transaction #: hers', + 'Amount', + '$200.00', + 'Membership Start Date', + 'Transaction #', + 'hers', 'Supporter Profile', - 'First Name: Antonia', - 'Last Name: Anderson', - 'Email Address: antonia_anderson@civicrm.org', + 'First Name', + 'Antonia', + 'Last Name', + 'Anderson', + 'Email Address', + 'antonia_anderson@civicrm.org', 'This membership will be automatically renewed every', 'Dear Antonia', 'Thanks for your auto renew membership sign-up', @@ -370,14 +381,19 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { $IPN = new CRM_Core_Payment_AuthorizeNetIPN($this->getRecurTransaction()); $IPN->main(); $mut->checkAllMailLog([ - 'Membership Type: General', + 'Membership Type', + 'General', 'Mr. Anthony Anderson II" ', - 'Amount: $200.00', - 'Membership Start Date:', + 'Amount', + '$200.00', + 'Membership Start Date', 'Supporter Profile', - 'First Name: Anthony', - 'Last Name: Anderson', - 'Email Address: anthony_anderson@civicrm.org', + 'First Name', + 'Anthony', + 'Last Name', + 'Anderson', + 'Email Address', + 'anthony_anderson@civicrm.org', 'This membership will be automatically renewed every', 'Dear Anthony', 'Thanks for your auto renew membership sign-up', @@ -391,22 +407,24 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { $IPN->main(); $mut->checkAllMailLog([ - 'Membership Type: General', + 'Membership Type', + 'General', 'Mrs. Antonia Anderson II', 'antonia_anderson@civicrm.org', - 'Amount: $200.00', - 'Membership Start Date:', - 'Transaction #: hers', + 'Amount', + '$200.00', + 'Membership Start Date', + 'Transaction #', + 'hers', 'This membership will be automatically renewed every', 'Dear Antonia', 'Thanks for your auto renew membership sign-up', - ], - [ - 'First Name: Anthony', - 'First Name: Antonia', - 'Last Name: Anderson', + 'Antonia', + 'Anderson', + 'antonia_anderson@civicrm.org', + ], [ 'Supporter Profile', - 'Email Address: antonia_anderson@civicrm.org', + 'Email Address', ]); $mut->stop(); diff --git a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php index d15c0f7d7f..6bbb1baba9 100644 --- a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php @@ -125,7 +125,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $msg = $contribution->composeMessageArray($this->input, $this->ids); $this->assertIsArray($msg, 'Message returned as an array in line'); $this->assertEquals('Mr. Anthony Anderson II', $msg['to']); - $this->assertStringContainsString('Membership Type: General', $msg['body']); + $this->assertStringContainsString('General', $msg['html']); } /** @@ -141,7 +141,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $contribution->id = $this->_contributionId; $msg = $contribution->composeMessageArray($this->input, $this->ids); $this->assertEquals('Mr. Anthony Anderson II', $msg['to']); - $this->assertStringContainsString('Membership Type: General', $msg['body']); + $this->assertStringContainsString('General', $msg['html']); $this->ids['contact'] = $this->_contactId = $this->individualCreate(['prefix_id' => 'Dr.', 'first_name' => 'Donald', 'last_name' => 'Duck', 'email' => 'the-don@duckville.com']); $contribution = $this->callAPISuccess('contribution', 'create', array_merge($this->_contributionParams, ['invoice_id' => 'abc'])); @@ -154,7 +154,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $contribution->id = $this->_contributionId; $msg = $contribution->composeMessageArray($this->input, $this->ids); $this->assertEquals('Dr. Donald Duck II', $msg['to']); - $this->assertStringContainsString('Membership Type: Fowl', $msg['body']); + $this->assertStringContainsString('Fowl', $msg['html']); } /** @@ -169,7 +169,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $msg = $contribution->composeMessageArray($this->input, $this->ids); $this->assertIsArray($msg, 'Message not returned as an array'); $this->assertEquals('Mr. Anthony Anderson II', $msg['to']); - $this->assertStringContainsString('Membership Type: General', $msg['body']); + $this->assertStringContainsString('General', $msg['html']); } /** diff --git a/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php b/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php index bc4aee7771..334ea9369a 100644 --- a/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php +++ b/tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php @@ -4,7 +4,6 @@ use Civi\Api4\ActionSchedule; use Civi\Api4\MessageTemplate; /** - * Class CRM_UF_Page_ProfileEditorTest * @group headless */ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { @@ -12,32 +11,28 @@ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { public function tearDown(): void { $this->quickCleanup(['civicrm_saved_search', 'civicrm_action_schedule']); + $this->revertTemplateToReservedTemplate(); parent::tearDown(); } /** * Test message upgrade process. + * + * @throws \CRM_Core_Exception */ public function testMessageTemplateUpgrade(): void { - $workFlowID = $this->callAPISuccessGetValue('OptionValue', ['return' => 'id', 'name' => 'membership_online_receipt', 'options' => ['limit' => 1, 'sort' => 'id DESC']]); - - $templates = $this->callAPISuccess('MessageTemplate', 'get', ['workflow_id' => $workFlowID])['values']; + $templates = $this->callAPISuccess('MessageTemplate', 'get', ['workflow_name' => 'membership_online_receipt'])['values']; foreach ($templates as $template) { - $originalText = $template['msg_text']; - $this->callAPISuccess('MessageTemplate', 'create', ['msg_text' => 'great what a cool member you are', 'id' => $template['id']]); - $msg_text = $this->callAPISuccessGetValue('MessageTemplate', ['id' => $template['id'], 'return' => 'msg_text']); - $this->assertEquals('great what a cool member you are', $msg_text); + $this->callAPISuccess('MessageTemplate', 'create', ['msg_html' => 'great what a cool member you are', 'id' => $template['id']]); + $msg_html = $this->callAPISuccessGetValue('MessageTemplate', ['id' => $template['id'], 'return' => 'msg_html']); + $this->assertEquals('great what a cool member you are', $msg_html); } $messageTemplateObject = new CRM_Upgrade_Incremental_MessageTemplates('5.4.alpha1'); $messageTemplateObject->updateTemplates(); foreach ($templates as $template) { - $msg_text = $this->callAPISuccessGetValue('MessageTemplate', ['id' => $template['id'], 'return' => 'msg_text']); - $this->assertStringContainsString('{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if}', $msg_text); - if ($msg_text !== $originalText) { - // Reset value for future tests. - $this->callAPISuccess('MessageTemplate', 'create', ['msg_text' => $originalText, 'id' => $template['id']]); - } + $msg_html = MessageTemplate::get()->addWhere('id', '=', $template['id'])->execute()->first()['msg_html']; + $this->assertStringContainsString('{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}

{$greeting},

{/if}', $msg_html); } } @@ -98,42 +93,36 @@ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { * Test message upgrade process only edits the default if the template is customised. */ public function testMessageTemplateUpgradeAlreadyCustomised(): void { - $workFlowID = civicrm_api3('OptionValue', 'getvalue', ['return' => 'id', 'name' => 'membership_online_receipt', 'options' => ['limit' => 1, 'sort' => 'id DESC']]); - - $templates = $this->callAPISuccess('MessageTemplate', 'get', ['workflow_id' => $workFlowID])['values']; + $templates = $this->callAPISuccess('MessageTemplate', 'get', ['workflow_name' => 'membership_online_receipt'])['values']; foreach ($templates as $template) { if ($template['is_reserved']) { - $originalText = $template['msg_text']; - $this->callAPISuccess('MessageTemplate', 'create', ['msg_text' => 'great what a cool member you are', 'id' => $template['id']]); + $this->callAPISuccess('MessageTemplate', 'create', ['msg_html' => 'great what a cool member you are', 'id' => $template['id']]); } else { - $this->callAPISuccess('MessageTemplate', 'create', ['msg_text' => 'great what a silly sausage you are', 'id' => $template['id']]); + $this->callAPISuccess('MessageTemplate', 'create', ['msg_html' => 'great what a silly sausage you are', 'id' => $template['id']]); } } $messageTemplateObject = new CRM_Upgrade_Incremental_MessageTemplates('5.4.alpha1'); $messageTemplateObject->updateTemplates(); foreach ($templates as $template) { - $msg_text = $this->callAPISuccessGetValue('MessageTemplate', ['id' => $template['id'], 'return' => 'msg_text']); + $msg_html = MessageTemplate::get()->addWhere('id', '=', $template['id'])->execute()->first()['msg_html']; if ($template['is_reserved']) { - $this->assertStringContainsString('{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if}', $msg_text); + $this->assertStringContainsString('{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}

{$greeting},

{/if}', $msg_html); } else { - $this->assertEquals('great what a silly sausage you are', $msg_text); - } - - if ($msg_text !== $originalText) { - // Reset value for future tests. - $this->callAPISuccess('MessageTemplate', 'create', ['msg_text' => $originalText, 'id' => $template['id']]); + $this->assertEquals('great what a silly sausage you are', $msg_html); } } } /** * Test function for messages on upgrade. + * + * @throws \CRM_Core_Exception */ public function testMessageTemplateGetUpgradeMessages(): void { - \Civi\Api4\MessageTemplate::update(FALSE) + MessageTemplate::update(FALSE) ->addValue('msg_text', 'Edited text') ->addWhere('workflow_name', '=', 'contribution_online_receipt') ->addWhere('is_default', '=', TRUE) @@ -181,7 +170,7 @@ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { /** * Test Multiple Relative Date conversions */ - public function testSmartGroupMultipleRelatvieDateConversions(): void { + public function testSmartGroupMultipleRelativeDateConversions(): void { $this->callAPISuccess('SavedSearch', 'create', [ 'form_values' => [ ['membership_join_date_low', '=', '20190903000000'], @@ -554,7 +543,7 @@ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { 'name' => $name, ]); // API is hardened to strip the spaces to lets re-add in now - CRM_Core_DAO::executeQuery("UPDATE civicrm_option_group SET name = %1 WHERE id = %2", [ + CRM_Core_DAO::executeQuery('UPDATE civicrm_option_group SET name = %1 WHERE id = %2', [ 1 => [$name, 'String'], 2 => [$optionGroup['id'], 'Positive'], ]); @@ -578,7 +567,7 @@ class CRM_Upgrade_Incremental_BaseTest extends CiviUnitTestCase { 'name' => $name, ]); // API is hardened to strip the spaces to lets re-add in now - CRM_Core_DAO::executeQuery("UPDATE civicrm_option_group SET name = %1 WHERE id = %2", [ + CRM_Core_DAO::executeQuery('UPDATE civicrm_option_group SET name = %1 WHERE id = %2', [ 1 => [$name, 'String'], 2 => [$optionGroup['id'], 'Positive'], ]); diff --git a/tests/phpunit/api/v3/ContributionPageTest.php b/tests/phpunit/api/v3/ContributionPageTest.php index 55c58b816d..2fade00483 100644 --- a/tests/phpunit/api/v3/ContributionPageTest.php +++ b/tests/phpunit/api/v3/ContributionPageTest.php @@ -359,7 +359,8 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { $contribution = $this->callAPISuccess('contribution', 'getsingle', ['contribution_page_id' => $this->getContributionPageID()]); $this->callAPISuccess('MembershipPayment', 'getsingle', ['contribution_id' => $contribution['id']]); $mut->checkMailLog([ - 'Membership Type: General', + 'Membership Type', + 'General', 'Test Frontend title', ]); $mut->stop(); @@ -392,7 +393,8 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { $this->assertCount(1, $msgs); $mut->checkMailLog([ - 'Membership Type: General', + 'Membership Type', + 'General', 'Gruffier', ], [ 'Amount', @@ -423,7 +425,8 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { $this->assertCount(2, $contributions); $this->callAPISuccess('membership_payment', 'getsingle', ['contribution_id' => ['IN' => array_keys($contributions)]]); $mut->checkMailLog([ - 'Membership Amount -... $2.00', + 'Membership Amount', + '$2.00', ]); $mut->stop(); $mut->clearMessages(); @@ -487,8 +490,9 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { // line and no total line. $mut->checkAllMailLog( [ - 'Amount: $2.00', - 'Amount: $88.00', + 'Amount', + '$2.00', + '$88.00', 'Membership Fee', ], [ @@ -518,7 +522,8 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { $this->assertEquals($membership['contact_id'], $contributions[$membershipPayment['contribution_id']]['contact_id']); $mut->checkMailLog([ 'Gruff', - 'General Membership: $0.00', + 'General Membership', + '$0.00', 'Membership Fee', ]); $mut->stop(); diff --git a/xml/templates/message_templates/membership_online_receipt_text.tpl b/xml/templates/message_templates/membership_online_receipt_text.tpl index b6c4b78ecc..e69de29bb2 100644 --- a/xml/templates/message_templates/membership_online_receipt_text.tpl +++ b/xml/templates/message_templates/membership_online_receipt_text.tpl @@ -1,237 +0,0 @@ -{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if} -{if !empty($receipt_text)} -{$receipt_text} -{/if} -{if $is_pay_later} - -=========================================================== -{$pay_later_receipt} -=========================================================== -{/if} - -{if $membership_assign && !$useForMember} -=========================================================== -{ts}Membership Information{/ts} - -=========================================================== -{ts}Membership Type{/ts}: {$membership_name} -{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate} -{/if} -{if $mem_end_date}{ts}Membership Expiration Date{/ts}: {$mem_end_date|crmDate} -{/if} - -{/if} -{if $amount} -=========================================================== -{ts}Membership Fee{/ts} - -=========================================================== -{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 && !empty($lineItem) and !empty($priceSetID) & 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} -{capture assign=ts_total}{ts}Total{/ts}{/capture} -{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} ----------------------------------------------------------- -{foreach from=$value item=line} -{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"} -{/foreach} -{/foreach} - -{ts}Total Amount{/ts}: {$amount|crmMoney} -{else} -{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 !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} -{capture assign=ts_total}{ts}Total{/ts}{/capture} -{/if} -{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture} -{capture assign=ts_end_date}{ts}Membership Expiration Date{/ts}{/capture} -{$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 !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} {$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 !empty($dataArray)} -{ts}Amount before Tax:{/ts} {contribution.tax_exclusive_amount} - -{foreach from=$dataArray item=value key=priceset} -{if $priceset || $priceset == 0} -{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency} -{else} -{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency} -{/if} -{/foreach} -{/if} --------------------------------------------------------------------------------------------------- -{/if} - -{if $totalTaxAmount} -{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency} -{/if} - -{ts}Amount{/ts}: {$amount|crmMoney} {if isset($amount_level)} - {$amount_level} {/if} -{/if} -{elseif isset($membership_amount)} -=========================================================== -{ts}Membership Fee{/ts} - -=========================================================== -{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney} -{/if} - -{if !empty($receive_date)} - -{ts}Date{/ts}: {$receive_date|crmDate} -{/if} -{if !empty($is_monetary) and !empty($trxn_id)} -{ts}Transaction #{/ts}: {$trxn_id} - -{/if} -{if !empty($membership_trx_id)} -{ts}Membership Transaction #{/ts}: {$membership_trx_id} - -{/if} -{if !empty($is_recur)} -{ts}This membership will be renewed automatically.{/ts} -{if $cancelSubscriptionUrl} - -{ts 1=$cancelSubscriptionUrl}You can cancel the auto-renewal option by visiting this web page: %1.{/ts} - -{/if} - -{if $updateSubscriptionBillingUrl} - -{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts} -{/if} -{/if} - -{if $honor_block_is_active} -=========================================================== -{$soft_credit_type} -=========================================================== -{foreach from=$honoreeProfile item=value key=label} -{$label}: {$value} -{/foreach} - -{/if} -{if !empty($pcpBlock)} -=========================================================== -{ts}Personal Campaign Page{/ts} - -=========================================================== -{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if} - -{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if} - -{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if} - -{/if} -{if !empty($onBehalfProfile)} -=========================================================== -{ts}On Behalf Of{/ts} - -=========================================================== -{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName} -{$onBehalfName}: {$onBehalfValue} -{/foreach} -{/if} - -{if !empty($billingName)} -=========================================================== -{ts}Billing Name and Address{/ts} - -=========================================================== -{$billingName} -{$address} - -{$email} -{elseif !empty($email)} -=========================================================== -{ts}Registered Email{/ts} - -=========================================================== -{$email} -{/if} {* End billingName or email *} -{if !empty($credit_card_type)} - -=========================================================== -{ts}Credit Card Information{/ts} - -=========================================================== -{$credit_card_type} -{$credit_card_number} -{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} -{/if} - -{if !empty($selectPremium)} -=========================================================== -{ts}Premium Information{/ts} - -=========================================================== -{$product_name} -{if $option} -{ts}Option{/ts}: {$option} -{/if} -{if $sku} -{ts}SKU{/ts}: {$sku} -{/if} -{if $start_date} -{ts}Start Date{/ts}: {$start_date|crmDate} -{/if} -{if $end_date} -{ts}End Date{/ts}: {$end_date|crmDate} -{/if} -{if !empty($contact_email) OR !empty($contact_phone)} - -{ts}For information about this premium, contact:{/ts} - -{if !empty($contact_email)} - {$contact_email} -{/if} -{if !empty($contact_phone)} - {$contact_phone} -{/if} -{/if} -{if $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 !empty($customPre)} -=========================================================== -{$customPre_grouptitle} - -=========================================================== -{foreach from=$customPre item=customValue key=customName} - {$customName}: {$customValue} -{/foreach} -{/if} - - -{if !empty($customPost)} -=========================================================== -{$customPost_grouptitle} - -=========================================================== -{foreach from=$customPost item=customValue key=customName} - {$customName}: {$customValue} -{/foreach} -{/if} -- 2.25.1