本文整理汇总了PHP中CRM_Price_DAO_PriceField::orderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Price_DAO_PriceField::orderBy方法的具体用法?PHP CRM_Price_DAO_PriceField::orderBy怎么用?PHP CRM_Price_DAO_PriceField::orderBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Price_DAO_PriceField
的用法示例。
在下文中一共展示了CRM_Price_DAO_PriceField::orderBy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submit
/**
* Submit function.
*
* This is the guts of the postProcess made also accessible to the test suite.
*
* @param array $params
* Submitted values.
*/
public function submit($params)
{
//carry campaign from profile.
if (array_key_exists('contribution_campaign_id', $params)) {
$params['campaign_id'] = $params['contribution_campaign_id'];
}
$params['currencyID'] = CRM_Core_Config::singleton()->defaultCurrency;
$is_quick_config = 0;
if (!empty($params['priceSetId'])) {
$is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
if ($is_quick_config) {
$priceField = new CRM_Price_DAO_PriceField();
$priceField->price_set_id = $params['priceSetId'];
$priceField->orderBy('weight');
$priceField->find();
$priceOptions = array();
while ($priceField->fetch()) {
CRM_Price_BAO_PriceFieldValue::getValues($priceField->id, $priceOptions);
if (($selectedPriceOptionID = CRM_Utils_Array::value("price_{$priceField->id}", $params)) != FALSE && $selectedPriceOptionID > 0) {
switch ($priceField->name) {
case 'membership_amount':
$this->_params['selectMembership'] = $params['selectMembership'] = CRM_Utils_Array::value('membership_type_id', $priceOptions[$selectedPriceOptionID]);
$this->set('selectMembership', $params['selectMembership']);
case 'contribution_amount':
$params['amount'] = $selectedPriceOptionID;
if ($priceField->name == 'contribution_amount' || $priceField->name == 'membership_amount' && CRM_Utils_Array::value('is_separate_payment', $this->_membershipBlock) == 0) {
$this->_values['amount'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
}
$this->_values[$selectedPriceOptionID]['value'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['label'] = CRM_Utils_Array::value('label', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['amount_id'] = CRM_Utils_Array::value('id', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['weight'] = CRM_Utils_Array::value('weight', $priceOptions[$selectedPriceOptionID]);
break;
case 'other_amount':
$params['amount_other'] = $selectedPriceOptionID;
break;
}
}
}
}
}
if (!empty($this->_ccid) && !empty($this->_pendingAmount)) {
$params['amount'] = $this->_pendingAmount;
} else {
// from here on down, $params['amount'] holds a monetary value (or null) rather than an option ID
$params['amount'] = self::computeAmount($params, $this->_values);
}
$params['separate_amount'] = $params['amount'];
$memFee = NULL;
if (!empty($params['selectMembership'])) {
if (empty($this->_membershipTypeValues)) {
$this->_membershipTypeValues = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, (array) $params['selectMembership']);
}
$membershipTypeValues = $this->_membershipTypeValues[$params['selectMembership']];
$memFee = $membershipTypeValues['minimum_fee'];
if (!$params['amount'] && !$this->_separateMembershipPayment) {
$params['amount'] = $memFee ? $memFee : 0;
}
}
//If the membership & contribution is used in contribution page & not separate payment
$fieldId = $memPresent = $membershipLabel = $fieldOption = $is_quick_config = NULL;
$proceFieldAmount = 0;
if (property_exists($this, '_separateMembershipPayment') && $this->_separateMembershipPayment == 0) {
$is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
if ($is_quick_config) {
foreach ($this->_priceSet['fields'] as $fieldKey => $fieldVal) {
if ($fieldVal['name'] == 'membership_amount' && !empty($params['price_' . $fieldKey])) {
$fieldId = $fieldVal['id'];
$fieldOption = $params['price_' . $fieldId];
$proceFieldAmount += $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
$memPresent = TRUE;
} else {
if (!empty($params['price_' . $fieldKey]) && $memPresent && ($fieldVal['name'] == 'other_amount' || $fieldVal['name'] == 'contribution_amount')) {
$fieldId = $fieldVal['id'];
if ($fieldVal['name'] == 'other_amount') {
$proceFieldAmount += $this->_submitValues['price_' . $fieldId];
} elseif ($fieldVal['name'] == 'contribution_amount' && $this->_submitValues['price_' . $fieldId] > 0) {
$proceFieldAmount += $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
}
unset($params['price_' . $fieldId]);
break;
}
}
}
}
}
if (!isset($params['amount_other'])) {
$this->set('amount_level', CRM_Utils_Array::value('amount_level', $params));
}
if (!empty($this->_ccid)) {
$this->set('lineItem', $this->_lineItem);
} elseif ($priceSetId = CRM_Utils_Array::value('priceSetId', $params)) {
//.........这里部分代码省略.........
示例2: setFormAmountFields
/**
* This function sets the fields.
*
* - $this->_params['amount_level']
* - $this->_params['selectMembership']
* And under certain circumstances sets
* $this->_params['amount'] = null;
*
* @param int $priceSetID
*/
public function setFormAmountFields($priceSetID)
{
$isQuickConfig = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_params['priceSetId'], 'is_quick_config');
$priceField = new CRM_Price_DAO_PriceField();
$priceField->price_set_id = $priceSetID;
$priceField->orderBy('weight');
$priceField->find();
$paramWeDoNotUnderstand = NULL;
while ($priceField->fetch()) {
if ($priceField->name == "contribution_amount") {
$paramWeDoNotUnderstand = $priceField->id;
}
if ($isQuickConfig && !empty($this->_params["price_{$priceField->id}"])) {
if ($this->_values['fee'][$priceField->id]['html_type'] != 'Text') {
// @todo - stop setting amount level in this function & call the CRM_Price_BAO_PriceSet::getAmountLevel
// function to get correct amount level consistently. Remove setting of the amount level in
// CRM_Price_BAO_PriceSet::processAmount. Extend the unit tests in CRM_Price_BAO_PriceSetTest
// to cover all variants.
$this->_params['amount_level'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceFieldValue', $this->_params["price_{$priceField->id}"], 'label');
}
if ($priceField->name == "membership_amount") {
$this->_params['selectMembership'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceFieldValue', $this->_params["price_{$priceField->id}"], 'membership_type_id');
}
} elseif (CRM_Utils_Array::value('is_separate_payment', $this->_membershipBlock) && !empty($this->_values['fee'][$priceField->id]) && $this->_values['fee'][$priceField->id]['name'] == "other_amount" && CRM_Utils_Array::value("price_{$paramWeDoNotUnderstand}", $this->_params) < 1 && empty($this->_params["price_{$priceField->id}"])) {
$this->_params['amount'] = NULL;
}
// Fix for CRM-14375 - If we are using separate payments and "no
// thank you" is selected for the additional contribution, set
// contribution amount to be null, so that it will not show
// contribution amount same as membership amount.
//@todo - merge with section above
if ($this->_membershipBlock['is_separate_payment'] && !empty($this->_values['fee'][$priceField->id]) && CRM_Utils_Array::value('name', $this->_values['fee'][$priceField->id]) == 'contribution_amount' && CRM_Utils_Array::value("price_{$priceField->id}", $this->_params) == '-1') {
$this->_params['amount'] = NULL;
}
}
}
示例3: postProcess
/**
* Process the form submission.
*/
public function postProcess()
{
$config = CRM_Core_Config::singleton();
// we first reset the confirm page so it accepts new values
$this->controller->resetPage('Confirm');
// get the submitted form values.
$params = $this->controller->exportValues($this->_name);
//carry campaign from profile.
if (array_key_exists('contribution_campaign_id', $params)) {
$params['campaign_id'] = $params['contribution_campaign_id'];
}
if (!empty($params['onbehalfof_id'])) {
$params['organization_id'] = $params['onbehalfof_id'];
}
$params['currencyID'] = $config->defaultCurrency;
if (!empty($params['priceSetId'])) {
$is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
if ($is_quick_config) {
$priceField = new CRM_Price_DAO_PriceField();
$priceField->price_set_id = $params['priceSetId'];
$priceField->orderBy('weight');
$priceField->find();
$priceOptions = array();
while ($priceField->fetch()) {
CRM_Price_BAO_PriceFieldValue::getValues($priceField->id, $priceOptions);
if ($selectedPriceOptionID = CRM_Utils_Array::value("price_{$priceField->id}", $params)) {
switch ($priceField->name) {
case 'membership_amount':
$this->_params['selectMembership'] = $params['selectMembership'] = CRM_Utils_Array::value('membership_type_id', $priceOptions[$selectedPriceOptionID]);
$this->set('selectMembership', $params['selectMembership']);
if (CRM_Utils_Array::value('is_separate_payment', $this->_membershipBlock) == 0) {
$this->_values['amount'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
}
break;
case 'contribution_amount':
$params['amount'] = $selectedPriceOptionID;
$this->_values['amount'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['value'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['label'] = CRM_Utils_Array::value('label', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['amount_id'] = CRM_Utils_Array::value('id', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['weight'] = CRM_Utils_Array::value('weight', $priceOptions[$selectedPriceOptionID]);
break;
case 'other_amount':
$params['amount_other'] = $selectedPriceOptionID;
break;
}
}
}
}
}
if ($this->_values['is_pay_later'] && empty($this->_paymentProcessor) && !array_key_exists('hidden_processor', $params) || !empty($params['payment_processor_id']) && $params['payment_processor_id'] == 0) {
$params['is_pay_later'] = 1;
} else {
$params['is_pay_later'] = 0;
}
$this->set('is_pay_later', $params['is_pay_later']);
// assign pay later stuff
$this->_params['is_pay_later'] = CRM_Utils_Array::value('is_pay_later', $params, FALSE);
$this->assign('is_pay_later', $params['is_pay_later']);
if ($params['is_pay_later']) {
$this->assign('pay_later_text', $this->_values['pay_later_text']);
$this->assign('pay_later_receipt', $this->_values['pay_later_receipt']);
}
// from here on down, $params['amount'] holds a monetary value (or null) rather than an option ID
$params['amount'] = self::computeAmount($params, $this->_values);
$params['separate_amount'] = $params['amount'];
$memFee = NULL;
if (!empty($params['selectMembership'])) {
if (!empty($this->_membershipTypeValues)) {
$membershipTypeValues = $this->_membershipTypeValues[$params['selectMembership']];
} else {
$membershipTypeValues = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, $params['selectMembership']);
}
$memFee = $membershipTypeValues['minimum_fee'];
if (!$params['amount'] && !$this->_separateMembershipPayment) {
$params['amount'] = $memFee ? $memFee : 0;
}
}
//If the membership & contribution is used in contribution page & not separate payment
$fieldId = $memPresent = $membershipLabel = $fieldOption = $is_quick_config = NULL;
$proceFieldAmount = 0;
if (property_exists($this, '_separateMembershipPayment') && $this->_separateMembershipPayment == 0) {
$is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
if ($is_quick_config) {
foreach ($this->_priceSet['fields'] as $fieldKey => $fieldVal) {
if ($fieldVal['name'] == 'membership_amount' && !empty($params['price_' . $fieldKey])) {
$fieldId = $fieldVal['id'];
$fieldOption = $params['price_' . $fieldId];
$proceFieldAmount += $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
$memPresent = TRUE;
} else {
if (!empty($params['price_' . $fieldKey]) && $memPresent && ($fieldVal['name'] == 'other_amount' || $fieldVal['name'] == 'contribution_amount')) {
$fieldId = $fieldVal['id'];
if ($fieldVal['name'] == 'other_amount') {
$proceFieldAmount += $this->_submitValues['price_' . $fieldId];
} elseif ($fieldVal['name'] == 'contribution_amount' && $this->_submitValues['price_' . $fieldId] > 0) {
$proceFieldAmount += $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
//.........这里部分代码省略.........
示例4: preProcess
/**
* Function to set variables up before form is built
*
* @return void
* @access public
*/
public function preProcess()
{
$config = CRM_Core_Config::singleton();
parent::preProcess();
// lineItem isn't set until Register postProcess
$this->_lineItem = $this->get('lineItem');
$this->_paymentProcessor = $this->get('paymentProcessor');
if ($this->_contributeMode == 'express') {
// rfp == redirect from paypal
$rfp = CRM_Utils_Request::retrieve('rfp', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'GET');
if ($rfp) {
$payment = CRM_Core_Payment::singleton($this->_mode, $this->_paymentProcessor, $this);
$expressParams = $payment->getExpressCheckoutDetails($this->get('token'));
$this->_params['payer'] = $expressParams['payer'];
$this->_params['payer_id'] = $expressParams['payer_id'];
$this->_params['payer_status'] = $expressParams['payer_status'];
CRM_Core_Payment_Form::mapParams($this->_bltID, $expressParams, $this->_params, FALSE);
// fix state and country id if present
if (!empty($this->_params["billing_state_province_id-{$this->_bltID}"]) && $this->_params["billing_state_province_id-{$this->_bltID}"]) {
$this->_params["billing_state_province-{$this->_bltID}"] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($this->_params["billing_state_province_id-{$this->_bltID}"]);
}
if (!empty($this->_params["billing_country_id-{$this->_bltID}"]) && $this->_params["billing_country_id-{$this->_bltID}"]) {
$this->_params["billing_country-{$this->_bltID}"] = CRM_Core_PseudoConstant::countryIsoCode($this->_params["billing_country_id-{$this->_bltID}"]);
}
// set a few other parameters for PayPal
$this->_params['token'] = $this->get('token');
$this->_params['amount'] = $this->get('amount');
if (!empty($this->_membershipBlock)) {
$this->_params['selectMembership'] = $this->get('selectMembership');
}
// we use this here to incorporate any changes made by folks in hooks
$this->_params['currencyID'] = $config->defaultCurrency;
$this->_params['payment_action'] = 'Sale';
// also merge all the other values from the profile fields
$values = $this->controller->exportValues('Main');
$skipFields = array('amount', 'amount_other', "billing_street_address-{$this->_bltID}", "billing_city-{$this->_bltID}", "billing_state_province_id-{$this->_bltID}", "billing_postal_code-{$this->_bltID}", "billing_country_id-{$this->_bltID}");
foreach ($values as $name => $value) {
// skip amount field
if (!in_array($name, $skipFields)) {
$this->_params[$name] = $value;
}
}
$this->set('getExpressCheckoutDetails', $this->_params);
} else {
$this->_params = $this->get('getExpressCheckoutDetails');
}
} else {
$this->_params = $this->controller->exportValues('Main');
if (!empty($this->_params["billing_state_province_id-{$this->_bltID}"])) {
$this->_params["billing_state_province-{$this->_bltID}"] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($this->_params["billing_state_province_id-{$this->_bltID}"]);
}
if (!empty($this->_params["billing_country_id-{$this->_bltID}"])) {
$this->_params["billing_country-{$this->_bltID}"] = CRM_Core_PseudoConstant::countryIsoCode($this->_params["billing_country_id-{$this->_bltID}"]);
}
if (isset($this->_params['credit_card_exp_date'])) {
$this->_params['year'] = CRM_Core_Payment_Form::getCreditCardExpirationYear($this->_params);
$this->_params['month'] = CRM_Core_Payment_Form::getCreditCardExpirationMonth($this->_params);
}
$this->_params['ip_address'] = CRM_Utils_System::ipAddress();
$this->_params['amount'] = $this->get('amount');
$this->_useForMember = $this->get('useForMember');
if (isset($this->_params['amount'])) {
$priceField = new CRM_Price_DAO_PriceField();
$priceField->price_set_id = $this->_params['priceSetId'];
$priceField->orderBy('weight');
$priceField->find();
$contriPriceId = NULL;
$isQuickConfig = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_params['priceSetId'], 'is_quick_config');
while ($priceField->fetch()) {
if ($priceField->name == "contribution_amount") {
$contriPriceId = $priceField->id;
}
if ($isQuickConfig && !empty($this->_params["price_{$priceField->id}"])) {
if ($this->_values['fee'][$priceField->id]['html_type'] != 'Text') {
$this->_params['amount_level'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceFieldValue', $this->_params["price_{$priceField->id}"], 'label');
}
if ($priceField->name == "membership_amount") {
$this->_params['selectMembership'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceFieldValue', $this->_params["price_{$priceField->id}"], 'membership_type_id');
}
} elseif (CRM_Utils_Array::value('is_separate_payment', $this->_membershipBlock) && !empty($this->_values['fee'][$priceField->id]) && $this->_values['fee'][$priceField->id]['name'] == "other_amount" && CRM_Utils_Array::value("price_{$contriPriceId}", $this->_params) < 1 && empty($this->_params["price_{$priceField->id}"])) {
$this->_params['amount'] = null;
}
}
}
$this->_params['currencyID'] = $config->defaultCurrency;
$this->_params['payment_action'] = 'Sale';
}
$this->_params['is_pay_later'] = $this->get('is_pay_later');
$this->assign('is_pay_later', $this->_params['is_pay_later']);
if ($this->_params['is_pay_later']) {
$this->assign('pay_later_receipt', $this->_values['pay_later_receipt']);
}
// if onbehalf-of-organization
if (!empty($this->_params['hidden_onbehalf_profile'])) {
//.........这里部分代码省略.........
示例5: postProcess
/**
* Process the form submission.
*/
public function postProcess()
{
$config = CRM_Core_Config::singleton();
// we first reset the confirm page so it accepts new values
$this->controller->resetPage('Confirm');
// get the submitted form values.
$params = $this->controller->exportValues($this->_name);
//carry campaign from profile.
if (array_key_exists('contribution_campaign_id', $params)) {
$params['campaign_id'] = $params['contribution_campaign_id'];
}
if (!empty($params['onbehalfof_id'])) {
$params['organization_id'] = $params['onbehalfof_id'];
}
$params['currencyID'] = $config->defaultCurrency;
if (!empty($params['priceSetId'])) {
$is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
if ($is_quick_config) {
$priceField = new CRM_Price_DAO_PriceField();
$priceField->price_set_id = $params['priceSetId'];
$priceField->orderBy('weight');
$priceField->find();
$priceOptions = array();
while ($priceField->fetch()) {
CRM_Price_BAO_PriceFieldValue::getValues($priceField->id, $priceOptions);
if ($selectedPriceOptionID = CRM_Utils_Array::value("price_{$priceField->id}", $params)) {
switch ($priceField->name) {
case 'membership_amount':
$this->_params['selectMembership'] = $params['selectMembership'] = CRM_Utils_Array::value('membership_type_id', $priceOptions[$selectedPriceOptionID]);
$this->set('selectMembership', $params['selectMembership']);
if (CRM_Utils_Array::value('is_separate_payment', $this->_membershipBlock) == 0) {
$this->_values['amount'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
}
break;
case 'contribution_amount':
$params['amount'] = $selectedPriceOptionID;
$this->_values['amount'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['value'] = CRM_Utils_Array::value('amount', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['label'] = CRM_Utils_Array::value('label', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['amount_id'] = CRM_Utils_Array::value('id', $priceOptions[$selectedPriceOptionID]);
$this->_values[$selectedPriceOptionID]['weight'] = CRM_Utils_Array::value('weight', $priceOptions[$selectedPriceOptionID]);
break;
case 'other_amount':
$params['amount_other'] = $selectedPriceOptionID;
break;
}
}
}
}
}
if ($this->_values['is_pay_later'] && empty($this->_paymentProcessor) && !array_key_exists('hidden_processor', $params) || !empty($params['payment_processor_id']) && $params['payment_processor_id'] == 0) {
$params['is_pay_later'] = 1;
} else {
$params['is_pay_later'] = 0;
}
$this->set('is_pay_later', $params['is_pay_later']);
// assign pay later stuff
$this->_params['is_pay_later'] = CRM_Utils_Array::value('is_pay_later', $params, FALSE);
$this->assign('is_pay_later', $params['is_pay_later']);
if ($params['is_pay_later']) {
$this->assign('pay_later_text', $this->_values['pay_later_text']);
$this->assign('pay_later_receipt', $this->_values['pay_later_receipt']);
}
// from here on down, $params['amount'] holds a monetary value (or null) rather than an option ID
$params['amount'] = self::computeAmount($params, $this->_values);
$params['separate_amount'] = $params['amount'];
$memFee = NULL;
if (!empty($params['selectMembership'])) {
if (!empty($this->_membershipTypeValues)) {
$membershipTypeValues = $this->_membershipTypeValues[$params['selectMembership']];
} else {
$membershipTypeValues = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, (array) $params['selectMembership']);
}
$memFee = $membershipTypeValues['minimum_fee'];
if (!$params['amount'] && !$this->_separateMembershipPayment) {
$params['amount'] = $memFee ? $memFee : 0;
}
}
//If the membership & contribution is used in contribution page & not separate payment
$fieldId = $memPresent = $membershipLabel = $fieldOption = $is_quick_config = NULL;
$proceFieldAmount = 0;
if (property_exists($this, '_separateMembershipPayment') && $this->_separateMembershipPayment == 0) {
$is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
if ($is_quick_config) {
foreach ($this->_priceSet['fields'] as $fieldKey => $fieldVal) {
if ($fieldVal['name'] == 'membership_amount' && !empty($params['price_' . $fieldKey])) {
$fieldId = $fieldVal['id'];
$fieldOption = $params['price_' . $fieldId];
$proceFieldAmount += $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
$memPresent = TRUE;
} else {
if (!empty($params['price_' . $fieldKey]) && $memPresent && ($fieldVal['name'] == 'other_amount' || $fieldVal['name'] == 'contribution_amount')) {
$fieldId = $fieldVal['id'];
if ($fieldVal['name'] == 'other_amount') {
$proceFieldAmount += $this->_submitValues['price_' . $fieldId];
} elseif ($fieldVal['name'] == 'contribution_amount' && $this->_submitValues['price_' . $fieldId] > 0) {
$proceFieldAmount += $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
//.........这里部分代码省略.........