public function postProcess() { $params = $this->controller->exportValues($this->_name); $feeBlock = $this->_values['fee']; $lineItems = $this->_values['line_items']; CRM_Event_BAO_Participant::changeFeeSelections($params, $this->_participantId, $this->_contributionId, $feeBlock, $lineItems, $this->_paidAmount, $params['priceSetId']); $this->contributionAmt = CRM_Core_DAO::getFieldValue('CRM_Contribute_BAO_Contribution', $this->_contributionId, 'total_amount'); // email sending if (CRM_Utils_Array::value('send_receipt', $params)) { $fetchParticipantVals = array('id' => $this->_participantId); CRM_Event_BAO_Participant::getValues($fetchParticipantVals, $participantDetails, CRM_Core_DAO::$_nullArray); $participantParams = array_merge($params, $participantDetails[$this->_participantId]); $mailSent = $this->emailReceipt($participantParams); } // update participant CRM_Core_DAO::setFieldValue('CRM_Event_DAO_Participant', $this->_participantId, 'status_id', $params['status_id']); if (!empty($params['note'])) { $noteParams = array('entity_table' => 'civicrm_participant', 'note' => $params['note'], 'entity_id' => $this->_participantId, 'contact_id' => $this->_contactId, 'modified_date' => date('Ymd')); CRM_Core_BAO_Note::add($noteParams); } CRM_Core_Session::setStatus(ts("The fee selection has been changed for this participant"), ts('Saved'), 'success'); $buttonName = $this->controller->getButtonName(); if ($buttonName == $this->getButtonName('upload', 'new')) { $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url('civicrm/payment/add', "reset=1&action=add&component=event&id={$this->_participantId}&cid={$this->_contactId}")); } }