本文整理汇总了PHP中comquick2cartHelper::getCurrencySymbol方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::getCurrencySymbol方法的具体用法?PHP comquick2cartHelper::getCurrencySymbol怎么用?PHP comquick2cartHelper::getCurrencySymbol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getCurrencySymbol方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
?>
</th>
<th class=""><?php
echo JText::_('COM_QUICK2CART_DASHB_AMOUNT');
?>
</th>
<th class=""><?php
echo JText::_('COM_QUICK2CART_DASHB_STATUS');
?>
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($this->last5orders as $ord) {
$order_currency = $comquick2cartHelper->getCurrencySymbol($ord['currency']);
$this->store_orders_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=orders&layout=storeorder');
?>
<tr>
<td>
<a href="<?php
echo JRoute::_('index.php?option=com_quick2cart&view=orders&layout=order&orderid=' . $ord['id'] . '&store_id=' . $this->store_id . '&calledStoreview=1&Itemid=' . $this->store_orders_itemid, false);
?>
">
<?php
echo JHtml::tooltip(JText::sprintf('QTC_TOOLTIP_VIEW_ORDER_MSG', $ord['prefix'] . $ord['id']), JText::_('QTC_TOOLTIP_VIEW_ORDER'), '', $ord['prefix'] . $ord['id']);
?>
</a>
</td>
<td><?php
echo $ord['name'];
示例2:
?>
</th>
<th><?php
echo JHtml::_('grid.sort', 'COM_QUICK2CART_PAYOUT_AMOUNT', 'amount', $this->lists['order_Dir'], $this->lists['order']);
?>
</th> -->
<th><?php
echo JText::_('COM_QUICK2CART_PAYOUT_ID');
?>
</th>
<th><?php
echo JText::_('COM_QUICK2CART_PAYOUT_DATE');
?>
</th>
<th><?php
$currency = $comquick2cartHelper->getCurrencySymbol();
echo JText::_('COM_QUICK2CART_ORDER_AMOUNT');
?>
</th>
<!-- <th><?php
echo JText::_('COM_QUICK2CART_CASHBACK_VALUE');
?>
</th> -->
</tr>
<?php
}
?>
<?php
$i = 0;
foreach ($this->payouts as $payout) {
?>
示例3: getFromattedPrice
/**
* getFromattedPrice
*
* @param int $price price
* @param int $curr curr
* @param int $formatting formatting
*
* @return formatted price-currency string
*/
public function getFromattedPrice($price, $curr = null, $formatting = 1)
{
$comquick2cartHelper = new comquick2cartHelper();
/* if (empty($curr))
{
$curr_sym= $curr = $comquick2cartHelper->getCurrencySymbol();
}
$html='';
return $html="<span>".$price." </span> ".$curr;*/
if (empty($curr)) {
$curr = $comquick2cartHelper->getCurrencySession();
}
$curr_sym = $comquick2cartHelper->getCurrencySymbol();
$params = JComponentHelper::getParams('com_quick2cart');
$currency_display_format = $params->get('currency_display_format', "{SYMBOL} {AMOUNT}");
// $price = intval(str_replace(',', '', $price)); commented by vm bz converts from 25.5 to 25
$price = (double) str_replace(',', '', $price);
$price = number_format($price, 2);
$currency_display_formatstr = str_replace('{AMOUNT}', $price, $currency_display_format);
$currency_display_formatstr = str_replace('{SYMBOL}', $curr_sym, $currency_display_formatstr);
$currency_display_formatstr = str_replace('{CURRENCY}', $curr, $currency_display_formatstr);
$html = '';
if ($formatting == 1) {
$html = "<span>" . $currency_display_formatstr . " </span>";
} else {
$html = $currency_display_formatstr;
}
return $html;
}