本文整理汇总了PHP中comquick2cartHelper::getUserName方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::getUserName方法的具体用法?PHP comquick2cartHelper::getUserName怎么用?PHP comquick2cartHelper::getUserName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getUserName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
public function display($tpl = null)
{
//$this->state = $this->get('State');
$this->item = $this->get('Item');
//$this->form = $this->get('Form');
$comquick2cartHelper = new comquick2cartHelper();
$getPayoutFormData = $this->get('PayoutFormData');
$this->getPayoutFormData = $getPayoutFormData;
//print_r($this->getPayoutFormData);die;
$payee_options = array();
$payee_options[] = JHtml::_('select.option', '0', JText::_('COM_QUICK2CART_SELECT_PAYEE'));
if (!empty($getPayoutFormData)) {
foreach ($getPayoutFormData as $payout) {
$amt = round($payout->total_amount);
if ($amt > 0) {
$username = $comquick2cartHelper->getUserName($payout->user_id);
$payee_options[] = JHtml::_('select.option', $payout->user_id, $username);
}
}
}
$this->payee_options = $payee_options;
// Check for errors.
if (count($errors = $this->get('Errors'))) {
throw new Exception(implode("\n", $errors));
}
$this->addToolbar();
parent::display($tpl);
}
示例2: addPayoutEntry
/**
* $res is an object
* */
function addPayoutEntry($order_id, $txnid, $status, $pg_plugin)
{
// GET BUSINESS EMAIL
$plugin = JPluginHelper::getPlugin('payment', $pg_plugin);
$pluginParams = json_decode($plugin->params);
$businessPayEmial = "";
if (property_exists($pluginParams, 'business')) {
$businessPayEmial = trim($pluginParams->business);
} else {
return array();
}
$params = JComponentHelper::getParams('com_quick2cart');
$send_payments_to_owner = $params->get('send_payments_to_owner', 0);
if ($pg_plugin == 'adaptive_paypal') {
$comquick2cartHelper = new comquick2cartHelper();
$storeHelper = new storeHelper();
$adaptiveDetails = $storeHelper->getorderItemsStoreInfo($order_id);
$Quick2cartModelReports = $comquick2cartHelper->loadqtcClass(JPATH_SITE . "/components/com_quick2cart/models/reports.php", 'Quick2cartModelReports');
$reportStatus = $status == 'C' ? 1 : 0;
foreach ($adaptiveDetails as $userReport) {
$Quick2cartModelpayment = new Quick2cartModelpayment();
$payDetail = $Quick2cartModelpayment->getPayoutId($txnid, $userReport['owner']);
if (!empty($payDetail) && $payDetail['status'] == $reportStatus) {
// payout already present mean $payDetail will not empty AND STATUS is same then dont process.
// for new payout,thisl will not process
break;
}
$post = array();
$post['id'] = empty($payDetail['id']) ? '' : $payDetail['id'];
$post['user_id'] = $userReport['owner'];
$post['payee_name'] = $comquick2cartHelper->getUserName($post['user_id']);
$post['paypal_email'] = $userReport['store_email'];
$post['transaction_id'] = $txnid;
$post['payment_amount'] = $userReport['commissonCutPrice'];
$post['payout_date'] = date('Y-m-d');
$post['status'] = $reportStatus;
$post['payment_comment'] = "adaptive pay";
$Quick2cartModelReports->savePayout($post);
}
}
}
示例3: foreach
echo JText::_('QTC_NAME');
?>
</th>
<th><?php
echo JText::_('QTC_REMAINING_AMOUNT');
?>
</th>
</thead>
<tbody>
<?php
$count = 1;
foreach ($this->getpendingPayouts as $pay) {
?>
<tr>
<?php
$uname = $comquick2cartHelper->getUserName($pay->user_id);
$amt = (double) $pay->total_amount - $pay->fee;
?>
<td><?php
echo $uname;
?>
</td>
<td><?php
echo $comquick2cartHelper->getFromattedPrice($amt);
?>
</td>
</tr>
<?php
if ($count >= 5) {
break;
}