本文整理匯總了PHP中CCurrencyLang::GetFormatDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCurrencyLang::GetFormatDescription方法的具體用法?PHP CCurrencyLang::GetFormatDescription怎麽用?PHP CCurrencyLang::GetFormatDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CCurrencyLang
的用法示例。
在下文中一共展示了CCurrencyLang::GetFormatDescription方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: SaleFormatCurrency
function SaleFormatCurrency($fSum, $strCurrency, $OnlyValue = false, $withoutFormat = false)
{
if ($withoutFormat === true) {
if ($fSum === '') {
return '';
}
$currencyFormat = CCurrencyLang::GetFormatDescription($strCurrency);
if ($currencyFormat === false) {
$currencyFormat = CCurrencyLang::GetDefaultValues();
}
$intDecimals = $currencyFormat['DECIMALS'];
if (round($fSum, $currencyFormat["DECIMALS"]) == round($fSum, 0)) {
$intDecimals = 0;
}
return number_format($fSum, $intDecimals, '.', '');
}
return CCurrencyLang::CurrencyFormat($fSum, $strCurrency, !($OnlyValue === true));
}
示例2: array
?>
"></a>
<a class="bx_ui_slider_handle right" style="right:0;" href="javascript:void(0)" id="right_slider_<?php
echo $key;
?>
"></a>
</div>
</div>
<div style="opacity: 0;height: 1px;"></div>
</div>
</div>
</div>
<?php
$precision = 2;
if (Bitrix\Main\Loader::includeModule("currency")) {
$res = CCurrencyLang::GetFormatDescription($arItem["VALUES"]["MIN"]["CURRENCY"]);
$precision = $res['DECIMALS'];
}
$arJsParams = array("leftSlider" => 'left_slider_' . $key, "rightSlider" => 'right_slider_' . $key, "tracker" => "drag_tracker_" . $key, "trackerWrap" => "drag_track_" . $key, "minInputId" => $arItem["VALUES"]["MIN"]["CONTROL_ID"], "maxInputId" => $arItem["VALUES"]["MAX"]["CONTROL_ID"], "minPrice" => $arItem["VALUES"]["MIN"]["VALUE"], "maxPrice" => $arItem["VALUES"]["MAX"]["VALUE"], "curMinPrice" => $arItem["VALUES"]["MIN"]["HTML_VALUE"], "curMaxPrice" => $arItem["VALUES"]["MAX"]["HTML_VALUE"], "fltMinPrice" => intval($arItem["VALUES"]["MIN"]["FILTERED_VALUE"]) ? $arItem["VALUES"]["MIN"]["FILTERED_VALUE"] : $arItem["VALUES"]["MIN"]["VALUE"], "fltMaxPrice" => intval($arItem["VALUES"]["MAX"]["FILTERED_VALUE"]) ? $arItem["VALUES"]["MAX"]["FILTERED_VALUE"] : $arItem["VALUES"]["MAX"]["VALUE"], "precision" => $precision, "colorUnavailableActive" => 'colorUnavailableActive_' . $key, "colorAvailableActive" => 'colorAvailableActive_' . $key, "colorAvailableInactive" => 'colorAvailableInactive_' . $key);
?>
<script type="text/javascript">
BX.ready(function(){
window['trackBar<?php
echo $key;
?>
'] = new BX.Iblock.SmartFilter(<?php
echo CUtil::PhpToJSObject($arJsParams);
?>
);
});
</script>
示例3: array
'DECIMALS' => $currencyFormat['DECIMALS'],
'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],
'HIDE_ZERO' => $currencyFormat['HIDE_ZERO']
)
)
);
unset($currencyFormat);
}
else
{
$currencyIterator = CurrencyTable::getList(array(
'select' => array('CURRENCY')
));
while ($currency = $currencyIterator->fetch())
{
$currencyFormat = CCurrencyLang::GetFormatDescription($currency['CURRENCY']);
$arResult['CURRENCIES'][] = array(
'CURRENCY' => $currency['CURRENCY'],
'FORMAT' => array(
'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],
'DEC_POINT' => $currencyFormat['DEC_POINT'],
'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],
'DECIMALS' => $currencyFormat['DECIMALS'],
'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],
'HIDE_ZERO' => $currencyFormat['HIDE_ZERO']
)
);
}
unset($currencyFormat, $currency, $currencyIterator);
}
}
示例4: foreach
$taggedCache = Application::getInstance()->getTaggedCache();
if (!empty($tagIblockList)) {
foreach ($tagIblockList as &$iblock) {
$taggedCache->registerTag('iblock_id_' . $iblock);
}
unset($iblock);
}
if (!empty($tagCurrencyList)) {
foreach ($tagCurrencyList as &$currency) {
$taggedCache->registerTag('currency_id_' . $currency);
}
unset($currency);
}
}
if ($arResult["SET_ITEMS"]["OLD_PRICE"] && $arResult["SET_ITEMS"]["OLD_PRICE"] != $arResult["SET_ITEMS"]["PRICE"]) {
$arResult["SET_ITEMS"]["OLD_PRICE"] = CCurrencyLang::CurrencyFormat($arResult["SET_ITEMS"]["OLD_PRICE"], $defaultCurrency, true);
} else {
$arResult["SET_ITEMS"]["OLD_PRICE"] = 0;
}
if ($arResult["SET_ITEMS"]["PRICE"]) {
$arResult["SET_ITEMS"]["PRICE"] = CCurrencyLang::CurrencyFormat($arResult["SET_ITEMS"]["PRICE"], $defaultCurrency, true);
}
if ($arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"]) {
$arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"] = CCurrencyLang::CurrencyFormat($arResult["SET_ITEMS"]["PRICE_DISCOUNT_DIFFERENCE"], $defaultCurrency, true);
}
$currencyFormat = CCurrencyLang::GetFormatDescription($defaultCurrency);
$arResult['CURRENCIES'] = array(array('CURRENCY' => $defaultCurrency, 'FORMAT' => array('FORMAT_STRING' => $currencyFormat['FORMAT_STRING'], 'DEC_POINT' => $currencyFormat['DEC_POINT'], 'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'], 'DECIMALS' => $currencyFormat['DECIMALS'], 'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'], 'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'])));
unset($currencyFormat);
$this->SetResultCacheKeys(array());
$this->IncludeComponentTemplate();
}
示例5: GetCurrencyFormatParams
public static function GetCurrencyFormatParams($currencyID)
{
if (!CModule::IncludeModule('currency')) {
return array();
}
return CCurrencyLang::GetFormatDescription($currencyID);
}