Created
November 10, 2017 15:39
-
-
Save Pum-purum/d86c894142a13e1d32432343c3d95cc7 to your computer and use it in GitHub Desktop.
Форматирование цен на Битрикс в js-скриптах
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
CJSCore::Init(array('currency')); | |
$currencyFormat = CCurrencyLang::GetFormatDescription('RUB'); | |
?> | |
<script type="text/javascript"> | |
BX.Currency.setCurrencyFormat('RUB', <? echo CUtil::PhpToJSObject($currencyFormat, false, true); ?>); | |
var formatRub = BX.Currency.currencyFormat(121.50, 'RUB', true); | |
alert(formatRub); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment