$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE);
$this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
$this->_component = CRM_Utils_Request::retrieve('component', 'String', $this, TRUE);
+
$this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
$this->_formType = CRM_Utils_Array::value('formType', $_GET);
$enitityType = 'participant';
$this->_contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment', $this->_id, 'contribution_id', 'participant_id');
}
+ $eventId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Participant', $this->_id, 'event_id', 'id');
+ $this->_fromEmails = CRM_Event_BAO_Event::getFromEmailIds($eventId);
$paymentInfo = CRM_Core_BAO_FinancialTrxn::getPartialPaymentWithType($this->_id, $enitityType);
$paymentDetails = CRM_Contribute_BAO_Contribution::getPaymentInfo($this->_id, $this->_component);
//add receipt for offline contribution
$this->addElement('checkbox', 'is_email_receipt', ts('Send Receipt?'));
- $this->add('select', 'from_email_address', ts('Receipt From'), $this->_fromEmails);
+ $this->add('select', 'from_email_address', ts('Receipt From'), $this->_fromEmails['from_email_id']);
$this->add('textarea', 'receipt_text', ts('Confirmation Message'));
if (!empty($submittedValues['is_email_receipt']) && $sendReceipt) {
$statusMsg .= ' ' . ts('A receipt has been emailed to the contributor.');
}
+ if ($sendReceipt) {
+ $statusMsg .= ' ' . ts('Email has been sent successfully');
+ }
CRM_Core_Session::setStatus($statusMsg, ts('Saved'), 'success');
$session = CRM_Core_Session::singleton();
if (!empty($this->_params['is_email_receipt']) && $sendReceipt) {
$statusMsg .= ' ' . ts('A receipt has been emailed to the contributor.');
}
+ if ($sendReceipt) {
+ $statusMsg .= ' ' . ts('Email has been sent successfully');
+ }
+
CRM_Core_Session::setStatus($statusMsg, ts('Complete'), 'success');
$session->replaceUserContext(CRM_Utils_System::url('civicrm/contact/view',
"reset=1&cid={$this->_contactId}&selectedChild=participant"
$sendTemplateParams['bcc'] = CRM_Utils_Array::value('bcc', $this->_fromEmails);
}
list($mailSent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
+ return $mailSent;
}
}
\ No newline at end of file
Dear {$contactDisplayName}
{if $paymentConfig.confirm_email_text}
{$paymentConfig.confirm_email_text}
-{else}
-{if $isRefund}
+{elseif $isRefund}
{ts}A refund has been issued based on changes in your registration selections.{/ts}
{else}
{ts}A payment has been received.{/ts}
{/if}
-{/if}
{ts}Please print this confirmation for your records.{/ts}
{ts}Thank-you. This completes your payment for {/ts}{if $component eq 'event'}{$event.event_title}{/if}.
{/if}
-
+{/if}
{if $receive_date}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
-{/if}
-{/if}
{if $component eq 'event'}
===============================================================================